/* ──────────────────────────────────────────────────────────────────────────
   sarallanes.com — theme + layout layer
   Loads AFTER reveal-base.css. reveal-base.css provides the design tokens and
   canonical classes (.section-eyebrow, .section-title, .hero-title,
   .btn-primary, .btn-outline, .pull-quote, .label-chip, fadeUp).
   This file adds: Sara's color overrides, page structure (header, hero, bands,
   cards, footer), and the section-cover photo mechanism.
   ────────────────────────────────────────────────────────────────────────── */

/* ===========================================================================
   1. BRAND COLOR CONTROLS  ←  EDIT THESE to retune the whole site
   Defaults start from reveal's palette but a touch lighter (ivory base instead
   of eggshell). Every surface below references these, so changing them here
   re-skins every page that uses this stylesheet.
   =========================================================================== */
:root {
  /* ----- WARM NEUTRAL PALETTE -----
     Overrides reveal-base's tokens so every class recolors from here.
     Soft, warm, architectural; headings intentionally NOT near-black. */
  --ivory:      #F4EDE0;            /* page base — warm oatmeal cream           */
  --eggshell:   #F4EDE0;
  --linen:      #EADFCC;            /* section tint band — linen                */
  --parchment:  #E4D8C3;
  --stone:      #D7CCBA;
  --taupe:      #B3A892;
  --charcoal:   #463F35;            /* headings/primary — warm espresso-ink     */
  --slate:      #6E6557;            /* secondary text — warm greige             */
  --cognac:     #9C6E4B;            /* camel / terracotta accent                 */
  --cognac-dim: rgba(156,110,75,0.12);
  --gold:       #B08D4F;            /* antique gold — muted                      */
  --gold-rule:  rgba(176,141,79,0.32);
  --gold-light: rgba(176,141,79,0.15);
  --olive:      #55543B;            /* signature drab-olive band                 */
  --olive-deep: #403F2C;            /* deep olive — footer                       */
  --espresso:   #332C24;            /* warm espresso — photo overlay             */
  --slate-deep: var(--espresso);
  --slate-mid:  #4A4836;

  /* ----- SEMANTIC ROLES (reference the palette above) ----- */
  --page-bg:       var(--ivory);
  --band-tint:     var(--linen);
  --card-bg:       #FBF7EE;
  --ink:           var(--charcoal);
  --ink-soft:      var(--slate);
  --accent:        var(--cognac);   /* links / emphasis                         */
  --accent-deep:   #7C5436;         /* deeper terracotta — button fill          */
  --rule:          var(--gold-rule);
  --gold-ink:      var(--gold);
  --ink-band-bg:   var(--olive);    /* dark band → signature olive              */
  --cover-tint:    var(--espresso); /* section-cover photo overlay              */
  --cover-overlay: 0.78;

  /* ----- TYPE CONTROLS (swap any one line) -----
     Body prefers real Avenir if installed locally, else free Mulish.
     Add any non-default face to the Google Fonts <link> in the pages. */
  --font-display:   'Cormorant Garamond', Georgia, serif;        /* headings   */
  --font-editorial: 'Cormorant Garamond', Georgia, serif;        /* italics    */
  --font-body:      'Mulish', sans-serif;                        /* body       */
  --font-label:     'Belleza', sans-serif;                        /* eyebrows  */
}

/* Route reveal-base's canonical classes through the chosen faces + palette. */
.section-title, .hero-title { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; }
.section-title { font-size: clamp(20px, 2.6vw, 30px); line-height: 1.22; letter-spacing: 0.03em; }
.pull-quote { font-family: var(--font-editorial); }
.section-eyebrow, .section-eyebrow--lg, .btn-primary, .btn-outline, .label-chip {
  font-family: var(--font-label); font-weight: 400;
}
/* Oswald is condensed — a touch larger + lighter tracking reads better than mono. */
.section-eyebrow    { font-size: 11px; letter-spacing: 2px;   color: var(--accent-deep); }
.section-eyebrow--lg { font-size: 12px; letter-spacing: 2.5px; color: var(--accent-deep); }
/* Buttons: muted clay fill / cream text — luxe, not loud gold. */
.btn-primary { background: var(--accent-deep); border-color: var(--accent-deep); color: #FBF8F1; }
.btn-primary:hover { background: #69503A; border-color: #69503A; }
.btn-outline { color: var(--ink); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #FBF8F1; }

body {
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
}

/* ===========================================================================
   2. Layout primitives
   =========================================================================== */
.container { max-width: 1120px; margin: 0 auto; padding-left: max(60px, env(safe-area-inset-left)); padding-right: max(60px, env(safe-area-inset-right)); }
.band { position: relative; padding: 5.5rem 0; }
.band + .band { border-top: 1px solid var(--rule); }    /* gold hairline rhythm */
.band--tint { background-color: var(--band-tint); background-image: url('/assets/images/texture-linen.jpg'); background-size: 480px; background-blend-mode: multiply; }

@media (max-width: 760px) {
  .container { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
  .band { padding: 3.4rem 0; }
}

/* Scroll-reveal — gated on html.js so content is ALWAYS visible without JS. */
html.js .reveal { opacity: 0; transform: translateY(18px); }
html.js .reveal.is-in { animation: fadeUp 0.8s ease both; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; animation: none; }
}

/* ===========================================================================
   3. Header / nav
   =========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--page-bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; }
.brand-name { font-family: var(--font-display); font-size: 18px; font-weight: 600; display: block; line-height: 1.1; text-transform: uppercase; letter-spacing: 0.08em; }
.brand-tagline { font-family: var(--font-label); font-size: 8px; letter-spacing: 2px; color: var(--gold-ink); text-transform: uppercase; }
.site-nav { display: flex; gap: 26px; }
.site-nav a {
  font-family: var(--font-label); font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-soft); text-decoration: none;
  transition: color 0.2s;
}
.site-nav a:hover, .site-nav a.is-current { color: var(--accent); }
.nav-checkbox, .nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; }
  .nav-toggle-bar { width: 22px; height: 2px; background: var(--ink); }
  .site-nav {
    position: absolute; top: 64px; right: 0; left: 0;
    flex-direction: column; gap: 0; background: var(--page-bg);
    border-bottom: 1px solid var(--rule); max-height: 0; overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav a { padding: 14px 24px; border-top: 1px solid var(--rule); }
  .nav-checkbox:checked ~ .container .site-nav { max-height: 60vh; }
}

/* ===========================================================================
   4. Hero
   =========================================================================== */
.hero { padding: 4.6rem 0 4rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3.2rem; align-items: start; }
.hero-copy .section-eyebrow { display: block; margin-bottom: 18px; }
.hero-title { font-size: clamp(30px, 4.4vw, 54px); line-height: 1.1; letter-spacing: 0.02em; margin-bottom: 22px; }
.lead { font-family: var(--font-body); font-size: 15px; line-height: 1.8; color: var(--ink-soft); margin-bottom: 16px; max-width: 40em; }
.lead strong { color: var(--ink); font-weight: 500; }
.action-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }
.credential-line { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 18px; }
.credential-line span {
  font-family: var(--font-label); font-size: 9px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--ink-soft);
}
.credential-line span:not(:last-child)::after { content: "·"; margin-left: 16px; color: var(--gold-ink); }
.hero-thesis { font-family: var(--font-editorial); font-style: italic; font-size: 16px; color: var(--accent); padding-left: 18px; border-left: 2px solid var(--rule); }

/* Hero photo rail */
.hero-rail { display: flex; flex-direction: column; gap: 18px; }
.photo-frame { position: relative; border-radius: 4px; overflow: hidden; border: 1px solid var(--rule); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-caption { position: absolute; inset: auto 0 0 0; padding: 18px; background: linear-gradient(0deg, rgba(28,24,20,0.86), transparent); color: var(--ivory); }
.photo-caption .section-eyebrow { color: var(--gold); }
.photo-caption h2 { font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 1.25; margin: 6px 0; }
.photo-caption p { font-size: 12px; color: rgba(245,240,230,0.85); }
.hero-panel { background: var(--card-bg); border: 1px solid var(--rule); border-radius: 4px; padding: 22px; }
.panel-kicker { font-family: var(--font-label); font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 12px; }
.panel-list { list-style: none; display: grid; gap: 10px; }
.panel-list li { font-size: 14px; color: var(--ink-soft); padding-left: 16px; position: relative; }
.panel-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; background: var(--gold-ink); border-radius: 50%; }
.panel-list strong { color: var(--ink); font-weight: 600; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ===========================================================================
   5. Section head + split editorial
   =========================================================================== */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: 2rem; }
.section-head .section-eyebrow { display: block; margin-bottom: 12px; }
.section-link { font-family: var(--font-label); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); text-decoration: none; white-space: nowrap; }
.section-link:hover { color: var(--accent-deep); text-decoration: underline; }
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 2.6rem; }
.split .section-title { margin-bottom: 0; }
.split p:not([class]) { font-family: var(--font-body); font-size: 15px; line-height: 1.8; color: var(--ink-soft); margin-bottom: 14px; }
.split p strong { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) {
  .section-head { flex-direction: column; align-items: start; }
  .split { grid-template-columns: 1fr; gap: 1.2rem; }
}

/* ===========================================================================
   6. Cards (static feature cards + JS-rendered writing/code cards)
   =========================================================================== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

.card, .entry-card {
  background: var(--card-bg); border: 1px solid var(--rule); border-radius: 4px;
  padding: 24px; transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}
.card:hover, .entry-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(140,74,47,0.08); border-color: var(--gold-ink); }
.card-kicker, .entry-meta, .meta-label {
  font-family: var(--font-label); font-size: 9px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.entry-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-soft); }
.card h3, .entry-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1.2; margin-bottom: 10px; color: var(--ink); }
.card p, .entry-card p { font-size: 14px; line-height: 1.65; color: var(--ink-soft); margin-bottom: 14px; }
.role-note { font-style: italic; color: var(--ink-soft); }
.text-link { font-family: var(--font-label); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.text-link:hover { color: var(--accent-deep); text-decoration: underline; }
.card-thumb { height: 180px; border-bottom: 1px solid var(--rule); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.entry-card.has-image { padding: 0; overflow: hidden; }
.entry-card.has-image .card-body { padding: 22px; }

/* Skeletons (writing cards load state) */
.entry-card.is-loading { pointer-events: none; }
.skeleton-thumb { height: 120px; margin: -24px -24px 16px; background: var(--linen); }
.skeleton-line { height: 10px; border-radius: 3px; background: linear-gradient(90deg, var(--linen), var(--stone), var(--linen)); background-size: 200% 100%; animation: skeleton 1.4s infinite; margin-bottom: 10px; }
.skeleton-line.short { width: 45%; } .skeleton-line.med { width: 65%; } .skeleton-line.wide { width: 85%; }
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===========================================================================
   7. Section cover photos  ←  swap the image via inline style="--cover:url(...)"
   =========================================================================== */
.band--cover { background-image: var(--cover); background-size: cover; background-position: center; }
.band--cover::before { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--cover-tint) calc(var(--cover-overlay) * 100%), transparent); }
.band--cover > .container { position: relative; z-index: 1; }
.band--cover .section-title, .band--cover .principle-line { color: var(--ivory); }
.band--cover .section-eyebrow { color: var(--gold); }

/* Operating-principle / closing line */
.principle { text-align: center; max-width: 40ch; margin: 0 auto; }
.principle .section-eyebrow { display: block; margin-bottom: 18px; }
.principle-line { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: clamp(22px, 3vw, 32px); line-height: 1.3; color: var(--ink); }

/* The one dark slate band (use sparingly, e.g. Selected Code) */
.band--ink { background-color: var(--ink-band-bg); }
.band--ink .section-title { color: var(--ivory); }
.band--ink .section-eyebrow { color: var(--gold); }
.band--ink .section-link { color: var(--gold); }
.band--ink .entry-card { background: var(--olive-deep); border-color: rgba(176,141,79,0.30); }
.band--ink .entry-card h3 { color: var(--ivory); }
.band--ink .entry-card p, .band--ink .entry-meta { color: rgba(245,240,230,0.78); }

/* ===========================================================================
   8. Footer
   =========================================================================== */
.site-footer { padding: 2.8rem 0; background: var(--olive-deep); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; font-family: var(--font-label); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
.footer-nav a { color: rgba(244,237,224,0.82); text-decoration: none; }
.footer-nav a:hover { color: #fff; }
.footer-sep { color: rgba(244,237,224,0.4); }
.footer-social { display: flex; gap: 16px; }
.footer-social-link { color: rgba(244,237,224,0.82); transition: color 0.2s; }
.footer-social-link:hover { color: var(--gold); }
.footer-social-link svg { width: 18px; height: 18px; }
.footer-legal { font-family: var(--font-label); font-size: 9px; letter-spacing: 1px; color: rgba(244,237,224,0.6); }

/* ===========================================================================
   9. Dark header + photographic hero (light text on a dark overlay)
   =========================================================================== */
.site-header { background: color-mix(in srgb, var(--espresso) 90%, transparent); border-bottom: 1px solid rgba(244,237,224,0.12); }
.site-header .brand, .brand-name { color: var(--ivory); }
.site-nav a { color: rgba(244,237,224,0.82); }
.site-nav a:hover, .site-nav a.is-current { color: var(--gold); }
.nav-toggle-bar { background: var(--ivory); }
@media (max-width: 860px) {
  .site-nav { background: var(--espresso); border-bottom: 1px solid rgba(244,237,224,0.12); }
  .site-nav a { border-top: 1px solid rgba(244,237,224,0.10); }
}

.hero { position: relative; background-image: var(--cover); background-size: cover; background-position: right center; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--espresso) 72%, transparent), color-mix(in srgb, var(--espresso) 38%, transparent)); }
.hero > .container { position: relative; z-index: 1; }
.hero .section-eyebrow--lg { color: var(--gold); }
.hero .hero-title { color: var(--ivory); }
.hero .lead { color: rgba(244,237,224,0.86); }
.hero .lead strong { color: #fff; }
.hero .credential-line span { color: rgba(244,237,224,0.72); }
.hero .hero-thesis { color: var(--gold); border-left-color: var(--gold-rule); }

/* ===========================================================================
   10. Split/CTA content legibility on photographic cover bands
   =========================================================================== */
.band--cover .split p:not([class]) { color: rgba(244,237,224,0.86); }
.band--cover .split p strong { color: #fff; }
.band--cover .pull-quote { color: var(--ivory); border-left-color: var(--gold); }
.band--cover .btn-outline { color: var(--ivory); border-color: var(--gold); }
.band--cover .btn-outline:hover { background: var(--gold); color: var(--espresso); }

/* ===========================================================================
   11. Restructured hero (headline-only) + founder section + credentials strip
   =========================================================================== */
.hero { min-height: 78vh; display: flex; align-items: center; }
.hero > .container { width: 100%; }
.hero-copy { max-width: 660px; }

.intro-grid { display: grid; grid-template-columns: 0.85fr 1fr; gap: 3rem; align-items: center; }
.intro-body .hero-panel { margin-bottom: 1.3rem; }
.intro-body .hero-thesis { margin-bottom: 1.3rem; }

.cred-eyebrow { display: block; text-align: center; margin-bottom: 0.4rem; }
.cred-strip { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 2.4rem 3rem; margin-top: 1.1rem; }
.cred-strip span { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 13rem; font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 15px; line-height: 1.22; color: var(--ink); }
.cred-strip small { font-family: var(--font-label); text-transform: uppercase; letter-spacing: 1.5px; font-size: 9px; color: var(--ink-soft); margin-top: 6px; }

@media (max-width: 860px) {
  .intro-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero { min-height: 68vh; }
}
