/* Alfaiataria Guerreiro, shared base styles */

:root {
  --ink: #0a0907;
  --ink-2: #110f0c;
  --ink-3: #1a1714;
  --bronze: #2a221b;
  --cream: #f1ead9;
  --cream-soft: #e6dfca;
  --warm-gray: #a89c87;
  --warm-gray-2: #7c7261;
  --gold: #c8a96a;
  --gold-deep: #a07d3f;
  --gold-glow: rgba(200, 169, 106, 0.18);
  --rule: rgba(200, 169, 106, 0.22);
  --rule-soft: rgba(200, 169, 106, 0.12);

  --font-serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --nav-h: 132px;
  --sy: clamp(48px, 5.5vw, 78px); /* ritmo vertical entre seções */
}
@media (max-width: 1100px) { :root { --nav-h: 64px; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 100px; background: var(--ink); }
section[id], div[id] { scroll-margin-top: 100px; }
body {
  background: var(--ink);
  min-height: 100vh;
  color: var(--cream);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
::selection { background: var(--gold); color: var(--ink); }

/* Typography utilities */
.serif { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.012em; }
.mono { font-family: var(--font-mono); }
.luxe {
  letter-spacing: 0.26em; text-transform: uppercase;
  font-size: 12px; font-weight: 500;
}
.luxe-sm {
  letter-spacing: 0.22em; text-transform: uppercase;
  font-size: 11px; font-weight: 500;
}
.balance { text-wrap: balance; }
.italic { font-style: italic; }
.gold { color: var(--gold); }
/* Solid gold. Background-clip:text on Cormorant italic clipped accents and
   punctuation (the "você?" glyphs), so we keep a single luminous gold instead. */
.gold-text { color: #d4b77c; }

/* Headings */
h1, h2, h3, h4, h5 { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.018em; }

.h-display { font-size: clamp(42px, 6.8vw, 96px); line-height: 0.98; letter-spacing: -0.026em; }
.h-1 { font-size: clamp(32px, 4.4vw, 64px); line-height: 1.04; letter-spacing: -0.02em; }
.h-2 { font-size: clamp(28px, 3.6vw, 48px); line-height: 1.08; letter-spacing: -0.016em; }
.h-3 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.14; letter-spacing: -0.012em; }
.h-4 { font-size: clamp(18px, 1.4vw, 22px); line-height: 1.28; }

.body-l { font-size: 19px; line-height: 1.62; font-weight: 300; }
.body-m { font-size: 17px; line-height: 1.6;  font-weight: 300; }
.body-s { font-size: 15px; line-height: 1.55; font-weight: 300; }

/* Layout */
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 900px) { .wrap { padding: 0 24px; } }
@media (max-width: 480px) { .wrap { padding: 0 20px; } }

/* Decorations */
.hair {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
}
.bracket-tl, .bracket-tr, .bracket-bl, .bracket-br {
  position: absolute; width: 28px; height: 28px;
  border-color: var(--gold); pointer-events: none;
}
.bracket-tl { top: -1px; left: -1px; border-top: 1px solid; border-left: 1px solid; }
.bracket-tr { top: -1px; right: -1px; border-top: 1px solid; border-right: 1px solid; }
.bracket-bl { bottom: -1px; left: -1px; border-bottom: 1px solid; border-left: 1px solid; }
.bracket-br { bottom: -1px; right: -1px; border-bottom: 1px solid; border-right: 1px solid; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 17px 30px;
  letter-spacing: 0.28em; text-transform: uppercase; font-size: 12px; font-weight: 500;
  transition: all 0.5s cubic-bezier(0.22,1,0.36,1);
  border: 1px solid transparent;
  position: relative; overflow: hidden;
}
.btn-primary {
  background: var(--gold); color: var(--ink);
  box-shadow: 0 0 40px var(--gold-glow);
}
.btn-primary:hover { background: #d9bd80; transform: translateY(-1px); }
.btn-ghost { border: 1px solid rgba(241,234,217,0.28); color: var(--cream); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn .arrow {
  display: inline-block; width: 20px; height: 1px;
  background: currentColor; position: relative;
  transition: width 0.4s ease;
}
.btn:hover .arrow { width: 32px; }
.btn .arrow::after {
  content: ''; position: absolute; right: 0; top: -3px;
  width: 7px; height: 7px;
  border-top: 1px solid currentColor; border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

/* Animations */
@keyframes fade-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes scale-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
@keyframes stitch-draw { from { stroke-dashoffset: 1200; } to { stroke-dashoffset: 0; } }

.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 1s cubic-bezier(0.22,1,0.36,1), transform 1s cubic-bezier(0.22,1,0.36,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

/* Eyebrow */
.eyebrow {
  color: var(--gold);
  display: inline-flex; align-items: center; gap: 14px;
  letter-spacing: 0.28em; text-transform: uppercase;
  font-size: 11.5px; font-weight: 500;
}
.eyebrow::before {
  content: ''; display: inline-block; width: 32px; height: 1px; background: var(--gold);
}
.eyebrow.center::after {
  content: ''; display: inline-block; width: 32px; height: 1px; background: var(--gold);
}

/* Image frames */
.img-frame { position: relative; overflow: hidden; background: var(--ink-2); }
.img-frame::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(10,9,7,0.4) 100%);
  pointer-events: none;
}

/* Section numerals (top-right) */
.section-num {
  position: absolute;
  top: 36px;
  right: 40px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--warm-gray-2);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  z-index: 2;
}
@media (max-width: 900px) { .section-num { display: none; } }

/* Section base */
section { position: relative; }

/* ============ NAV / HEADER ============ */
.topbar {
  background: var(--ink);
  border-bottom: 1px solid var(--rule-soft);
  text-align: center;
  padding: 11px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--warm-gray);
  position: relative; z-index: 51;
}
.topbar .dot { color: var(--gold); margin: 0 14px; }
@media (max-width: 720px) { .topbar { display: none; } }

.nav {
  position: sticky; top: 0; z-index: 50;
  transition: all 0.5s cubic-bezier(0.22,1,0.36,1);
  background: rgba(10,9,7,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--rule-soft);
}
.nav.transparent { background: transparent; border-bottom-color: transparent; }
.nav-inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px;
  padding: 22px 0 0;
  position: relative;
}
.logo { display: flex; align-items: center; gap: 14px; }
.logo-mark {
  width: 40px; height: 40px;
  border: 1px solid var(--gold);
  display: grid; place-items: center;
  font-family: var(--font-serif); font-style: italic; font-size: 24px;
  color: var(--gold);
  transition: all 0.4s;
}
.logo:hover .logo-mark { background: var(--gold); color: var(--ink); }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text .name { font-family: var(--font-serif); font-size: 27px; letter-spacing: 0.01em; color: var(--cream); }
.logo-text .sub {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--gold); margin-top: 5px;
}
.nav-links {
  display: flex; gap: 40px; flex-wrap: wrap;
  align-items: center; justify-content: center;
  width: 100%;
  padding-top: 18px;
  border-top: 1px solid var(--rule-soft);
}
.nav-links a, .nav-links .nav-trigger {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--warm-gray); transition: color 0.3s; font-weight: 500;
  padding: 8px 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-links a:hover, .nav-links .nav-trigger:hover { color: var(--gold); }
.nav-links a.active { color: var(--gold); }
.nav-links a.active::after {
  content: ""; display: block; height: 1px; background: var(--gold);
  margin-top: 4px;
}
@media (max-width: 1100px) { .nav-links { display: none; } }
.nav-cta {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--gold);
  padding: 12px 22px; transition: all 0.3s; font-weight: 500;
}
.nav-cta:hover { background: var(--gold); color: var(--ink); }
@media (max-width: 720px) { .nav-cta { display: none; } }

/* Submenu */
.has-submenu { position: relative; }
.has-submenu::after {
  /* Invisible bridge between trigger and submenu, keeps :hover alive when
     mouse crosses the visual gap */
  content: "";
  position: absolute;
  top: 100%;
  left: -24px; right: -24px;
  height: 18px;
}
.submenu {
  position: absolute; top: calc(100% + 14px); left: -24px;
  min-width: 260px;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  padding: 18px 22px;
  opacity: 0; pointer-events: none;
  transform: translateY(8px);
  transition: all 0.3s ease;
}
.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.submenu a {
  display: block; padding: 9px 0;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--warm-gray); border-bottom: 1px solid var(--rule-soft);
  font-weight: 500;
}
.submenu a:last-child { border-bottom: 0; }
.submenu a:hover { color: var(--gold); padding-left: 6px; }
.submenu .submenu-eyebrow {
  font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: 0.28em; color: var(--gold-deep);
  text-transform: uppercase; margin-bottom: 10px;
}

/* Mobile menu */
.menu-btn { display: none; padding: 10px; }
@media (max-width: 1100px) {
  .nav-inner { flex-direction: row; justify-content: center; gap: 0; padding: 0; height: 64px; }
  .menu-btn { display: block; position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
  .logo-text .name { font-size: 21px; }
  .logo-mark { width: 36px; height: 36px; }
}
.menu-btn span {
  display: block; width: 24px; height: 1px;
  background: var(--cream); margin: 6px 0; transition: 0.3s;
}
.mobile-menu {
  position: fixed; inset: 0;
  background:
    radial-gradient(130% 75% at 100% 0%, rgba(200,169,106,0.07) 0%, rgba(10,9,7,0) 50%),
    radial-gradient(120% 80% at 0% 100%, var(--ink-3) 0%, var(--ink) 55%);
  z-index: 60;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.55s cubic-bezier(0.22,1,0.36,1);
  padding: 20px clamp(22px, 6vw, 40px) max(26px, env(safe-area-inset-bottom));
  overflow-y: auto; overflow-x: hidden;
}
.mobile-menu.open { transform: translateX(0); }

/* faint monogram watermark */
.mobile-menu::after {
  content: "G"; position: absolute; right: 0; bottom: -1vh;
  font-family: var(--font-serif); font-size: 50vw; line-height: 0.7;
  color: var(--cream); opacity: 0.025; pointer-events: none; z-index: 0;
  max-width: 100%; overflow: hidden;
}
.mobile-menu > * { position: relative; z-index: 1; }

/* Topo */
.mm-top {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 22px; border-bottom: 1px solid var(--rule-soft);
}
.mm-logo { display: flex; align-items: center; gap: 12px; color: var(--cream); }
.mm-logo svg { color: var(--gold); }
.mm-logo span { font-family: var(--font-serif); font-size: 21px; letter-spacing: -0.01em; }
.mm-close { position: relative; width: 42px; height: 42px; flex-shrink: 0; }
.mm-close span {
  position: absolute; top: 50%; left: 9px; right: 9px; height: 1px;
  background: var(--cream); transition: background 0.3s;
}
.mm-close span:nth-child(1) { transform: rotate(45deg); }
.mm-close span:nth-child(2) { transform: rotate(-45deg); }
.mm-close:hover span { background: var(--gold); }

/* Navegação */
.mm-nav { flex: 1 0 auto; display: flex; flex-direction: column; padding: 6px 0; }
.mm-item { border-bottom: 1px solid var(--rule-soft); }
.mm-link {
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 18px;
  padding: 17px 2px;
}
.mm-num {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em;
  color: var(--gold-deep);
}
.mm-label {
  font-family: var(--font-serif); font-size: clamp(26px, 7vw, 32px);
  line-height: 1; letter-spacing: -0.015em; color: var(--cream);
  transition: color 0.3s;
}
.mm-arrow {
  font-family: var(--font-serif); font-size: 17px; color: var(--gold);
  opacity: 0; transform: translateX(-8px); transition: opacity 0.3s, transform 0.3s;
}
.mm-link:hover .mm-label, .mm-link:active .mm-label { color: var(--gold); }
.mm-link:hover .mm-arrow { opacity: 1; transform: translateX(0); }
.mm-sub {
  display: flex; flex-wrap: wrap; gap: 9px 18px;
  padding: 0 2px 17px 44px;
}
.mm-sub a {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--warm-gray); transition: color 0.3s;
}
.mm-sub a:hover { color: var(--gold); }

/* Rodapé */
.mm-foot {
  padding-top: 24px; margin-top: 20px; border-top: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 18px;
}
.mm-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--gold); color: var(--ink);
  padding: 16px 20px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  box-shadow: 0 0 40px var(--gold-glow); transition: background 0.3s;
}
.mm-cta:hover { background: var(--gold-deep); }
.mm-contact {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  font-size: 12px; color: var(--warm-gray);
}
.mm-contact a { color: var(--cream); }
.mm-contact a:hover { color: var(--gold); }
.mm-dot { color: var(--gold); }
.mm-social { display: flex; gap: 22px; }
.mm-social a {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--warm-gray); transition: color 0.3s;
}
.mm-social a:hover { color: var(--gold); }

/* Entrada escalonada ao abrir */
.mobile-menu .mm-item, .mobile-menu .mm-foot { opacity: 0; transform: translateY(14px); }
.mobile-menu.open .mm-item { animation: mm-in 0.5s ease forwards; animation-delay: var(--d, 0s); }
.mobile-menu.open .mm-foot { animation: mm-in 0.5s ease forwards; animation-delay: 0.4s; }
@keyframes mm-in { to { opacity: 1; transform: none; } }

/* ============ FOOTER ============ */
footer.site {
  position: relative;
  border-top: 1px solid var(--rule);
  background: var(--ink);
  padding: var(--sy) 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 60px; margin-bottom: 72px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-col h5 {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--gold); letter-spacing: 0.28em; text-transform: uppercase;
  margin-bottom: 22px; font-weight: 500;
}
.footer-col ul { list-style: none; display: grid; gap: 12px; }
.footer-col li, .footer-col a {
  color: var(--warm-gray); font-size: 15px; font-weight: 300;
  cursor: pointer; transition: color 0.3s;
}
.footer-col li:hover, .footer-col a:hover { color: var(--cream); }

/* Stitch + craft helpers (used in blog) */
.stitch {
  background-image:
    linear-gradient(90deg, var(--gold) 50%, transparent 50%);
  background-size: 12px 1px;
  background-repeat: repeat-x;
  height: 1px;
}
.stitch-dashed {
  border-top: 1px dashed var(--gold);
}

/* Generic page hero, short version used by sub-pages */
.page-hero {
  position: relative;
  padding: calc(var(--sy) + 20px) 0 var(--sy);
  background: var(--ink);
  border-bottom: 1px solid var(--rule-soft);
}
.page-hero .crumb {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--warm-gray); margin-bottom: 24px;
}
.page-hero .crumb a:hover { color: var(--gold); }
.page-hero .crumb .sep { color: var(--gold-deep); margin: 0 12px; }

/* Hide on mobile */
@media (max-width: 900px) {
  .hide-on-mobile { display: none !important; }
}

/* Tape measure border */
.tape-strip {
  background:
    repeating-linear-gradient(90deg,
      transparent 0, transparent 24px,
      var(--gold-deep) 24px, var(--gold-deep) 25px,
      transparent 25px, transparent 48px,
      var(--gold) 48px, var(--gold) 49px,
      transparent 49px, transparent 96px);
  height: 1px; opacity: 0.4;
}

/* Accessibility: honor reduced-motion. Reveal everything, kill looping/entrance
   motion, keep the site fully usable for vestibular-sensitive visitors. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .mobile-menu .mm-item, .mobile-menu .mm-foot { opacity: 1 !important; transform: none !important; }
}
