/* ============================================================
   Principle — Workplace ethics design system
   Refined, trustworthy, editorial. Ivory · slate · antique gold.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #fbf9f4;
  --bg-2: #f2eee5;
  --card: #ffffff;
  --ink: #232a33;
  --ink-soft: #4b5259;
  --ink-faint: #868c91;
  --line: #e7e1d6;
  --line-strong: #c6bfae;
  --gold: #a9823c;         /* antique gold / brass */
  --gold-dark: #8a6827;
  --gold-soft: #f3ead6;
  --emerald: #1e5c4f;      /* integrity / doing right */
  --emerald-soft: #e4efe9;

  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --max: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 30px 70px -38px rgba(35, 42, 51, 0.4);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 1.2em; }
li { margin-bottom: 0.45em; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--gold); color: #fff; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(68px, 9vw, 126px); }
.section--tight { padding-block: clamp(46px, 6vw, 78px); }
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-12 { grid-template-columns: repeat(12, 1fr); }
.col-7 { grid-column: span 7; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-4 { grid-column: span 4; }
@media (max-width: 880px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-12 > * { grid-column: span 12; }
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.005em;
  color: var(--ink);
}
h1 { font-size: clamp(2.7rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
h4 { font-size: 1.08rem; font-weight: 600; font-family: var(--body); }
h1 em, h2 em { font-style: italic; color: var(--gold-dark); }
.lede { font-size: clamp(1.16rem, 1.7vw, 1.38rem); line-height: 1.6; color: var(--ink-soft); font-family: var(--display); }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.small { font-size: 0.9rem; }

.kicker {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.kicker::before { content: ""; width: 26px; height: 1px; background: var(--gold); }

.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 1.9em; }
.prose h3 { margin-top: 1.6em; }
.prose a { color: var(--gold-dark); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--gold); }
.prose ul, .prose ol { margin-top: 0.8em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.95em 1.6em;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.22s var(--ease), background 0.22s, color 0.22s, border-color 0.22s;
  white-space: nowrap;
}
.btn .arr { transition: transform 0.22s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--gold-dark); transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: #fff; }
.btn--gold:hover { background: var(--gold-dark); transform: translateY(-2px); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-dark); transform: translateY(-2px); }
.btn--lg { padding: 1.1em 1.85em; font-size: 1.04rem; }

.link-arrow { font-weight: 600; color: var(--gold-dark); display: inline-flex; align-items: center; gap: 0.5em; }
.link-arrow .arr { transition: transform 0.22s var(--ease); }
.link-arrow:hover .arr { transform: translateX(5px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 249, 244, 0.94);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.7em; font-family: var(--display); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.01em; }
.brand .mark { width: 32px; height: 32px; flex: none; }
.brand small { display: block; font-family: var(--mono); font-size: 0.56rem; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: clamp(1.1rem, 2vw, 2.1rem); list-style: none; padding: 0; margin: 0; }
.nav-links li { margin: 0; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); position: relative; padding: 0.3em 0; transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--gold-dark); }
.nav-links a.active::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 2px; background: var(--gold); }
.nav-cta { display: flex; align-items: center; gap: 0.9rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 6px; width: 42px; height: 42px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
@media (max-width: 960px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links { display: flex; flex-direction: column; position: absolute; top: 76px; left: 0; right: 0; background: var(--card); border-bottom: 1px solid var(--line); padding: 1.4rem var(--gutter) 2rem; align-items: flex-start; gap: 1rem; }
  .nav.open .nav-links a { font-size: 1.12rem; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(56px, 8vw, 108px) clamp(44px, 6vw, 82px); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4.6rem); align-items: center; }
.hero h1 { margin-top: 1.1rem; }
.hero .lede { margin-top: 1.4rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 0.8rem; margin-top: 2.1rem; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 1.6rem; margin-top: 1.9rem; flex-wrap: wrap; font-size: 0.86rem; color: var(--ink-faint); }
.hero-trust span { display: inline-flex; align-items: center; gap: 0.5em; }
.hero-trust span::before { content: ""; width: 5px; height: 5px; background: var(--gold); border-radius: 50%; }
.hero-figure { position: relative; }
.photo-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--bg-2); }
.photo-frame img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.pillar-badge { position: absolute; background: var(--ink); color: #fff; border-radius: 8px; padding: 0.6rem 0.95rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.04em; }
.pillar-badge b { color: var(--gold); }
.pb-1 { top: -16px; right: 22px; }
.pb-2 { bottom: -16px; left: -8px; }
@media (max-width: 880px) { .hero-inner { grid-template-columns: 1fr; } .pb-1, .pb-2 { position: static; margin-top: 12px; display: inline-block; margin-right: 8px; } }

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-strong); }
.pillar { padding: 2.2rem 2rem 2.2rem 0; border-bottom: 1px solid var(--line-strong); }
.pillar + .pillar { padding-left: 2rem; border-left: 1px solid var(--line); }
.pillar .p-num { font-family: var(--display); font-size: 1.1rem; font-style: italic; color: var(--gold-dark); }
.pillar h3 { margin-top: 1rem; font-size: 1.5rem; }
.pillar p { color: var(--ink-soft); margin-top: 0.7rem; font-size: 0.98rem; }
@media (max-width: 880px) { .pillars { grid-template-columns: 1fr; } .pillar { padding-left: 0 !important; border-left: 0 !important; } }

/* ---------- Section head ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: clamp(2.4rem, 5vw, 3.6rem); }
.section-head h2 { margin-top: 0.9rem; max-width: 24ch; }
.section-head .aside { max-width: 44ch; color: var(--ink-soft); }
@media (max-width: 880px) { .section-head { flex-direction: column; align-items: flex-start; } }

/* ---------- Service index ---------- */
.svc-list { border-top: 1px solid var(--line-strong); }
.svc-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 1.5rem; align-items: center; padding: 1.8rem 0.4rem; border-bottom: 1px solid var(--line-strong); transition: padding 0.3s var(--ease), background 0.3s; }
.svc-row:hover { padding-left: 1.1rem; background: var(--gold-soft); }
.svc-row .idx { font-family: var(--display); font-style: italic; font-size: 1.35rem; color: var(--gold-dark); }
.svc-row h3 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); }
.svc-row p { color: var(--ink-soft); margin-top: 0.35rem; max-width: 58ch; }
.svc-row .go { color: var(--ink); display: flex; align-items: center; gap: 0.4em; font-weight: 600; }
.svc-row:hover .go { color: var(--gold-dark); }
@media (max-width: 700px) { .svc-row { grid-template-columns: 64px 1fr; } .svc-row .go { grid-column: 2; } }

/* ---------- Work cards ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.work-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.25s var(--ease), box-shadow 0.25s; }
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.work-card .thumb { border-bottom: 1px solid var(--line); background: var(--bg-2); }
.work-card .thumb img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.work-card .body { padding: 1.6rem 1.7rem 1.7rem; display: flex; flex-direction: column; gap: 0.8rem; flex: 1; }
.work-card .tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.3em 0.8em; color: var(--ink-soft); background: var(--bg); }
.work-card .metric { display: flex; gap: 1.6rem; margin-top: 0.4rem; flex-wrap: wrap; }
.work-card .metric .num { font-family: var(--display); font-size: 1.7rem; font-weight: 600; color: var(--gold-dark); line-height: 1; }
.work-card .metric .label { font-size: 0.8rem; color: var(--ink-faint); }
.work-card .b-foot { margin-top: auto; }
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; } }

/* ---------- Feature case (detail) ---------- */
.case-detail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3.6rem); align-items: start; padding-block: clamp(1.7rem, 3vw, 2.7rem); border-bottom: 1px solid var(--line); }
.case-detail:first-of-type { border-top: 1px solid var(--line); }
.case-detail .thumb { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.case-detail .thumb img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.case-detail .tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.case-detail .metric { display: flex; gap: 2rem; margin-top: 1.4rem; flex-wrap: wrap; }
.case-detail .metric .num { font-family: var(--display); font-size: 2rem; font-weight: 600; color: var(--gold-dark); line-height: 1; }
.case-detail .metric .label { font-size: 0.8rem; color: var(--ink-faint); }
@media (max-width: 860px) { .case-detail { grid-template-columns: 1fr; } }

/* ---------- Pull quote ---------- */
.pull-quote { border-left: 2px solid var(--gold); padding: 0.6rem 0 0.6rem 1.8rem; font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 500; font-style: italic; line-height: 1.25; color: var(--ink); }
.pull-quote cite { display: block; margin-top: 1.1rem; font-family: var(--body); font-size: 0.92rem; color: var(--ink-faint); font-style: normal; }

/* ---------- Process steps ---------- */
.stage-list { border-top: 1px solid var(--line-strong); }
.stage { position: relative; padding: 1.9rem 0 1.9rem 84px; border-bottom: 1px solid var(--line); }
.stage .num { position: absolute; left: 0; top: 1.9rem; width: 60px; height: 60px; border: 1px solid var(--gold); border-radius: 50%; background: var(--card); color: var(--gold-dark); font-family: var(--display); font-style: italic; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; }
.stage h3 { margin-bottom: 0.5rem; }
.stage p { color: var(--ink-soft); max-width: 72ch; }
@media (max-width: 560px) { .stage { padding-left: 0; } .stage .num { position: static; margin-bottom: 0.8rem; } }

/* ---------- Dark band ---------- */
.dark-band { background: var(--ink); color: #fff; border-radius: var(--radius); padding: clamp(2.8rem, 6vw, 5rem); position: relative; overflow: hidden; }
.dark-band::after { content: ""; position: absolute; right: -80px; top: -80px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(169,130,60,0.45), transparent 70%); }
.dark-band .kicker { color: #d8bc82; }
.dark-band h2 { color: #fff; margin-top: 0.9rem; max-width: 22ch; }
.dark-band p { color: rgba(255,255,255,0.76); margin-top: 1.1rem; max-width: 56ch; }
.dark-band .btn { margin-top: 1.7rem; }
.dark-band .btn--primary { background: var(--gold); color: #fff; }
.dark-band .btn--primary:hover { background: #fff; color: var(--ink); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea, .field select { background: var(--card); border: 1px solid var(--line-strong); border-radius: 6px; padding: 0.8em 1em; transition: border-color 0.2s, box-shadow 0.2s; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.field textarea { resize: vertical; min-height: 140px; }
.checkbox { display: flex; gap: 0.7em; align-items: flex-start; font-size: 0.88rem; color: var(--ink-soft); }
.checkbox input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--gold); flex: none; }
.form-note { font-size: 0.82rem; color: var(--ink-faint); }
.form-success { background: var(--gold-soft); border: 1px solid var(--gold); color: var(--gold-dark); border-radius: 6px; padding: 1.2rem 1.4rem; margin-top: 1rem; display: none; }
.form-success.show { display: block; }

/* ---------- Map ---------- */
.map-shell { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: 420px; background: var(--bg-2); }
.map-shell iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Info list ---------- */
.info-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.info-item { display: grid; grid-template-columns: 130px 1fr; gap: 1rem; padding: 1.15rem 1.5rem; border-bottom: 1px solid var(--line); }
.info-item:last-child { border-bottom: 0; }
.info-item .k { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); padding-top: 2px; }
.info-item .v a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) { .info-item { grid-template-columns: 1fr; gap: 0.2rem; } }

/* ---------- Notice ---------- */
.notice { background: var(--gold-soft); border: 1px solid #e8d5a8; border-radius: 8px; padding: 1.15rem 1.35rem; font-size: 0.92rem; color: #6f5316; }
.notice strong { display: block; margin-bottom: 0.3rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.76); margin-top: clamp(48px, 8vw, 96px); padding-block: clamp(3rem, 6vw, 5rem) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,0.13); }
.footer-brand .brand { color: #fff; }
.footer-brand .brand small { color: rgba(255,255,255,0.5); }
.footer-brand p { margin-top: 1.2rem; max-width: 34ch; font-size: 0.95rem; }
.footer-col h4 { color: #fff; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 400; margin-bottom: 1.2rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 0 0 0.7rem; }
.footer-col a { font-size: 0.95rem; color: rgba(255,255,255,0.72); transition: color 0.2s; }
.footer-col a:hover { color: #d8bc82; }
.footer-col address { font-style: normal; font-size: 0.95rem; line-height: 1.7; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.6rem; font-size: 0.82rem; color: rgba(255,255,255,0.5); }
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: #fff; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Cookie banner ---------- */
.cookie-banner { position: fixed; left: var(--gutter); right: var(--gutter); bottom: 18px; max-width: 560px; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem 1.5rem; z-index: 90; display: none; gap: 1rem; flex-direction: column; }
.cookie-banner.show { display: flex; }
.cookie-banner p { font-size: 0.88rem; color: var(--ink-soft); }
.cookie-banner .cookie-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.cookie-banner .btn { font-size: 0.88rem; padding: 0.7em 1.1em; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Page hero (interior) ---------- */
.page-hero { padding-block: clamp(58px, 8vw, 100px) clamp(40px, 5vw, 66px); border-bottom: 1px solid var(--line); }
.page-hero .kicker { margin-bottom: 1rem; }
.page-hero h1 { max-width: 22ch; }
.page-hero .lede { margin-top: 1.3rem; max-width: 62ch; }
.page-meta { display: flex; gap: 2rem; margin-top: 2rem; flex-wrap: wrap; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }

/* ---------- Editorial two-col ---------- */
.editorial { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); }
@media (max-width: 860px) { .editorial { grid-template-columns: 1fr; } }

/* ---------- TOC ---------- */
.toc { position: sticky; top: 100px; }
.toc ul { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 0.55em 1.2em; font-size: 0.92rem; color: var(--ink-soft); border-left: 1px solid transparent; margin-left: -1px; transition: color 0.2s, border-color 0.2s; }
.toc a:hover { color: var(--ink); border-color: var(--gold); }

/* ---------- Value rows ---------- */
.value { border-top: 1px solid var(--line); padding: 1.7rem 0; display: grid; grid-template-columns: 1fr 1.2fr; gap: 2rem; }
.value:last-child { border-bottom: 1px solid var(--line); }
.value h3 { color: var(--gold-dark); }
.value p { color: var(--ink-soft); }
@media (max-width: 700px) { .value { grid-template-columns: 1fr; gap: 0.6rem; } }

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