/*
  Cole — portfolio site stylesheet
  Palette + type system lifted from the Casa Revista DESIGN.md token spec
  (forest green + gold on cream paper, Playfair Display headings / Inter body).
  Self-contained: local fonts only, no CDN, no framework.
*/

/* ---------- Self-hosted fonts (no external fetch) ---------- */

@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/playfair-display-var.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens (Casa Revista DESIGN.md) ---------- */

:root {
  --forest: #2d5a3d;
  --forest-strong: #244a31;
  --forest-deep: #1c3a27;
  --forest-soft: #5f8f6c;
  --forest-300: #8ab094;
  --forest-100: #d8e6db;
  --forest-50: #eef4ef;

  --gold: #b8956a;
  --gold-600: #a67f52;
  --gold-200: #e6d9c2;
  --gold-50: #fbf8f3;

  --canvas: #f7f3ec;
  --surface: #faf7f2;
  --white: #ffffff;
  --ink: #2d2d3a;
  --ink-soft: #4a4a58;
  --muted: #6b6b7b;
  --faint: #8a8a96;
  --line: #e5e0d8;
  --line-soft: #f0ede8;

  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --radius: 8px;
  --radius-sm: 4px;
  --shadow: 0 2px 4px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .06);
  --shadow-lift: 0 4px 10px rgba(0, 0, 0, .05), 0 20px 48px rgba(0, 0, 0, .08);
  --maxw: 1120px;
  --measure: 62ch;
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
h4 { font-size: 1.05rem; letter-spacing: -0.01em; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--forest-strong); text-decoration: underline; text-underline-offset: 3px; }

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

hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Layout primitives ---------- */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--paper { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--forest {
  background: var(--forest);
  color: var(--forest-100);
  border-top: 1px solid var(--forest-strong);
  border-bottom: 1px solid var(--forest-strong);
}
.section--forest h2,
.section--forest h3,
.section--forest h4 { color: var(--white); }
.section--forest a { color: var(--white); }

.eyebrow {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .6rem;
}
.eyebrow--gold { color: var(--gold-600); }
.eyebrow--forest { color: var(--forest); }
.section--forest .eyebrow { color: var(--forest-300); }

.lead {
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: var(--measure);
}
.section--forest .lead { color: var(--forest-100); }

.body-copy { color: var(--ink-soft); max-width: var(--measure); }

.rule-gold { width: 48px; height: 2px; background: var(--gold); border-radius: 1px; margin: 1.25rem 0; }

.section-head { margin-bottom: 2.5rem; }
.section-head .lead { margin-top: .9rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.2;
  padding: 13px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--forest); color: var(--surface); }
.btn--primary:hover { background: var(--forest-soft); color: var(--surface); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--forest-soft); color: var(--forest); text-decoration: none; }
.section--forest .btn--primary { background: var(--surface); color: var(--forest); }
.section--forest .btn--primary:hover { background: var(--gold-200); color: var(--forest-strong); }
.section--forest .btn--ghost { color: var(--white); border-color: rgba(255, 255, 255, .35); }
.section--forest .btn--ghost:hover { border-color: var(--white); color: var(--white); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.75rem; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 243, 236, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav__brand {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.nav__brand:hover { text-decoration: none; color: var(--forest); }
.nav__brand .dot { color: var(--gold-600); }
.nav__links { display: flex; flex-wrap: wrap; gap: 4px 22px; align-items: center; }
.nav__links a {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav__links a:hover { color: var(--forest); text-decoration: none; }
.nav__links a[aria-current="page"] { color: var(--forest); }

/* ---------- Hero ---------- */

.hero { padding: 84px 0 60px; position: relative; overflow: hidden; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hero h1 { margin: .4rem 0 0; }
.hero h1 .accent { color: var(--forest); }
.hero .lead { margin-top: 1.4rem; }

.swatches { display: flex; gap: 6px; margin-top: 2rem; flex-wrap: wrap; }
.swatch { width: 34px; height: 10px; border-radius: 2px; border: 1px solid transparent; }

.spec-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
.spec-card__row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.spec-card__row:last-child { border-bottom: 0; }
.spec-chip { width: 20px; height: 20px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, .08); flex: none; }
.spec-name { font-size: .78rem; font-weight: 600; }
.spec-hex { font-size: .72rem; color: var(--faint); }
.spec-role { margin-left: auto; font-size: .72rem; color: var(--muted); text-align: right; }

/* ---------- Verticals strip ---------- */

.verticals { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.75rem; }
.vertical {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-50);
  border: 1px solid var(--gold);
  color: var(--gold-600);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.vertical--lead { background: var(--forest-50); border-color: var(--forest-soft); color: var(--forest); }

/* ---------- Grids & cards ---------- */

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.card--plain { background: var(--canvas); }

/* Offer cards */
.offer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.offer--flag { border-color: var(--forest-soft); box-shadow: var(--shadow); }
.offer__top { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; justify-content: space-between; }
.offer__tier { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.offer__price { font-family: var(--serif); font-size: .98rem; font-weight: 600; color: var(--forest); white-space: nowrap; }
.offer__price small { font-family: var(--sans); font-size: .72rem; font-weight: 500; color: var(--muted); }
.offer__body { color: var(--ink-soft); font-size: .94rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.chip {
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-600);
  background: var(--gold-50);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
}
.flagtag {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--canvas);
  background: var(--forest);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  margin-right: 10px;
  vertical-align: middle;
}

/* How it works — step flow */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
}
.step__n {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: .5rem;
}
.step p { font-size: .9rem; color: var(--ink-soft); margin-top: .5rem; }
.section--forest .step { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .16); }
.section--forest .step p { color: var(--forest-100); }
.section--forest .step__n { color: var(--gold-200); }

/* Checklists */
.check { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check li { position: relative; padding-left: 26px; font-size: .94rem; color: var(--ink-soft); }
.check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 17px;
  height: 17px;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--canvas);
  color: var(--forest);
  font-size: .62rem;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}
.check strong { color: var(--ink); font-weight: 600; }
.section--forest .check li { color: var(--forest-100); }
.section--forest .check li::before { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: var(--white); }
.section--forest .check strong { color: var(--white); }

/* ---------- Work gallery ---------- */

.work-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: start;
}
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.work-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.work-item__thumb {
  display: block;
  background: var(--line-soft);
  border-bottom: 1px solid var(--line);
}
.work-item__thumb img { width: 100%; height: auto; }
.work-item__meta { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.work-item__meta h3 { font-size: 1.05rem; }
.work-item__meta p { font-size: .86rem; color: var(--muted); }
.work-item__links { margin-top: auto; padding-top: 8px; font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.work-item__links a { margin-right: 14px; }

.thumb-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.thumb-frame img { border-radius: var(--radius-sm); }
.caption { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-top: .8rem; }
.small-note { font-size: .82rem; color: var(--muted); }

/* ---------- Contact ---------- */

.contact { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.contact-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.contact-list li:last-child { border-bottom: 0; }
.contact-key {
  min-width: 96px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-val { font-size: 1rem; font-weight: 500; color: var(--ink); word-break: break-word; }
.contact-val a { font-weight: 500; }

.ph-flag {
  display: inline-block;
  margin-left: 8px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8a2e3e;
  background: #fdf2f4;
  border: 1px solid #e59aa5;
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  vertical-align: middle;
}

.notice {
  background: var(--gold-50);
  border: 1px solid var(--gold);
  border-left-width: 3px;
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: .88rem;
  color: var(--ink-soft);
}
.notice strong { color: var(--ink); }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 36px 0 44px;
  font-size: .82rem;
  color: var(--muted);
}
.footer__inner { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: baseline; }
.footer__brand { font-family: var(--serif); font-size: .95rem; font-weight: 600; color: var(--forest); }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--forest); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero { padding: 60px 0 44px; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-feature { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .section { padding: 52px 0; }
  .wrap { padding: 0 18px; }
  .nav__inner { padding: 12px 18px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .nav__links { gap: 4px 16px; }
  .grid--2, .grid--3, .flow, .gallery { grid-template-columns: minmax(0, 1fr); }
  .spec-role { display: none; }
  .offer__top { justify-content: flex-start; }
}

/* ---------- Print ---------- */

@media print {
  :root { --canvas: #ffffff; --surface: #ffffff; }
  .nav, .btn-row, .footer { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding: 18pt 0; break-inside: avoid; }
  .section--forest { background: #fff; color: #000; border-color: #999; }
  .section--forest h2, .section--forest h3, .section--forest h4, .section--forest .lead,
  .section--forest .step p, .section--forest .check li { color: #000; }
  .card, .offer, .step, .work-item { box-shadow: none !important; break-inside: avoid; }
  .hero::after { display: none; }
  a { color: #000; text-decoration: underline; }
  .hero__grid, .contact, .work-feature, .grid--3, .grid--2 { grid-template-columns: 1fr 1fr; }
}
