/* Sagebrush Studio LLC: the one shared stylesheet for the seven main pages
   (Home, Work, Process, About, Skills, Free check, Contact). Plain CSS, no dependencies.

   Each page links this file BEFORE its own <style> block, so a rule that is only
   needed on one page lives in that page and can override anything here.
   (The case-study pages and the four concept sites keep their own styles.)

   Order of this file:
     1. Base styles: palette, reset, navigation, hero, buttons, cards, forms, footer
     2. Effects layer: hover polish, scroll bar, entrance animations, device mockups,
        "try a style" demo, concept carousel, quote button, photo band, contact form
   Everything animated is wrapped in prefers-reduced-motion: no-preference.
   flair.js drives the interactive parts. */

/* =====================================================================
   1. BASE STYLES (shared by every main page)
   ===================================================================== */
  /* <picture> only picks the WebP/JPEG file; display: contents makes it layout-neutral
     so the <img> inside is styled exactly as if the wrapper were not there. */
  picture { display: contents; } picture > source { display: none; }
  /* Colour palette (warm cream, terracotta, sage) and corner radii. Change a colour
     here and every page follows; the effects further down this file use the same names. */
  :root {
    --cream: #faf3ea;
    --cream-deep: #f2e6d5;
    --panel: #fffdf9;
    --ink: #40312a;
    --ink-soft: #6f5d50; /* a touch darker than before: keeps small grey text at WCAG AA contrast */
    --line: #e6d6c2;
    --terracotta: #c1653f;
    --rust: #a8492b;
    --sage: #7f8f6a;
    --sage-deep: #5c6b49; /* sage for text (AA contrast); --sage stays for decoration */
    --rose: #d69a8e;
    --mustard: #d3a13f;
    --radius: 22px;
    --radius-sm: 12px;
    /* Roles that used to be hard-coded colours, named so dark mode can swap them. */
    --rust-fill: #a8492b;          /* solid fill behind light text (buttons, flags) */
    --rust-hover: #8a3b21;         /* hover colour for rust links */
    --danger: #9c2b27;             /* form errors */
    --ink-muted: #6f5b4e;          /* small secondary text */
    --header-bg: rgba(250, 243, 234, 0.88);   /* frosted sticky header */
    --glass: rgba(255, 253, 249, 0.94);       /* small tags over photos */
    --glass-band: rgba(250, 243, 234, 0.95);  /* call-to-action card over the photo band */
    --field-bg: #fff;              /* text fields */
  }

  /* Dark mode: follows the visitor's device setting (no switch, nothing stored).
     Only the colour names change; every rule below keeps using them. Text pairs were
     checked for WCAG AA contrast (4.5:1 or better). The browser and phone mockups on
     the Home and Work pages stay light on purpose: they are pictures of a website. */
  @media (prefers-color-scheme: dark) {
    :root {
      color-scheme: dark;
      --cream: #1b1613;
      --cream-deep: #2a211c;
      --panel: #241d19;
      --ink: #f3e8dc;
      --ink-soft: #c7b8aa;
      --line: #3e332b;
      --terracotta: #e0865f;
      --rust: #ec9873;
      --sage: #9aab84;
      --sage-deep: #a9bb92;
      --mustard: #d9aa4d;
      --rust-hover: #f5b494;
      --danger: #ff9b92;
      --ink-muted: #bdad9e;
      --header-bg: rgba(27, 22, 19, 0.88);
      --glass: rgba(36, 29, 25, 0.94);
      --glass-band: rgba(27, 22, 19, 0.95);
      --field-bg: #17120f;
    }
  }

  /* Reset: padding is included in element widths and default margins are removed. */
  * { box-sizing: border-box; margin: 0; padding: 0; }

  html { scroll-behavior: smooth; }

  /* Page base: system sans-serif body text on cream with a faint dotted texture. */
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: var(--cream);
    background-image: radial-gradient(var(--line) 1px, transparent 1px);
    background-size: 22px 22px;
    color: var(--ink);
    line-height: 1.65;
  }

  /* Headlines use a serif system font stack (no web fonts, so nothing to download). */
  h1, h2, h3 {
    font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
    font-weight: 400;
    letter-spacing: 0.01em;
  }

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

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

  .wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

  ::selection { background: var(--rose); color: #3a241d; }

  a:focus-visible, button:focus-visible {
    outline: 2px solid var(--rust);
    outline-offset: 3px;
    border-radius: 4px;
  }

  /* "Skip to content" link: hidden above the page until a keyboard user tabs to it. */
  .skip-link {
    position: absolute; left: 12px; top: -64px; z-index: 300;
    background: var(--rust-fill); color: #fff8f0;
    padding: 10px 18px; border-radius: 999px;
    font-size: 0.9rem; font-weight: 600;
    transition: top 0.15s ease;
  }
  .skip-link:focus { top: 12px; }
  /* The skip link moves focus to <main>; no focus ring is needed on a whole page region. */
  main:focus { outline: none; }

  .accent-serif { font-family: Georgia, "Iowan Old Style", Palatino, serif; font-style: italic; color: var(--rust); }

  .icon { color: var(--terracotta); flex-shrink: 0; }

  /* ---------- Nav ---------- */
  header { position: sticky; top: 0; z-index: 100; padding: 18px 24px; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }

  nav.pill { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; }

  .brand { display: flex; align-items: center; gap: 8px; font-family: Georgia, Palatino, serif; font-style: italic; font-size: 1.2rem; white-space: nowrap; }
  /* Brand name stacks: "Sites" on top, then a smaller cursive "by Sagebrush Studio LLC" underneath. The cursive uses fonts already on the visitor's device (no web font to download); "cursive" is the last fallback. */
  .brand-text { display: flex; flex-direction: column; line-height: 1.05; }
  .brand-main { color: var(--rust); }
  .brand-by { font-family: "Segoe Script", "Snell Roundhand", "Apple Chancery", "Brush Script MT", "Lucida Handwriting", cursive; font-style: normal; font-size: 0.66em; color: var(--ink-soft); margin-top: 2px; letter-spacing: 0.01em; }
  .brand-logo { border-radius: 50%; flex-shrink: 0; }

  .nav-links { display: flex; align-items: center; gap: 4px; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }

  .nav-links a { padding: 8px 14px; border-radius: 999px; color: var(--ink-soft); transition: background 0.15s ease, color 0.15s ease; }
  .nav-links a:hover { color: var(--rust); }
  .nav-links a.active { background: var(--cream-deep); color: var(--rust); }

  .nav-cta { border: 1.5px solid var(--terracotta); color: var(--rust); padding: 9px 18px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
  .nav-cta:hover { background: var(--rust-fill); color: #fff8f0; }

  .nav-toggle { display: none; background: none; border: none; color: var(--ink); font-size: 1.4rem; cursor: pointer; padding: 6px 10px; }

  .mobile-menu { display: none; flex-direction: column; max-width: 1000px; margin: 10px auto 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  /* With seven links the full menu no longer fits below ~1020px, so the hamburger menu takes over there. */
  @media (max-width: 1020px) { .mobile-menu.open { display: flex; } }
  .mobile-menu a { padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 0.92rem; color: var(--ink-soft); }
  .mobile-menu a.active { color: var(--rust); font-weight: 600; }
  .mobile-menu a:last-child { border-bottom: none; }

  /* ---------- Hero ---------- */
  .hero { padding: 80px 0 60px; text-align: center; position: relative; }

  .sprig { position: absolute; opacity: 0.4; }
  .sprig.left { top: 60px; left: 4%; transform: rotate(-18deg); }
  .sprig.right { top: 110px; right: 6%; transform: rotate(20deg) scaleX(-1); }

  .hero-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 26px;
    border-radius: 50%;
  }

  .hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rust); background: var(--cream-deep); border: 1px solid var(--line); padding: 7px 16px 7px 12px; border-radius: 999px; margin-bottom: 26px; }

  .hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); max-width: 760px; margin: 0 auto 22px; font-weight: 400; line-height: 1.25; }

  .hero p.lead { max-width: 540px; margin: 0 auto 34px; color: var(--ink-soft); font-size: 1.05rem; }

  .hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

  .btn { display: inline-block; padding: 13px 28px; border-radius: 999px; font-size: 0.92rem; letter-spacing: 0.02em; border: 1.5px solid var(--terracotta); }
  .btn-primary { background: var(--rust-fill); border-color: var(--rust-fill); color: #fff8f0; } /* deeper fill so white text has AA contrast */
  .btn-primary:hover { background: #8a3b21; border-color: #8a3b21; }
  .btn-ghost { background: transparent; color: var(--rust); }
  .btn-ghost:hover { background: var(--cream-deep); }

  /* ---------- Page header (non-home pages) ---------- */
  .page-hero { padding: 56px 0 10px; text-align: center; }
  .page-hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rust); background: var(--cream-deep); border: 1px solid var(--line); padding: 7px 16px 7px 12px; border-radius: 999px; margin-bottom: 20px; }
  .page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 14px; font-weight: 400; }
  .page-hero p { max-width: 560px; margin: 0 auto; color: var(--ink-soft); font-size: 1.02rem; }

  /* ---------- Section shell ---------- */
  section { padding: 60px 0 78px; }

  .section-head { max-width: 640px; margin: 0 auto 46px; text-align: center; }
  .section-head .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage-deep); margin-bottom: 14px; justify-content: center; }
  .section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin-bottom: 12px; font-weight: 400; }
  .section-head p { color: var(--ink-soft); }

  /* ---------- Work grid ---------- */
  .work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }

  .work-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; }
  .work-card:hover { transform: translateY(-4px); box-shadow: 0 18px 34px -22px rgba(168, 73, 43, 0.35); }


  .work-body { padding: 22px 24px 26px; }
  .work-body h3 { font-size: 1.15rem; margin-bottom: 8px; font-weight: 400; }
  .work-body p { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 16px; }

  .chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
  .chip { font-size: 0.74rem; padding: 5px 13px; border-radius: 999px; background: var(--cream-deep); border: 1px solid var(--line); color: var(--ink-soft); }

  .work-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
  .work-link { font-size: 0.86rem; font-weight: 600; color: var(--rust); display: inline-flex; align-items: center; gap: 6px; border-bottom: 1px solid transparent; }
  .work-link:hover { border-bottom-color: var(--rust); }
  .work-link.secondary { color: var(--ink-soft); }
  .work-link.secondary:hover { color: var(--rust); border-bottom-color: var(--rust); }

  .work-note { text-align: center; margin-top: 32px; font-size: 0.9rem; color: var(--ink-soft); }
  .work-note a { color: var(--rust); font-weight: 600; border-bottom: 1px solid var(--rust); }

  /* ---------- Process ---------- */
  .process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }

  .process-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; text-align: center; }
  .process-card .num-circle { width: 40px; height: 40px; margin: 0 auto 14px; border-radius: 50%; border: 1.5px solid var(--terracotta); display: flex; align-items: center; justify-content: center; font-family: Georgia, Palatino, serif; font-style: italic; color: var(--rust); font-size: 1.05rem; }
  .process-card h3 { font-size: 1.05rem; margin-bottom: 8px; font-weight: 400; }
  .process-card p { font-size: 0.88rem; color: var(--ink-soft); }

  .process-note { margin-top: 40px; text-align: center; background: var(--cream-deep); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 24px; }
  .process-note p { color: var(--ink-soft); font-size: 0.94rem; margin-bottom: 16px; }

  /* ---------- About ---------- */
  .about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 50px; align-items: center; }

  /* Founder photo in an arch-shaped frame (rounded top). The soft gradient shows if the photo fails to load. */
  .about-arch {
    width: 260px;
    height: 307px;
    margin: 0 auto;
    border-radius: 130px 130px 0 0;
    background: linear-gradient(160deg, var(--rose), var(--sage));
    overflow: hidden;
    border: 1px solid var(--line);
  }

  .about-arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }

  .about-copy h1, .about-copy h2 { font-size: 1.9rem; margin-bottom: 16px; font-weight: 400; }
  .about-copy p { color: var(--ink-soft); margin-bottom: 14px; }

  .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
  .fact { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
  .fact .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sage-deep); margin-bottom: 4px; }
  .fact .v { font-size: 0.9rem; }

  /* ---------- Skills ---------- */
  .skills-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
  .skill-chip { font-size: 0.88rem; padding: 11px 20px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
  .skill-chip strong { color: var(--rust); font-weight: 600; }

  /* ---------- Contact ---------- */
  .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }

  .contact-info dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 16px; font-size: 0.94rem; }
  .contact-info dt { color: var(--rust); font-weight: 600; }
  .contact-info dd { color: var(--ink-soft); overflow-wrap: anywhere; }

  .social-row { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
  .social-pill { font-size: 0.82rem; padding: 9px 18px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-soft); }
  .social-pill:hover { color: var(--rust); border-color: var(--terracotta); }

  form { display: flex; flex-direction: column; gap: 12px; }
  form input, form textarea {
    font-family: inherit;
    font-size: 0.92rem;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--ink);
  }
  form input::placeholder, form textarea::placeholder { color: var(--ink-soft); opacity: 1; }
  form textarea { min-height: 120px; resize: vertical; }
  form button { align-self: flex-start; border: none; cursor: pointer; }
  .form-note { font-size: 0.78rem; color: var(--ink-soft); }

  /* ---------- Footer ---------- */
  footer { padding: 36px 0; text-align: center; font-size: 0.88rem; color: var(--ink-soft); border-top: 1px solid var(--line); margin-top: 20px; }
  footer .footer-logo { width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 50%; }
  footer .footer-links { margin-top: 4px; font-size: 0.85rem; }
  footer .footer-links a { color: var(--ink-soft); border-bottom: 1px solid var(--line); }
  footer .footer-links a:hover { color: var(--rust); border-bottom-color: var(--rust); }
  footer .sig { font-family: Georgia, Palatino, serif; font-style: italic; font-size: 1.05rem; color: var(--rust); margin-bottom: 6px; }

  @media (max-width: 1020px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }
  }

  @media (max-width: 820px) {
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .facts { grid-template-columns: 1fr; }
    .sprig { display: none; }
  }

/* =====================================================================
   2. EFFECTS LAYER
   ===================================================================== */

/* Visually hidden but available to screen readers (keeps heading order valid). */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Hover polish (small, always on) ---------- */
/* Hover lifts are tiny and not "motion" in the vestibular sense, so they are not
   gated by prefers-reduced-motion. */
.btn { transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 22px -14px rgba(138, 59, 33, 0.7); }
.btn:active { transform: none; box-shadow: none; }

.process-card { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.process-card:hover { transform: translateY(-5px); border-color: var(--terracotta); box-shadow: 0 18px 30px -22px rgba(168, 73, 43, 0.5); }
.process-card .num-circle { transition: background 0.25s ease, color 0.25s ease; }
.process-card:hover .num-circle { background: var(--rust-fill); border-color: var(--rust-fill); color: #fff8f0; }

.skill-chip, .fact, .social-pill { transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.skill-chip:hover, .fact:hover { transform: translateY(-2px); border-color: var(--terracotta); box-shadow: 0 10px 18px -14px rgba(168, 73, 43, 0.5); }

/* ---------- Scroll progress bar ---------- */
/* The element is created by flair.js. It is full width and scaled horizontally
   from the left edge; --p (0 to 1) is the scroll position set by the script. */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  pointer-events: none;
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--terracotta), var(--mustard));
}

/* ---------- Motion ---------- */
/* Smooth anchor scrolling is switched on for <html> in the base styles above; turn
   it off for visitors who asked for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Entrance for the first screen of every page (pure CSS, no JS needed). */
  .hero > .hero-logo, .hero > .eyebrow, .hero > h1, .hero > p.lead, .hero > .hero-ctas,
  .page-hero > .eyebrow, .page-hero > h1, .page-hero > p {
    animation: flair-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero > .eyebrow, .page-hero > .eyebrow { animation-delay: 0.06s; }
  .hero > h1, .page-hero > h1 { animation-delay: 0.14s; }
  .hero > p.lead, .page-hero > p { animation-delay: 0.22s; }
  .hero > .hero-ctas { animation-delay: 0.3s; }
  @keyframes flair-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
  }

  /* Drifting leaf sprigs (their rotation is part of the keyframes). */
  .sprig.left { animation: sprig-left 7s ease-in-out infinite; }
  .sprig.right { animation: sprig-right 8s ease-in-out 1s infinite; }
  @keyframes sprig-left {
    0%, 100% { transform: rotate(-18deg) translateY(0); }
    50% { transform: rotate(-11deg) translateY(-12px); }
  }
  @keyframes sprig-right {
    0%, 100% { transform: rotate(20deg) scaleX(-1) translateY(0); }
    50% { transform: rotate(13deg) scaleX(-1) translateY(-12px); }
  }

  /* Scroll reveal. flair.js adds .reveal itself, so if the script never runs
     nothing is hidden. It removes the classes again once the fade finishes. */
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--d, 0s);
  }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Device mockups (Home carousel and Work page) ---------- */
/* A browser window with a phone overlapping its corner. .device-rig is rotated
   in 3D by flair.js using the --rx / --ry variables; perspective on the stage
   gives the tilt depth, and translateZ lifts the phone off the browser. */
.device-stage {
  position: relative;
  padding: 26px 22px 34px;
  background: linear-gradient(160deg, var(--cream-deep), var(--cream));
  border-bottom: 1px solid var(--line);
  perspective: 900px;
  overflow: hidden;
}
.device-rig {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.35s ease-out;
}
.device-rig.is-tilting { transition: transform 0.08s linear; }
.browser {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 26px 40px -28px rgba(64, 49, 42, 0.6);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #f1e7d8;
  border-bottom: 1px solid var(--line);
  font-size: 0.68rem;
  color: var(--ink-soft);
}
.browser-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--terracotta); opacity: 0.8; }
.browser-bar i:nth-child(2) { background: var(--mustard); }
.browser-bar i:nth-child(3) { background: var(--sage); }
.browser-bar span {
  flex: 1;
  margin-left: 8px;
  padding: 2px 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: #fff8f0;
  color: #6f5d50; /* fixed: the mockup stays light in dark mode, so its address text must stay dark */
  border-radius: 999px;
}
.browser img { width: 100%; height: auto; }
.phone {
  position: absolute;
  right: -6px;
  bottom: -14px;
  width: 27%;
  border: 4px solid #2c2220;
  border-radius: 16px;
  background: #2c2220;
  overflow: hidden;
  box-shadow: 0 22px 30px -14px rgba(0, 0, 0, 0.55);
  transform: translateZ(46px);
}
.phone img { width: 100%; height: auto; border-radius: 11px; }
.device-stage .tag-live {
  position: absolute;
  left: 16px;
  bottom: 12px;
  background: var(--glass);
  color: var(--rust);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

/* ---------- "Try a style" demo (home page) ---------- */
/* The section starts [hidden] and is shown by flair.js. The radios are visually
   hidden but still focusable; their labels are the visible pills. */
.style-lab[hidden] { display: none; }
.style-lab { padding-top: 20px; }

.lab-picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 26px; padding: 0; border: 0; min-width: 0; }
.lab-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lab-picker label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 10px 14px;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.lab-picker label:hover { transform: translateY(-2px); border-color: var(--terracotta); }
.lab-picker input:checked + label { border-color: var(--rust); background: var(--cream-deep); font-weight: 600; }
.lab-picker input:focus-visible + label { outline: 2px solid var(--rust); outline-offset: 3px; }
.swatch { display: inline-flex; }
.swatch i { width: 14px; height: 14px; border-radius: 50%; margin-left: -4px; border: 2px solid var(--panel); }
.swatch i:first-child { margin-left: 0; }

/* The sample page. Each style only changes these variables: the defaults below
   are "editorial"; each [data-style] block after it overrides colours, corner
   radius, heading font and the six gallery-tile colours (--t1 to --t6). */
.mock {
  --m-bg: #faf6f1; --m-panel: #f1e2d8; --m-ink: #2b2622; --m-soft: #6e665e; --m-line: #e8ded2;
  --m-accent: #b3583f; --m-accent-ink: #ffffff; --m-kicker: #9c4731; --m-radius: 3px; --m-btn-radius: 999px;
  --m-head-font: Georgia, "Times New Roman", serif; --m-head-weight: 400; --m-head-case: none; --m-head-track: 0;
  --t1: #e0c3b2; --t2: #d9b8a6; --t3: #b3583f; --t4: #8d6e5e; --t5: #f1e2d8; --t6: #c9a592;
  max-width: 900px;
  margin: 0 auto;
  padding: 22px 26px 26px;
  background: var(--m-bg);
  color: var(--m-ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 50px -34px rgba(64, 49, 42, 0.6);
  transition: background-color 0.45s ease, color 0.45s ease;
  overflow: hidden;
}
.mock[data-style="colorblock"] {
  --m-bg: #fffaf9; --m-panel: #ffffff; --m-ink: #2c2430; --m-soft: #675b6c; --m-line: #f0e2e6;
  --m-accent: #ff7a6b; --m-accent-ink: #2c2430; --m-kicker: #675b6c; --m-radius: 16px;
  --m-head-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; --m-head-weight: 800; --m-head-track: -0.02em;
  --t1: #ff7a6b; --t2: #4fd1b3; --t3: #b892f0; --t4: #ffc857; --t5: #e2503f; --t6: #21916f;
}
.mock[data-style="vintage"] {
  --m-bg: #14100c; --m-panel: #1c1712; --m-ink: #f1e9db; --m-soft: #b8ab97; --m-line: #332a20;
  --m-accent: #c9a15a; --m-accent-ink: #14100c; --m-kicker: #e0bd7c; --m-radius: 2px; --m-btn-radius: 2px;
  --m-head-font: Georgia, "Times New Roman", serif; --m-head-weight: 400; --m-head-case: uppercase; --m-head-track: 0.07em;
  --t1: #c9a15a; --t2: #8a6d3b; --t3: #a8492b; --t4: #4a3d2e; --t5: #e0bd7c; --t6: #332a20;
}
.mock[data-style="calm"] {
  --m-bg: #f7f6f1; --m-panel: #ffffff; --m-ink: #33392f; --m-soft: #646b59; --m-line: #e4e5da;
  --m-accent: #55684c; --m-accent-ink: #ffffff; --m-kicker: #55684c; --m-radius: 6px;
  --m-head-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; --m-head-weight: 300; --m-head-track: 0.02em;
  --t1: #7c9070; --t2: #ded9c9; --t3: #55684c; --t4: #cfd6c5; --t5: #a9b79d; --t6: #efece0;
}

.mock-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--m-line); font-size: 0.82rem; }
.mock-brand { font-family: var(--m-head-font); font-weight: var(--m-head-weight); text-transform: var(--m-head-case); letter-spacing: var(--m-head-track); font-size: 1.1rem; }
.mock-links { display: flex; gap: 20px; color: var(--m-soft); }
.mock-btn {
  display: inline-block;
  padding: 9px 20px;
  background: var(--m-accent);
  color: var(--m-accent-ink);
  border-radius: var(--m-btn-radius);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background-color 0.45s ease, color 0.45s ease, border-radius 0.45s ease;
}
.mock-hero { padding: 38px 0 28px; max-width: 520px; }
.mock-kicker { display: block; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--m-kicker); margin-bottom: 10px; }
.mock-title { margin: 0 0 10px; font-family: var(--m-head-font); font-weight: var(--m-head-weight); text-transform: var(--m-head-case); letter-spacing: var(--m-head-track); font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.15; }
.mock-lede { margin: 0 0 18px; color: var(--m-soft); font-size: 0.94rem; }

.mock-services { list-style: none; display: grid; gap: 4px; margin-bottom: 24px; max-width: 520px; }
.mock-services li { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--m-line); font-size: 0.92rem; }
.mock-services .d { flex: 1; }
.mock-services .p { font-weight: 600; }
.mock[data-style="colorblock"] .mock-services { display: flex; flex-wrap: wrap; gap: 8px; }
.mock[data-style="colorblock"] .mock-services li { background: var(--m-panel); border: 2px solid var(--m-ink); border-radius: 999px; padding: 7px 16px; }
.mock[data-style="colorblock"] .mock-services .d { display: none; }
.mock[data-style="vintage"] .mock-services li { border-bottom: 0; }
.mock[data-style="vintage"] .mock-services .d { border-bottom: 2px dotted var(--m-soft); transform: translateY(-4px); }
.mock[data-style="calm"] .mock-services li { padding: 14px 0; justify-content: space-between; }
.mock[data-style="calm"] .mock-services .d { display: none; }

.mock-gallery { display: grid; gap: 10px; }
.mock-gallery .tile {
  border-radius: var(--m-radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 60%), var(--c);
  transition: background-color 0.45s ease, border-radius 0.45s ease;
}
.tile:nth-child(1) { --c: var(--t1); }
.tile:nth-child(2) { --c: var(--t2); }
.tile:nth-child(3) { --c: var(--t3); }
.tile:nth-child(4) { --c: var(--t4); }
.tile:nth-child(5) { --c: var(--t5); }
.tile:nth-child(6) { --c: var(--t6); }

/* Gallery layouts per style (the same six tiles are re-arranged by CSS alone). */
/* Masonry */
.mock[data-style="editorial"] .mock-gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 30px; grid-auto-flow: dense; }
.mock[data-style="editorial"] .tile:nth-child(1) { grid-row: span 5; }
.mock[data-style="editorial"] .tile:nth-child(2) { grid-row: span 3; }
.mock[data-style="editorial"] .tile:nth-child(3) { grid-row: span 4; }
.mock[data-style="editorial"] .tile:nth-child(4) { grid-row: span 4; }
.mock[data-style="editorial"] .tile:nth-child(5) { grid-row: span 3; }
.mock[data-style="editorial"] .tile:nth-child(6) { grid-row: span 5; }
/* Bento */
.mock[data-style="colorblock"] .mock-gallery { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 56px); }
.mock[data-style="colorblock"] .tile:nth-child(1) { grid-area: 1 / 1 / 3 / 3; }
.mock[data-style="colorblock"] .tile:nth-child(2) { grid-area: 1 / 3 / 2 / 4; }
.mock[data-style="colorblock"] .tile:nth-child(3) { grid-area: 1 / 4 / 3 / 5; }
.mock[data-style="colorblock"] .tile:nth-child(4) { grid-area: 2 / 3 / 3 / 4; }
.mock[data-style="colorblock"] .tile:nth-child(5) { grid-area: 3 / 1 / 4 / 2; }
.mock[data-style="colorblock"] .tile:nth-child(6) { grid-area: 3 / 2 / 4 / 5; }
/* Filmstrip */
.mock[data-style="vintage"] .mock-gallery { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent); mask-image: linear-gradient(90deg, #000 78%, transparent); }
.mock[data-style="vintage"] .tile { flex: 0 0 34%; height: 150px; border: 1px solid var(--m-line); }
/* Story */
.mock[data-style="calm"] .mock-gallery { grid-template-columns: 1fr 1fr; gap: 14px; }
.mock[data-style="calm"] .tile { aspect-ratio: 16 / 7; }
.mock[data-style="calm"] .tile:nth-child(n+5) { display: none; }

/* Tiles pop in when a new style is chosen (flair.js re-adds .pop to replay it). */
@media (prefers-reduced-motion: no-preference) {
  .mock-gallery.pop .tile { animation: tile-pop 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .mock-gallery.pop .tile:nth-child(2) { animation-delay: 0.04s; }
  .mock-gallery.pop .tile:nth-child(3) { animation-delay: 0.08s; }
  .mock-gallery.pop .tile:nth-child(4) { animation-delay: 0.12s; }
  .mock-gallery.pop .tile:nth-child(5) { animation-delay: 0.16s; }
  .mock-gallery.pop .tile:nth-child(6) { animation-delay: 0.2s; }
  @keyframes tile-pop { from { opacity: 0; transform: scale(0.92) translateY(8px); } to { opacity: 1; transform: none; } }
}

.lab-caption { max-width: 640px; margin: 26px auto 0; text-align: center; }
.lab-caption p { color: var(--ink-soft); margin-bottom: 10px; }
.lab-caption .lab-style-name { font-family: Georgia, "Iowan Old Style", Palatino, serif; font-size: 1.25rem; color: var(--ink); margin-bottom: 6px; }
.lab-caption .lab-fineprint { font-size: 0.8rem; }
.lab-caption a.lab-link { color: var(--rust); font-weight: 600; border-bottom: 1px solid var(--rust); display: inline-block; padding: 3px 0; }
.lab-cta { display: flex; justify-content: center; margin-top: 20px; }

@media (max-width: 600px) {
  .mock { padding: 16px 16px 20px; }
  .mock-links { display: none; }
  .mock[data-style="vintage"] .tile { flex-basis: 56%; }
  .mock[data-style="colorblock"] .mock-gallery { grid-template-rows: repeat(3, 44px); }
}

/* ---------- Small-phone header fit (the toggle used to overflow by a few px) ---------- */
@media (max-width: 480px) {
  header { padding-inline: 14px; }
  nav.pill { gap: 8px; }
  .brand { font-size: 1.05rem; gap: 6px; }
  .nav-cta { padding: 8px 13px; }
  .nav-toggle { padding: 6px 6px; }
}

/* Narrow phones: shrink the stacked brand name a little, and drop the header button on the very smallest screens (Contact stays in the menu and the floating quote button). */
@media (max-width: 380px) {
  .brand { font-size: 0.85rem; }
}
@media (max-width: 350px) {
  .nav-cta { display: none; }
}

/* ---------- Hero: word-by-word headline ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero > h1 { animation: none; }
  .hero h1 .w {
    display: inline-block;
    animation: word-in 0.65s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(0.1s + var(--i, 0) * 0.065s);
  }
  @keyframes word-in { from { opacity: 0; transform: translateY(0.5em); } to { opacity: 1; transform: none; } }
}

/* ---------- Concept-work showcase / carousel ---------- */
/* Without JavaScript the slides are a plain vertical list. flair.js adds
   .is-carousel, which puts every slide in the same grid cell (grid-area 1 / 1)
   so they stack; only .is-active is visible, and the rest fade out. */
.showcase { padding-top: 10px; }
.showcase-body { max-width: 760px; margin: 0 auto; }
.showcase-track { display: flex; flex-direction: column; gap: 30px; }
.slide { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.slide .device-stage { padding: 30px 34px 42px; }
.slide figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 16px 24px 20px; }
.slide figcaption strong { font-family: Georgia, "Iowan Old Style", Palatino, serif; font-weight: 400; font-size: 1.2rem; }
.slide figcaption span { flex: 1 1 260px; color: var(--ink-soft); font-size: 0.9rem; }
.slide figcaption a { color: var(--rust); font-weight: 600; border-bottom: 1px solid transparent; }
.slide figcaption a:hover { border-bottom-color: var(--rust); }

.showcase.is-carousel .showcase-track { display: grid; gap: 0; }
.showcase.is-carousel .slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.showcase.is-carousel .slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.6s ease, visibility 0s; }
@media (prefers-reduced-motion: reduce) {
  .showcase.is-carousel .slide, .showcase.is-carousel .slide.is-active { transition: none; }
}

.carousel-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 20px; }
.carousel-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--terracotta);
  background: var(--panel);
  color: var(--rust);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.carousel-btn:hover { background: var(--rust-fill); border-color: var(--rust-fill); color: #fff8f0; transform: translateY(-2px); }
.carousel-dots { display: flex; }
.carousel-dot { position: relative; width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; }
.carousel-dot::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--terracotta);
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel-dot:hover::before { transform: scale(1.25); }
.carousel-dot[aria-current="true"]::before { background: var(--rust); border-color: var(--rust); }
.carousel-toggle {
  padding: 8px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.carousel-toggle:hover { border-color: var(--terracotta); color: var(--rust); }

@media (max-width: 600px) {
  .slide .device-stage { padding: 22px 20px 34px; }
}

/* ---------- Floating quote button ---------- */
/* Created by flair.js; hidden until the visitor scrolls (.is-shown). Using
   visibility with a delayed transition keeps it out of the tab order while hidden. */
.quote-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 150;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--rust-fill);
  color: #fff8f0;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 16px 30px -14px rgba(138, 59, 33, 0.75);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s, background 0.2s ease;
}
.quote-fab.is-shown { opacity: 1; visibility: visible; transform: none; transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s, background 0.2s ease; }
.quote-fab:hover { background: #8a3b21; }
@media (prefers-reduced-motion: reduce) { .quote-fab, .quote-fab.is-shown { transition: none; } }
@media print { .quote-fab, .scroll-progress { display: none !important; } }

/* ---------- Photo band ---------- */
/* Four concept-site photos in a row with a centred call-to-action card on top.
   Images are scaled up 14% so the parallax drift (--py, set by flair.js) never
   exposes an edge; a dark gradient overlay keeps the card readable. */
.photo-band { position: relative; padding: 0; margin-top: 30px; overflow: hidden; background: #2b2018; }
.band-photos { display: grid; grid-template-columns: repeat(4, 1fr); height: 460px; }
.band-photos::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(43, 32, 24, 0.12), rgba(43, 32, 24, 0.5));
  pointer-events: none;
}
.band-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateY(var(--py, 0px)) scale(1.14);
  will-change: transform;
}
.band-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(540px, calc(100% - 32px));
  padding: 34px 32px 36px;
  transform: translate(-50%, -50%);
  text-align: center;
  background: var(--glass-band);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.band-logo { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; }
.band-card h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.2; margin-bottom: 10px; }
.band-card p { color: var(--ink-soft); margin-bottom: 20px; }
.band-credit { position: absolute; right: 12px; bottom: 10px; margin: 0; padding: 3px 10px; border-radius: 999px; background: rgba(43, 32, 24, 0.7); font-size: 0.7rem; color: #fff8f0; }

@media (max-width: 700px) {
  .band-photos { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; height: 560px; }
  .band-card { padding: 26px 22px 28px; }
  .band-credit { left: 14px; right: auto; }
}
@media print { .photo-band { display: none !important; } }

/* ---------- Contact form (opens the visitor's email app) ---------- */
/* The form is [hidden] in the HTML and shown by flair.js, so it never appears as a
   dead control when JavaScript is off. Errors use a dark red with a bold weight so
   they do not rely on colour alone. */
#contact-form[hidden] { display: none; }
#contact-form input[aria-invalid="true"],
#contact-form textarea[aria-invalid="true"] { border-color: var(--danger); }
.form-error { margin: 0; color: var(--danger); font-size: 0.9rem; font-weight: 600; }
.form-error[hidden] { display: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.form-status { margin: 0; min-height: 1.4em; font-size: 0.85rem; color: var(--ink-soft); }
.contact-info dd a { color: var(--rust); border-bottom: 1px solid var(--terracotta); }
.contact-info dd a:hover { color: var(--rust-hover); }

/* ---------- Print: pages print clean on white, with nothing hidden or animated ---------- */
@media print {
  /* Colours: always black on white, whatever the device's dark/light setting */
  :root {
    --cream: #fff; --cream-deep: #f4f0ea; --panel: #fff; --ink: #000; --ink-soft: #333;
    --ink-muted: #333; --line: #bbb; --rust: #7a2e17; --terracotta: #7a2e17; --sage-deep: #333;
    --header-bg: #fff; --glass: #fff; --glass-band: #fff; --field-bg: #fff;
  }
  body { background: #fff; background-image: none; }
  /* Page chrome that makes no sense on paper */
  header, .mobile-menu, .skip-link, .quote-fab, .scroll-progress, .photo-band, .sprig, .hero-ctas { display: none !important; }
  /* Scroll-reveal content starts invisible; make sure it is visible when printing */
  .reveal { opacity: 1 !important; transform: none !important; }
  /* Keep cards and answers whole instead of splitting across pages */
  .tier, .process-card, .terms-card, .first-client, details, .work-card { break-inside: avoid; }
  a { color: #000; }
  footer { border-top: 1px solid #bbb; }
}
