/* ════════════════════════════════════════════════════════════════════
   Ramon Martins & Associados — Site institucional
   Sistema visual D · O Pórtico
   ════════════════════════════════════════════════════════════════════ */

:root {
  --ink: #0a0a08;
  --paper: #f7f5f0;
  --paper-deep: #ece7dc;
  --graphite: #5c5a55;
  --hair: rgba(10, 10, 8, 0.16);
  --hair-strong: rgba(10, 10, 8, 0.42);

  --sans: 'Inter Tight', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'EB Garamond', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --pad-x: clamp(24px, 6vw, 120px);
  --maxw: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ── Reusable atoms ─────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono); font-weight: 400;
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--graphite);
}
.hair { height: 1px; background: var(--hair); border: 0; width: 100%; }
.shell { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }

/* Monogram R | M */
.mono {
  display: inline-flex; align-items: center;
  font-family: var(--sans); font-weight: 400; letter-spacing: 0.12em;
  line-height: 1;
}
.mono .pipe { width: 1px; background: currentColor; opacity: 0.7; margin: 0 0.34em; align-self: center; }

/* ════════════════════════════════════════════════════════════════════
   NAV
   ════════════════════════════════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(247, 245, 240, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s ease, background .4s ease;
}
.nav.scrolled { border-bottom-color: var(--hair); }
.nav.on-dark {
  background: rgba(10, 10, 8, 0.55);
  color: var(--paper);
}
.nav.on-dark.scrolled { background: rgba(10, 10, 8, 0.9); border-bottom-color: rgba(247,245,240,.14); }
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--pad-x); height: 78px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: inline-flex; align-items: center; gap: 14px; margin-right: clamp(28px, 5vw, 72px); }
.nav-brand .mono { font-size: 22px; }
.nav-brand .mono .pipe { height: 20px; }
.nav-brand .nb-name {
  font-weight: 400; font-size: 13px; letter-spacing: 0.26em; text-transform: uppercase;
  opacity: 0.0; transition: opacity .4s ease;
  white-space: nowrap;
}
.nav.scrolled .nav-brand .nb-name { opacity: 0.7; }

.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 42px); }
.nav-link {
  font-weight: 400; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0.62; transition: opacity .2s ease; position: relative; padding: 6px 0;
  background: none; border: 0; color: inherit;
}
.nav-link:hover { opacity: 1; }
.nav-link.active { opacity: 1; }
.nav-link.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor; opacity: .8;
}
.nav-right { display: flex; align-items: center; gap: 22px; margin-left: clamp(24px, 4vw, 56px); }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  border: 0; background: none; color: inherit;
}
.lang-toggle .opt { opacity: 0.4; transition: opacity .2s; }
.lang-toggle .opt.on { opacity: 1; }
.lang-toggle .sep { opacity: 0.3; }

.nav-cta {
  font-family: var(--sans); font-weight: 500; font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  padding: 11px 20px; border: 1px solid currentColor;
  transition: background .2s ease, color .2s ease; white-space: nowrap;
}
.nav.on-dark .nav-cta:hover { background: var(--paper); color: var(--ink); }
.nav:not(.on-dark) .nav-cta:hover { background: var(--ink); color: var(--paper); }

.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.nav-burger span { width: 24px; height: 1.5px; background: currentColor; display: block; transition: .3s; }

/* ════════════════════════════════════════════════════════════════════
   PAGE SYSTEM
   ════════════════════════════════════════════════════════════════════ */
.page { display: none; }
.page.active { display: block; }

/* fade-in on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s cubic-bezier(.2,.6,.2,1), transform .9s cubic-bezier(.2,.6,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

/* hairline grow */
.grow-line { height: 1px; background: var(--hair-strong); width: 0; transition: width 1.1s cubic-bezier(.2,.6,.2,1); }
.grow-line.in { width: 100%; }
.grow-line.short.in { width: 200px; max-width: 60%; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .grow-line { width: 100%; transition: none; }
  html { scroll-behavior: auto; }
}

/* ════════════════════════════════════════════════════════════════════
   HERO (Início) — cinematic plate
   ════════════════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh; position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% 118%, #1a1814 0%, transparent 58%),
    radial-gradient(ellipse 60% 42% at 50% 26%, #14110d 0%, transparent 72%),
    linear-gradient(180deg, #050402 0%, #0d0a06 100%);
  color: var(--paper);
  display: flex; align-items: center;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent 84px, rgba(255,240,200,0.05) 84px, rgba(255,240,200,0.05) 85px);
  -webkit-mask-image: radial-gradient(ellipse 72% 62% at 50% 50%, black 28%, transparent 78%);
          mask-image: radial-gradient(ellipse 72% 62% at 50% 50%, black 28%, transparent 78%);
}
.hero-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse 92% 74% at 50% 50%, transparent 38%, rgba(0,0,0,.66) 100%); }
.hero-content { position: relative; z-index: 2; width: 100%; text-align: center; padding: 120px 0; }
.hero-eyebrow { color: rgba(247,245,240,.55); margin-bottom: 44px; }
.hero-wordmark { font-weight: 400; font-size: clamp(40px, 8.5vw, 120px); letter-spacing: 0.04em; line-height: 1; }
.hero-sub { font-weight: 300; font-size: clamp(12px, 1.6vw, 20px); letter-spacing: 0.62em; text-indent: 0.62em; margin-top: clamp(18px, 3vw, 34px); opacity: 0.85; }
.hero-rule { width: 1px; height: 64px; background: var(--paper); opacity: .4; margin: 48px auto 36px; }
.hero-tagline { font-family: var(--serif); font-style: italic; font-size: clamp(17px, 2.4vw, 26px); font-weight: 400; line-height: 1.5; max-width: 640px; margin: 0 auto; opacity: 0.9; }
.hero-scroll {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(247,245,240,.5); display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-scroll .line { width: 1px; height: 40px; background: rgba(247,245,240,.4); animation: scrollpulse 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes scrollpulse { 0%,100%{transform:scaleY(.3);opacity:.3} 50%{transform:scaleY(1);opacity:.8} }

/* ════════════════════════════════════════════════════════════════════
   SECTION SCAFFOLD
   ════════════════════════════════════════════════════════════════════ */
.section { padding: clamp(80px, 12vh, 160px) 0; }
.section.tinta { background: var(--ink); color: var(--paper); }
.section.pedra { background: var(--paper-deep); }

.page-head { padding-top: 78px; } /* offset for fixed nav on inner pages */
.page-hero {
  padding: clamp(120px, 20vh, 240px) 0 clamp(60px, 9vh, 110px);
  border-bottom: 1px solid var(--hair);
}
.page-hero .eyebrow { margin-bottom: 28px; }
.page-title {
  font-weight: 200; font-size: clamp(44px, 8vw, 104px); line-height: 0.98; letter-spacing: -0.028em;
}
.page-title .md { font-weight: 500; }
.page-intro {
  font-family: var(--serif); font-size: clamp(18px, 2.4vw, 26px); line-height: 1.5; font-weight: 400;
  max-width: 680px; margin-top: 36px; color: var(--ink); opacity: 0.85;
}

/* section label row */
.sec-label { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: baseline; margin-bottom: 48px; }
.sec-label .num { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; color: var(--graphite); }
.sec-label .txt { font-weight: 500; font-size: clamp(20px, 3vw, 30px); letter-spacing: -0.01em; }
.section.tinta .sec-label .num { color: rgba(247,245,240,.5); }

/* ── Manifesto (home) ── */
.manifesto { font-weight: 200; font-size: clamp(28px, 4.6vw, 60px); line-height: 1.12; letter-spacing: -0.022em; max-width: 1000px; }
.manifesto .md { font-weight: 500; }
.manifesto em { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ── Areas preview / list ── */
.areas { border-top: 1px solid var(--hair); }
.section.tinta .areas { border-top-color: rgba(247,245,240,.18); }
.area-row {
  display: grid; grid-template-columns: 64px 1.1fr 1.7fr auto; gap: 32px; align-items: baseline;
  padding: clamp(24px, 3.4vw, 40px) 0; border-bottom: 1px solid var(--hair);
  position: relative; transition: padding-left .35s ease;
}
.section.tinta .area-row { border-bottom-color: rgba(247,245,240,.18); }
.area-row .ord { font-family: var(--mono); font-size: 13px; letter-spacing: 0.18em; color: var(--graphite); }
.section.tinta .area-row .ord { color: rgba(247,245,240,.5); }
.area-row .name { font-weight: 500; font-size: clamp(20px, 2.6vw, 30px); letter-spacing: -0.012em; }
.area-row .desc { font-family: var(--serif); font-size: clamp(15px, 1.5vw, 18px); line-height: 1.5; opacity: 0.74; }
.area-row .arrow { font-size: 22px; font-weight: 200; opacity: 0; transform: translateX(-8px); transition: .35s ease; }
.area-row:hover { padding-left: 12px; }
.area-row:hover .arrow { opacity: 0.7; transform: none; }

@media (max-width: 860px) {
  .area-row { grid-template-columns: 40px 1fr; gap: 8px 18px; }
  .area-row .desc { grid-column: 2; }
  .area-row .arrow { display: none; }
}

/* ── Two-column generic ── */
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); }
.cols2.narrow-left { grid-template-columns: 0.8fr 1.2fr; }
@media (max-width: 820px) { .cols2, .cols2.narrow-left { grid-template-columns: 1fr; gap: 40px; } }

.prose { font-family: var(--serif); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.7; }
.prose p { margin-bottom: 18px; max-width: 60ch; }
.prose p:last-child { margin-bottom: 0; }
.prose .strong { font-weight: 600; }

/* ── Pillars (4 princípios) ── */
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--hair); margin-top: 8px; }
.section.tinta .pillars { background: rgba(247,245,240,.16); }
.pillar { background: var(--ink); padding: clamp(28px, 3.4vw, 46px); }
.section:not(.tinta) .pillar { background: var(--paper); }
.pillar .pn { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; color: var(--graphite); margin-bottom: 20px; }
.pillar .pname { font-weight: 500; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.012em; margin-bottom: 12px; }
.pillar .pdesc { font-family: var(--serif); font-size: 16px; line-height: 1.55; opacity: 0.76; }
@media (max-width: 720px) { .pillars { grid-template-columns: 1fr; } }

/* ── Area detail blocks ── */
.area-detail { padding: clamp(48px,6vw,80px) 0; border-bottom: 1px solid var(--hair); display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px,5vw,80px); }
.area-detail:last-child { border-bottom: 0; }
.area-detail .ad-head .ad-ord { font-family: var(--mono); font-size: 13px; letter-spacing: 0.2em; color: var(--graphite); margin-bottom: 18px; }
.area-detail .ad-head .ad-name { font-weight: 300; font-size: clamp(28px, 4vw, 52px); line-height: 1.02; letter-spacing: -0.022em; }
.area-detail .ad-body { font-family: var(--serif); font-size: clamp(16px,1.6vw,19px); line-height: 1.7; }
.area-detail .ad-body p { margin-bottom: 16px; max-width: 60ch; }
.area-detail .ad-tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.area-detail .ad-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; padding: 7px 12px; border: 1px solid var(--hair-strong); opacity: 0.8; }
@media (max-width: 820px) { .area-detail { grid-template-columns: 1fr; gap: 24px; } }

/* ── Articles ── */
.article-list { border-top: 1px solid var(--hair); }
.article-row {
  display: grid; grid-template-columns: 130px 1fr auto; gap: 32px; align-items: baseline;
  padding: clamp(26px,3.4vw,38px) 0; border-bottom: 1px solid var(--hair);
  transition: padding-left .35s ease;
}
.article-row:hover { padding-left: 12px; }
.article-row .a-date { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--graphite); text-transform: uppercase; }
.article-row .a-cat { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--graphite); text-transform: uppercase; margin-bottom: 8px; }
.article-row .a-title { font-weight: 400; font-size: clamp(20px, 2.6vw, 30px); letter-spacing: -0.014em; line-height: 1.12; max-width: 60ch; }
.article-row .a-arrow { font-size: 20px; font-weight: 200; opacity: 0.4; }
@media (max-width: 720px) {
  .article-row { grid-template-columns: 1fr; gap: 8px; }
  .article-row .a-arrow { display: none; }
}
.articles-note { margin-top: 48px; font-family: var(--serif); font-style: italic; font-size: 17px; opacity: 0.6; }

/* ── Contato ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px,7vw,100px); }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; gap: 48px; } }
.contact-channels { display: flex; flex-direction: column; gap: 36px; }
.channel .c-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--graphite); margin-bottom: 10px; }
.channel .c-value { font-weight: 400; font-size: clamp(22px, 3vw, 34px); letter-spacing: -0.01em; }
.section.tinta .channel .c-value { color: var(--paper); }
.channel a.c-value { transition: opacity .2s; }
.channel a.c-value:hover { opacity: 0.6; }

/* Form */
.form { display: flex; flex-direction: column; gap: 26px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.6; }
.field input, .field textarea {
  font-family: var(--sans); font-size: 16px; color: inherit;
  background: transparent; border: 0; border-bottom: 1px solid var(--hair-strong);
  padding: 10px 0; outline: none; transition: border-color .25s;
}
.section.tinta .field input, .section.tinta .field textarea { border-bottom-color: rgba(247,245,240,.3); }
.field input:focus, .field textarea:focus { border-bottom-color: currentColor; }
.field textarea { resize: vertical; min-height: 90px; }
.form-submit {
  align-self: flex-start; margin-top: 6px;
  font-family: var(--sans); font-weight: 500; font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase;
  padding: 16px 36px; border: 1px solid currentColor; background: transparent; color: inherit;
  transition: background .25s, color .25s;
}
.section:not(.tinta) .form-submit:hover { background: var(--ink); color: var(--paper); }
.section.tinta .form-submit:hover { background: var(--paper); color: var(--ink); }
.form-note { font-family: var(--serif); font-style: italic; font-size: 14px; opacity: 0.6; margin-top: 4px; }

/* ── CTA band ── */
.cta-band { text-align: center; }
.cta-band .cta-title { font-weight: 200; font-size: clamp(32px, 5.4vw, 72px); line-height: 1.04; letter-spacing: -0.024em; max-width: 900px; margin: 0 auto 18px; }
.cta-band .cta-sub { font-family: var(--serif); font-style: italic; font-size: clamp(17px,2vw,22px); opacity: 0.82; margin-bottom: 44px; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--sans); font-weight: 500; font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase;
  padding: 20px 44px; border: 1px solid currentColor; transition: background .25s, color .25s;
}
.section.tinta .cta-btn:hover { background: var(--paper); color: var(--ink); }
.section:not(.tinta) .cta-btn:hover { background: var(--ink); color: var(--paper); }

/* ════════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════════ */
.footer { background: var(--ink); color: var(--paper); padding: clamp(64px,9vh,110px) 0 40px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; padding-bottom: 56px; border-bottom: 1px solid rgba(247,245,240,.16); }
.footer-brand .mono { font-size: 40px; }
.footer-brand .mono .pipe { height: 34px; }
.footer-brand .fb-name { font-weight: 400; font-size: 15px; letter-spacing: 0.2em; text-transform: uppercase; margin-top: 22px; }
.footer-brand .fb-sub { font-weight: 300; font-size: 9px; letter-spacing: 0.5em; opacity: 0.7; margin-top: 8px; }
.footer-col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.55; margin-bottom: 22px; font-weight: 400; }
.footer-col a, .footer-col p { display: block; font-size: 14px; letter-spacing: 0.02em; opacity: 0.82; margin-bottom: 12px; transition: opacity .2s; }
.footer-col a:hover { opacity: 1; }
.footer-bottom { padding-top: 32px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-bottom .fmono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.55; }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; gap: 40px; } }

/* ════════════════════════════════════════════════════════════════════
   MOBILE NAV
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-cta { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 24px;
    position: absolute; top: 78px; left: 0; right: 0;
    background: var(--paper); color: var(--ink);
    padding: 36px var(--pad-x) 44px; border-bottom: 1px solid var(--hair);
  }
  .nav.on-dark .nav-links.open { background: var(--ink); color: var(--paper); }
  .nav-link { font-size: 18px; }
}
