:root {
  --ink: #1a1a18;
  --stone: #5c5c58;
  --cream: #f7f5f0;
  --paper: #fafaf8;
  --hairline: #e3e1da;
  --overlay: rgba(22, 25, 22, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* Header */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 5vw;
}

.site-header.light {
  position: static;
  border-bottom: 1px solid var(--hairline);
}

.site-header img.logo { height: 76px; width: auto; }

.header-nav { display: flex; align-items: center; gap: 2.25rem; font-size: 0.95rem; }
.header-nav a.page-link { text-decoration: none; color: var(--stone); }
.header-nav a.page-link:hover { color: var(--ink); }
.header-icons { display: flex; align-items: center; gap: 1.1rem; margin-left: 1.25rem; }
.header-icons a { color: var(--stone); }
.header-icons a:hover { color: var(--ink); }
.header-icons svg { width: 22px; height: 22px; }

/* Hero (home) */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: var(--cream);
}
.hero::before { content: ''; position: absolute; inset: 0; background: var(--overlay); }
.hero-inner {
  position: relative;
  z-index: 2;
  padding: 0 5vw 4vw;
  max-width: 940px;
  margin: 0 auto;
}

.hero-quote {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.4;
  margin: 0 0 3rem;
}

.etymology { font-size: 0.95rem; line-height: 1.9; text-align: center; }
.etymology .word { letter-spacing: 0.25em; font-weight: 600; font-size: 1rem; margin-bottom: 0.35rem; }
.etymology .phon { font-style: italic; opacity: 0.85; }

/* CTA band */
.cta-band { background: var(--paper); padding: 5rem 5vw 3.5rem; border-top: 1px solid var(--hairline); }
.cta-band h2 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: clamp(1.6rem, 2.5vw, 2.1rem); margin: 0 0 1rem; }
.cta-band p { max-width: 520px; color: var(--stone); margin: 0 0 2.5rem; line-height: 1.6; }
.cta-footer-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.9rem; color: var(--stone); }
.cta-footer-row .icons { display: flex; gap: 1rem; }
.cta-footer-row .icons svg { width: 17px; height: 17px; }

/* Content pages */
.page-wrap { padding: 3.5rem 5vw 0; max-width: 1180px; margin: 0 auto; }
.page-eyebrow { font-family: 'Playfair Display', Georgia, serif; font-weight: 400; font-size: 1.7rem; margin: 0 0 0.5rem; }
.page-subhead { font-weight: 700; margin: 0 0 2rem; }

/* Services: two-column with accordion */
.services-two-col { display: grid; grid-template-columns: 1fr 1fr; column-gap: 7rem; border-top: 1px solid var(--hairline); padding-top: 2.5rem; margin-bottom: 2rem; }
.services-intro .page-eyebrow { margin-bottom: 0.75rem; }
.services-subhead { font-weight: 700; font-size: 1.1rem; margin: 0 0 2rem; }
.kw-line { color: var(--stone); line-height: 1.8; font-size: 1.02rem; margin: 0 0 1.75rem; }
.kw-line strong { color: var(--ink); font-weight: 700; }

.accordion { border-top: 1px solid var(--hairline); margin-bottom: 2rem; }
.acc-item { border-bottom: 1px solid var(--hairline); }
.acc-header {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--ink);
  text-align: left;
}
.acc-header .chev { width: 16px; height: 16px; flex-shrink: 0; transition: transform 0.25s ease; }
.acc-item.open .acc-header .chev { transform: rotate(180deg); }
.acc-panel { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.acc-item.open .acc-panel { max-height: 1400px; }
.acc-panel-inner { padding: 0 0 2.25rem; }
.acc-panel-inner .group-label { font-weight: 700; font-size: 0.95rem; color: var(--ink); margin: 0 0 0.9rem; }
.acc-panel-inner .group-label + .group-label, .acc-panel-inner ul + .group-label { margin-top: 1.6rem; }
.acc-panel-inner ul { list-style: disc; padding-left: 1.3rem; margin: 0; }
.acc-panel-inner li { font-family: 'Playfair Display', Georgia, serif; font-style: italic; color: var(--stone); font-size: 0.95rem; line-height: 1.65; padding: 0.1rem 0; }
.acc-panel-inner p.plain { font-family: 'Playfair Display', Georgia, serif; font-style: italic; color: var(--stone); font-size: 0.95rem; line-height: 1.65; margin: 0; }

/* Team */
.team-headline { font-family: 'Playfair Display', Georgia, serif; font-weight: 500; font-size: clamp(1.8rem, 3vw, 2.4rem); max-width: 640px; margin: 0 0 4rem; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem 1.75rem; margin-bottom: 4rem; }
.team-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; margin-bottom: 1rem; background: var(--hairline); }
.team-card h4 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: 1.05rem; margin: 0 0 0.35rem; }
.team-card .role { font-size: 0.78rem; letter-spacing: 0.02em; color: var(--stone); text-transform: uppercase; }

/* About */
.about-body { max-width: 760px; margin: 4rem 0 5rem; }
.about-body p { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-weight: 400; font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.6; margin: 0 0 1.75rem; }

/* Resources (assets page — net-new) */
.intro-copy { max-width: 720px; font-size: 1.05rem; line-height: 1.7; color: var(--stone); margin: 0 0 3.5rem; }
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; border-top: 1px solid var(--hairline); padding-top: 2.5rem; margin-bottom: 4rem; }
.resource-card { border: 1px solid var(--hairline); padding: 1.75rem; display: flex; flex-direction: column; background: #fff; }

/* Uniform image frame — all three cards share the same height; images fit inside (contain) */
.resource-card .thumb-frame {
  width: 100%; height: 200px; margin-bottom: 1.5rem;
  border: 1px solid var(--hairline); background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: zoom-in;
}
.resource-card .thumb-frame img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; display: block;
  box-shadow: 0 2px 10px rgba(26,26,24,0.10);
}
/* Placeholder frame (Rocketship — no image yet) */
.resource-card .thumb-frame.placeholder {
  cursor: default;
  background: linear-gradient(160deg, #f4f2ee 0%, #eceae4 100%);
  flex-direction: column; gap: 0.5rem;
}
.resource-card .thumb-frame.placeholder .ph-mark {
  font-family: 'Playfair Display', Georgia, serif; font-size: 1.4rem; color: #b8b4ab; letter-spacing: 0.02em;
}
.resource-card .thumb-frame.placeholder .ph-sub {
  font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: #b8b4ab; font-weight: 700;
}
.resource-card h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: 1.15rem; margin: 0 0 0.75rem; }
.resource-card p { color: var(--stone); font-size: 0.92rem; line-height: 1.6; margin: 0 0 1.5rem; flex-grow: 1; }
.resource-card a.card-link { font-size: 0.85rem; font-weight: 600; text-decoration: underline; align-self: flex-start; }
.resource-card .soon { font-size: 0.85rem; font-weight: 600; color: var(--stone); align-self: flex-start; }
.bespoke-block { max-width: 720px; border-top: 1px solid var(--hairline); padding-top: 2.5rem; margin-bottom: 3rem; }
.bespoke-block p { font-size: 1.05rem; line-height: 1.7; color: var(--stone); margin: 0 0 1.5rem; }
.bespoke-block p strong { color: var(--ink); }
.consult-cta { display: inline-block; background: var(--ink); color: var(--cream); padding: 0.9rem 1.75rem; font-size: 0.95rem; font-weight: 600; text-decoration: none; margin-top: 0.5rem; }
.consult-cta:hover { opacity: 0.88; }

@media (max-width: 900px) {
  .services-two-col { grid-template-columns: 1fr; column-gap: 0; row-gap: 2.5rem; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .resource-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Mobile polish (≤600px) ---------- */
@media (max-width: 600px) {
  /* Header: smaller logo, tidy wrapping nav, comfortable tap targets */
  .site-header { padding: 1.1rem 6vw; flex-direction: column; align-items: flex-start; gap: 0.9rem; }
  .site-header img.logo { height: 46px; }
  .header-nav { flex-wrap: wrap; gap: 1.1rem 1.4rem; font-size: 1rem; width: 100%; }
  .header-nav a.page-link { padding: 0.25rem 0; }
  .header-icons { display: none; }

  /* Hero: full viewport on mobile — content anchored to the bottom.
     Use dvh so it tracks the address bar/toolbar as they show/hide (prevents the CTA peeking). svh is the fallback. */
  .hero { min-height: 100svh; min-height: 100dvh; align-items: flex-end; }
  .hero-inner { padding: 6rem 6vw 1.5rem; width: 100%; }
  .hero-quote { font-size: 1.2rem; line-height: 1.4; margin: 0 0 1.75rem; }
  .etymology { font-size: 0.85rem; line-height: 1.7; }
  .etymology .word { font-size: 0.85rem; letter-spacing: 0.16em; }

  /* CTA / contact band */
  .cta-band { padding: 3.5rem 6vw 3rem; }
  .cta-footer-row { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .cta-footer-row span { word-break: keep-all; overflow-wrap: normal; }

  /* Content pages */
  .page-wrap { padding: 2.5rem 6vw 0; }
  .about-body { margin: 1.5rem 0 3rem; }
  .team-grid { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: 1fr; }

  /* Keep email + long tokens from breaking mid-word anywhere */
  a[href^="mailto:"] { word-break: keep-all; overflow-wrap: normal; white-space: nowrap; }
}

/* Prevent the contact line's email from splitting across lines on any small screen */
.cta-footer-row span { overflow-wrap: normal; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Checklist viewer */
.viewer-wrap { max-width: 860px; margin: 0 auto; padding: 3rem 5vw 4rem; }
.viewer-wrap .page-eyebrow { margin-bottom: 0.35rem; }
.viewer-intro { color: var(--stone); line-height: 1.6; margin: 0 0 2.5rem; max-width: 640px; }
.pdf-page { margin-bottom: 1.75rem; }
.pdf-page img { width: 100%; display: block; border: 1px solid var(--hairline); box-shadow: 0 6px 24px rgba(26, 26, 24, 0.08); }
.viewer-footer { border-top: 1px solid var(--hairline); padding-top: 2rem; margin-top: 2.5rem; }
.viewer-footer p { color: var(--stone); line-height: 1.6; max-width: 560px; margin: 0 0 1.5rem; }
.viewer-footer .small-link { font-size: 0.85rem; color: var(--stone); text-decoration: underline; margin-left: 1.5rem; }

/* Lightbox for zoomable previews */
.lightbox { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(20,20,18,0.88); cursor: zoom-out; align-items: center; justify-content: center; padding: 4vh 4vw; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 92vh; box-shadow: 0 12px 48px rgba(0,0,0,0.5); border: 1px solid rgba(247,245,240,0.15); }

/* Checklist gallery lightbox */
.cl-lightbox { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(20,20,18,0.90); align-items: center; justify-content: center; padding: 3vh 3vw; }
.cl-lightbox.open { display: flex; }
.cl-lightbox img { max-width: 90%; max-height: 94vh; box-shadow: 0 12px 48px rgba(0,0,0,0.5); border: 1px solid rgba(247,245,240,0.15); cursor: zoom-out; }
.cl-nav { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: none; color: #f7f5f0; font-size: 3.5rem; line-height: 1; cursor: pointer; padding: 0 1.5rem; opacity: 0.7; transition: opacity 0.2s; user-select: none; }
.cl-nav:hover { opacity: 1; }
.cl-prev { left: 1vw; }
.cl-next { right: 1vw; }
.cl-counter { position: absolute; bottom: 3vh; left: 50%; transform: translateX(-50%); color: #cfcabb; font-size: 0.85rem; letter-spacing: 0.05em; }
.pdf-page img { cursor: zoom-in; }
@media (max-width: 600px) { .cl-nav { font-size: 2.4rem; padding: 0 0.75rem; } }
