/* Henrique Barros — shared site styles for / and /advisory/
   Visual language: huge bold Helvetica Neue headlines, small serif text, a 12-column
   grid with a quiet left column, hairline rules and an oversized list of work.
   Black ground, white type. Page-specific layout lives inline in each page.
   Floor kept from the Impeccable pass: 16px minimum, 44px touch targets, visible
   focus, SVG icons, reduced-motion support, one authored entrance (the hero). */

:root {
  color-scheme: dark;
  --bg: #000;
  --text: #fff;
  --muted: rgba(255, 255, 255, .74);
  --soft: rgba(255, 255, 255, .62);
  --line: rgba(255, 255, 255, .42);
  --hair: rgba(255, 255, 255, .2);
  --sans: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
  --serif: "Crimson Pro", "Minion Pro", Georgia, "Times New Roman", serif;
  --side: 4vw;
  --gap: clamp(12px, 1.7vw, 24px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --fs-display: clamp(3.4rem, 7.7vw, 7.8rem);
  --fs-list: clamp(2.5rem, 5.8vw, 5.6rem);
  --fs-title: clamp(2.1rem, 3.9vw, 3.8rem);
  --fs-h3: clamp(1.35rem, 2vw, 1.8rem);
  --fs-body: clamp(1.25rem, 1.7vw, 1.55rem);
  --fs-small: clamp(1.05rem, 1.23vw, 1.12rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; background: var(--bg); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .4) transparent; }
body {
  margin: 0; min-width: 320px; background: var(--bg); color: var(--text);
  font-family: var(--serif); font-weight: 400; font-size: var(--fs-small); line-height: 1.8; letter-spacing: .014em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  caret-color: #fff; accent-color: #fff;
}
::selection { background: #fff; color: #000; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .35); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .6); }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
h1, h2, h3, p, dl, dd, ol, ul { margin-top: 0; }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; letter-spacing: -.02em; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
p, dd, li { text-wrap: pretty; }
.skip-link { position: fixed; left: 16px; top: 12px; z-index: 100; padding: 12px 16px; transform: translateY(-200%); background: #fff; color: #000; font-family: var(--sans); }
.skip-link:focus { transform: translateY(0); }
.i { width: 1em; height: 1em; flex: none; transition: transform .35s var(--ease); }

/* header: wordmark left, links right; solid once the page scrolls */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: clamp(16px, 2.6vw, 38px) var(--side); border-bottom: 1px solid transparent; transition: background-color .25s ease, border-color .25s ease, padding .25s ease; }
.site-header.is-stuck { background: var(--bg); border-bottom-color: var(--hair); padding-block: 10px; }
.brand { display: flex; flex-direction: column; justify-content: center; min-height: 44px; text-decoration: none; }
.brand__name { font: 700 clamp(1.6rem, 2.3vw, 2.1rem)/1.15 var(--sans); letter-spacing: -.02em; }
.brand__role { color: var(--muted); font-size: var(--fs-small); line-height: 1.3; }
.site-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 clamp(16px, 1.7vw, 28px); }
.site-nav a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; min-width: 44px; color: #fff; text-decoration: none; font-size: var(--fs-small); background: linear-gradient(currentColor, currentColor) 0 calc(50% + .72em) / 0 1px no-repeat; transition: background-size .3s var(--ease); }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current] { background-size: 100% 1px; }
.site-nav a:hover .i { transform: translate(2px, -2px); }

/* language switcher: EN | PT, remembered by site.js */
.lang { display: inline-flex; align-items: center; margin-left: clamp(4px, .8vw, 12px); padding-left: clamp(10px, 1.2vw, 18px); border-left: 1px solid var(--hair); }
.lang a { padding: 0 .35em; font-weight: 700; letter-spacing: .04em; }

/* 12-column grid */
.g { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding-inline: var(--side); }

/* hero: oversized headline from column 4, lead from column 7 */
.hero { min-height: 100svh; align-content: center; padding-top: clamp(120px, 22vh, 240px); padding-bottom: clamp(60px, 10vh, 120px); }
.hero h1 { grid-column: 4 / -1; margin: 0; font-size: var(--fs-display); line-height: 1.09; }
.hero__lead { grid-column: 7 / -1; max-width: 32em; margin: clamp(32px, 6vh, 72px) 0 0; font-size: var(--fs-body); line-height: 1.8; }
.hero__actions { grid-column: 7 / -1; display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 14px; }

/* sections: a quiet side column (rule + label) and the content from column 6 */
.section { padding-top: clamp(90px, 14vw, 240px); }
.info__side { grid-column: 3 / span 3; align-self: start; padding-top: .55em; border-top: 1px solid var(--line); font-weight: 700; }
.info__main { grid-column: 6 / -1; min-width: 0; }
.info__main > h2, .section-title { margin: 0 0 .55em; font-size: var(--fs-title); line-height: 1.1; }
.info__main > p, .prose p { max-width: 32em; margin: 0 0 1em; font-size: var(--fs-body); line-height: 1.8; }

/* the oversized list: small index at column 3, big title at column 6 */
.work { margin-top: clamp(40px, 6vw, 96px); }
.work__no { grid-column: 3; padding-top: 1.1em; font-size: var(--fs-small); line-height: 1.3; }
.work__main { grid-column: 6 / -1; min-width: 0; padding-bottom: clamp(14px, 1.6vw, 26px); }
.work__title { margin: 0; font-size: var(--fs-list); line-height: 1.1; }
.work__meta { margin: .1em 0 0; max-width: 34em; color: var(--muted); font-size: var(--fs-small); line-height: 1.6; }
.work__meta a { color: #fff; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.work__meta a:hover { text-decoration-thickness: 2px; }
.work__text { margin: .6em 0 0; max-width: 32em; font-size: var(--fs-body); line-height: 1.7; }

/* links */
.text-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; text-decoration: none; font: 700 clamp(1.1rem, 1.4vw, 1.3rem)/1.3 var(--serif); letter-spacing: .01em; }
.text-link__label { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; transition: text-decoration-thickness .2s; }
.text-link:hover .text-link__label, .text-link:focus-visible .text-link__label { text-decoration-thickness: 3px; }
.text-link:hover .i, .text-link:focus-visible .i { transform: translate(2px, -2px); }
.text-link:hover .i--right, .text-link:focus-visible .i--right { transform: translateX(3px); }
.text-link:disabled { opacity: .55; cursor: default; }
.quiet-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); font-size: var(--fs-small); text-decoration: none; transition: color .2s ease; }
.quiet-link:hover, .quiet-link:focus-visible { color: #fff; }
.quiet-link:hover .i { transform: translate(2px, -2px); }
.inline-link { color: #fff; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.inline-link:hover { text-decoration-thickness: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 1.4em 0 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--fs-small); }
.chips li + li::before { content: "·"; content: "·" / ""; margin: 0 .7em; color: var(--soft); }   /* the dot is decoration: empty alt text keeps screen readers from announcing it */

/* contact form (home and advisory) */
.form { max-width: 40em; margin-top: clamp(40px, 5vw, 72px); }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap); }
.form__group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 26px; }
.form__label { font-size: var(--fs-small); font-weight: 700; }
.form__input { width: 100%; min-height: 52px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: #fff; font: 400 var(--fs-body)/1.5 var(--serif); letter-spacing: .014em; }
.form__input::placeholder { color: rgba(255, 255, 255, .6); opacity: 1; }
.form__input:focus { border-bottom-color: #fff; box-shadow: 0 1px 0 #fff; outline: none; }
.form__textarea { min-height: 130px; resize: vertical; }
.form__foot { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.form__feedback { margin: 0; color: var(--muted); font-size: var(--fs-body); line-height: 1.5; outline: none; }
.form__feedback.is-error { color: #ffb3b3; }
.form__feedback.is-ok { color: #fff; font: 700 var(--fs-title)/1.1 var(--sans); letter-spacing: -.02em; }
.form.is-sent .form__row, .form.is-sent .form__group, .form.is-sent #cf-submit { display: none; }
.form__again { display: none; }
.form.is-sent .form__again { display: inline-flex; margin-top: 10px; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }

.form__note { margin: 0 0 6px; color: var(--muted); font-size: var(--fs-small); }

/* footer */
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: clamp(90px, 12vw, 200px) var(--side) 24px; color: var(--muted); font-size: var(--fs-small); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.footer-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; color: #fff; text-decoration: none; }
.footer-links a:hover, .footer-links a:focus-visible { text-decoration: underline; text-underline-offset: .25em; }

/* the one authored moment: the hero arrives, staggered */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.rise { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }

@media (max-width: 900px) {
  :root { --side: 5.5vw; }
  .hero { min-height: auto; padding-top: 150px; }
  .hero h1, .hero__lead, .hero__actions, .info__side, .info__main, .work__no, .work__main { grid-column: 1 / -1; }
  .info__side { margin-bottom: 22px; }
  .work__no { padding-top: 1.6em; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  /* long words ("componentes", "Designing") must fit a 320px screen without widening the page */
  :root { --fs-display: clamp(2.3rem, 11.5vw, 3.6rem); --fs-list: clamp(2rem, 9.5vw, 2.8rem); }
  html { scroll-padding-top: 160px; }
  .hero { padding-top: 210px; }   /* the header can take two rows here (links + language switch) */
  .site-header { flex-direction: column; gap: 0; }
  .site-nav { justify-content: flex-start; gap: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
