/* ============================================================
   Furmann Arquitetura — Design System
   v1.0  ·  Editorial minimal, warm neutrals
============================================================ */

:root {
  /* Paper & ink */
  --paper:       #f4f1ea;
  --paper-2:     #ede9df;
  --paper-warm:  #ebe4d4;
  --ink:         #1d1b18;
  --ink-2:       #5a554d;
  --ink-3:       #8a857c;
  --rule:        #d9d4ca;
  --rule-soft:   #e6e1d4;
  --accent:      #b8a382;
  --accent-2:    #8a6f47;
  --night:       #1a1815;

  /* Type */
  --display: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans:    'Instrument Sans', 'Söhne', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Scale */
  --pad-x:   clamp(20px, 4vw, 56px);
  --pad-y:   clamp(28px, 4vw, 48px);
  --max:     1480px;
  --gutter:  clamp(16px, 1.6vw, 28px);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  padding: 0 16px;
  overflow-x: hidden;
}

/* ------------------------------------------------------------
   Editorial frame
   Hairline border inset from the viewport edge. The body's
   horizontal padding pushes all content (including full-bleed
   dark sections) inward by the same amount, so the frame line
   sits in a clean paper gap between the viewport edge and the
   page content.
------------------------------------------------------------ */
body::before {
  content: '';
  position: fixed;
  inset: 8px;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  pointer-events: none;
  z-index: 200;
}

@media (max-width: 600px) {
  body { padding: 0 10px; }
  body::before { inset: 5px; }
}

@media print {
  body { padding: 0; }
  body::before { display: none; }
}

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
}

::selection { background: var(--ink); color: var(--paper); }

/* ============================================================
   Typography
============================================================ */

.display {
  font-family: var(--display);
  font-weight: 300;
  letter-spacing: -0.005em;
  line-height: 0.96;
}
.display em { font-style: italic; font-weight: 300; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.lede {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(20px, 2.2vw, 32px);
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.prose p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 1.25em;
  max-width: 62ch;
}

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.rule-warm { height: 1px; background: var(--ink); opacity: 0.18; border: 0; margin: 0; }

/* ============================================================
   Layout
============================================================ */

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.wide  { max-width: 1640px; margin: 0 auto; padding: 0 var(--pad-x); }
.full  { width: 100%; }

section { padding: clamp(48px, 8vw, 120px) 0; }
.tight  {
  padding-top: clamp(28px, 4vw, 56px);
  padding-bottom: clamp(28px, 4vw, 56px);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

/* ============================================================
   Header / Nav
============================================================ */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-head.is-scrolled { border-bottom-color: var(--rule); }

.site-head .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--pad-x);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand-mark { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-mark svg { width: 28px; height: 28px; display: block; }
.brand-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 36px;
}
.nav a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

.nav-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.nav-cta::after {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* Mobile menu */
.nav-toggle { display: none; }

@media (max-width: 880px) {
  .site-head .inner { grid-template-columns: 1fr auto; }
  .nav, .nav-cta { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--ink);
    background: none; border: 0; padding: 4px; cursor: pointer;
  }
  .nav-toggle .bars { width: 18px; height: 12px; position: relative; }
  .nav-toggle .bars::before, .nav-toggle .bars::after {
    content: ''; position: absolute; left: 0; width: 100%; height: 1px; background: currentColor;
  }
  .nav-toggle .bars::before { top: 2px; }
  .nav-toggle .bars::after { bottom: 2px; }
  .mobile-open .nav, .mobile-open .nav-cta { display: flex; }
  .mobile-open .nav {
    position: fixed; inset: 64px 0 0 0;
    flex-direction: column; align-items: flex-start;
    gap: 0; padding: 32px var(--pad-x); background: var(--paper); z-index: 60;
  }
  .mobile-open .nav a {
    font-family: var(--display); font-size: 36px; letter-spacing: 0;
    text-transform: none; padding: 12px 0; border: 0; color: var(--ink);
  }
}

/* ============================================================
   Buttons / links
============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 14px 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: transform .25s ease, background .25s ease;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn .arrow { width: 14px; height: 14px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 14px 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background .2s ease, color .2s ease;
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
}
.link-arrow:hover { color: var(--accent-2); border-color: var(--accent-2); }
.link-arrow svg { width: 14px; height: 14px; transition: transform .25s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ============================================================
   Image placeholders (replace with real photos later)
============================================================ */

.photo {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(120% 80% at 80% 100%, rgba(0,0,0,0.10), transparent 55%),
    linear-gradient(135deg, var(--paper-warm), var(--paper-2));
}
.photo::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 30% 40%, rgba(184,163,130,0.18) 0, transparent 35%),
    radial-gradient(circle at 70% 70%, rgba(29,27,24,0.10) 0, transparent 40%);
  pointer-events: none;
}
.photo .ph-label {
  position: absolute;
  left: 18px; bottom: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--paper);
  padding: 6px 10px;
  border: 1px solid var(--rule);
  z-index: 2;
}
.photo .ph-index {
  position: absolute;
  right: 18px; top: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--ink-3);
  z-index: 2;
}
.photo.dark {
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255,255,255,0.06), transparent 60%),
    linear-gradient(135deg, #2a2522, #15110d);
}
.photo.dark .ph-label { background: var(--night); color: #c8bfae; border-color: #2a2520; }
.photo.dark .ph-index { color: #847868; }

.photo .ph-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
}
.photo .ph-icon svg { width: 32%; height: 32%; opacity: 0.18; color: var(--ink); }
.photo.dark .ph-icon svg { color: #c8bfae; opacity: 0.16; }

.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.aspect-4-5  { aspect-ratio: 4 / 5; }
.aspect-3-4  { aspect-ratio: 3 / 4; }
.aspect-4-3  { aspect-ratio: 4 / 3; }
.aspect-5-4  { aspect-ratio: 5 / 4; }
.aspect-3-2  { aspect-ratio: 3 / 2; }
.aspect-16-9 { aspect-ratio: 16 / 9; }
.aspect-1-1  { aspect-ratio: 1 / 1; }

/* ============================================================
   Footer (shared)
============================================================ */

.site-foot {
  background: var(--night);
  color: #cfc6b3;
  padding: clamp(60px, 8vw, 110px) var(--pad-x) 32px;
  margin-top: clamp(60px, 8vw, 120px);
}
.site-foot .inner { max-width: var(--max); margin: 0 auto; }
.site-foot .top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--gutter);
  align-items: start;
  padding-bottom: 72px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.site-foot h3 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.95;
  margin: 0 0 32px;
  color: #f0e7d2;
  letter-spacing: -0.005em;
}
.site-foot .label { color: #847868; margin-bottom: 14px; }
.site-foot .col p, .site-foot .col a {
  font-size: 14px; line-height: 1.7; color: #cfc6b3; display: block;
}
.site-foot .col a:hover { color: var(--accent); }

.site-foot .bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #847868;
}
.site-foot .bottom .brand-mark { color: #cfc6b3; }
.site-foot .bottom .brand-name { color: #cfc6b3; }

@media (max-width: 880px) {
  .site-foot .top { grid-template-columns: 1fr 1fr; gap: 36px var(--gutter); }
  .site-foot h3 { grid-column: 1 / -1; }
}

/* ============================================================
   Misc utilities
============================================================ */

.row { display: flex; }
.col { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mt-32  { margin-top: 32px; }
.mt-48  { margin-top: 48px; }
.mt-64  { margin-top: 64px; }
.mt-96  { margin-top: 96px; }
.mb-8   { margin-bottom: 8px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.mb-32  { margin-bottom: 32px; }
.mb-48  { margin-bottom: 48px; }

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 48px 0;
}
.divider::before, .divider::after {
  content: ''; height: 1px; background: var(--rule);
}
.divider .glyph { color: var(--accent); }

/* ============================================================
   Fade-up animation on scroll (subtle)
============================================================ */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
