/* LithoLogic website kit — page-specific styles
   (low-level tokens come from colors_and_type.css) */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--fg-1);
  background: var(--ll-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ---------- Header ---------- */
.ll-header {
  position: sticky; top: 0; z-index: 50;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  background: rgba(255,255,255,0);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), backdrop-filter var(--dur-base) var(--ease-out);
}
.ll-header.scrolled {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--ll-mist);
}
.ll-header.on-dark { color: var(--ll-sand); }
.ll-header.on-dark .nav a { color: var(--ll-sand); }
.ll-header.on-dark.scrolled { color: var(--fg-1); }
.ll-header.on-dark.scrolled .nav a { color: var(--fg-1); }
.ll-header .logo { display: flex; align-items: center; gap: 12px; }
.ll-header .logo img { height: 44px; width: auto; display: block; }
.ll-header .nav { display: flex; gap: 32px; }
.ll-header .nav a {
  font-family: var(--font-sans); font-size: 15px; font-weight: 500;
  color: inherit; text-decoration: none; padding: 6px 0;
  position: relative; transition: color var(--dur-fast) var(--ease-out);
}
.ll-header .nav a:hover { color: var(--ll-signal); }
.ll-header .nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--ll-ochre);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px;
  font-family: var(--font-sans); font-size: 15px; font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.btn:focus-visible { outline: 2px solid var(--ll-signal); outline-offset: 2px; }
.btn-primary { background: var(--ll-signal); color: var(--ll-white); }
.btn-primary:hover { background: var(--ll-signal-deep); }
.btn-secondary { background: var(--ll-ochre); color: var(--ll-umber-deep); }
.btn-secondary:hover { background: var(--ll-ochre-deep); color: var(--ll-white); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; opacity: 0.85; }
.btn-ghost:hover { opacity: 1; }
.btn-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-size: 15px; font-weight: 600;
  color: var(--ll-signal); text-decoration: none;
  border-bottom: 1px solid var(--ll-signal); padding-bottom: 2px;
  transition: color var(--dur-fast) var(--ease-out);
}
.btn-link:hover { color: var(--ll-signal-deep); border-bottom-color: var(--ll-signal-deep); }
.btn-link.on-dark { color: var(--ll-ochre); border-bottom-color: var(--ll-ochre); }
.btn-link.on-dark:hover { color: var(--ll-ochre-soft); border-bottom-color: var(--ll-ochre-soft); }

/* ---------- Band ---------- */
.band {
  padding: 96px 48px;
  display: flex; justify-content: center;
}
.band-cream { background: var(--ll-cream); }
.band-sand  { background: var(--ll-sand-soft); }
.band-white { background: var(--ll-white); }
.band-dark  { background: var(--ll-forest); color: var(--fg-on-dark); }
.band-dark h1, .band-dark h2, .band-dark h3 { color: var(--ll-white); }
.band-inner { width: 100%; max-width: var(--container); }
.band-inner.wide { max-width: var(--container-wide); }
.band-inner.narrow { max-width: var(--container-narrow); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 640px;
  padding: 140px 48px 96px;
  background: var(--grad-hero);
  color: var(--ll-cream);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
/* Subsurface-model background image, screen-blended so its black field
   dissolves into the forest gradient; separate scrim protects the copy. */
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center right;
  mix-blend-mode: screen;
  pointer-events: none;
}
.hero-has-image::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(28,43,35,0.62) 0%, rgba(28,43,35,0.12) 16%, rgba(28,43,35,0) 24%),
    linear-gradient(90deg, rgba(38,56,46,0.90) 0%, rgba(42,62,51,0.62) 44%, rgba(45,66,54,0.12) 80%, rgba(45,66,54,0) 100%),
    linear-gradient(180deg, rgba(45,66,54,0) 38%, rgba(36,52,43,0.50) 100%);
}
.hero-has-image .hero-eyebrow { color: var(--ll-ochre-soft); text-shadow: 0 1px 10px rgba(20,32,26,0.55); }
.hero-has-image .hero-headline { text-shadow: 0 2px 18px rgba(20,32,26,0.40); }
.hero-has-image .hero-strata { display: none; }
body.tw-hero-solid .hero-bg { display: none; }
body.tw-hero-solid .hero-has-image::after { display: none; }
.hero-inner { width: 100%; max-width: var(--container); position: relative; z-index: 2; }
.hero-eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ll-ochre);
  margin-bottom: 24px;
}
.hero-headline {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(2.75rem, 5.2vw, 4.75rem);
  line-height: 1.05; letter-spacing: -0.015em;
  color: var(--ll-white);
  margin: 0 0 24px; max-width: 18ch; text-wrap: balance;
}
.hero-sub {
  font-size: 19px; line-height: 1.55; color: var(--fg-on-dark);
  max-width: 56ch; margin-bottom: 36px;
}
.hero-strata {
  position: absolute; right: 0; bottom: 0; width: 55%; height: 70%;
  opacity: 0.55; pointer-events: none;
  background: linear-gradient(180deg,
    rgba(195,181,155,0.0) 0% 4%,
    rgba(195,181,155,0.22) 4% 14%,
    rgba(49,92,98,0.30) 14% 30%,
    rgba(157,135,122,0.32) 30% 52%,
    rgba(132,125,119,0.34) 52% 60%,
    rgba(168,122,75,0.48) 60% 82%,
    rgba(98,55,20,0.55) 82% 100%);
  mask-image: linear-gradient(270deg, #000 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(270deg, #000 30%, transparent 100%);
}
.hero-strata::after {
  content: ""; position: absolute; right: 18%; bottom: 22%;
  width: 14%; height: 6px;
  background: rgba(255,255,255,0.45);
  border-radius: 50%;
  filter: blur(2px);
}

/* ---------- Eyebrow + headlines (inside bands) ---------- */
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ll-ochre-deep); margin-bottom: 18px; }
.band-dark .eyebrow { color: var(--ll-ochre); }
.section-headline {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.08; letter-spacing: -0.015em;
  color: var(--fg-heading); margin: 0 0 18px; text-wrap: balance;
}
.band-dark .section-headline { color: var(--ll-white); }
.section-body { font-size: 17px; line-height: 1.6; color: var(--fg-1); max-width: 60ch; }
.band-dark .section-body { color: var(--fg-on-dark); }

/* ---------- Card ---------- */
.card-ll {
  background: var(--ll-white);
  border: 1px solid var(--ll-mist);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1), inset 0 -2px 0 var(--ll-ochre);
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.card-ll:hover {
  box-shadow: var(--shadow-2), inset 0 -2px 0 var(--ll-ochre);
  transform: translateY(-1px);
}
.card-cream-bg { background: var(--ll-cream); }

/* ---------- Capability card ---------- */
.cap-card { width: 320px; flex-shrink: 0; overflow: hidden; display: flex; flex-direction: column; }
.cap-figure { height: 150px; overflow: hidden; background: var(--ll-forest-deep); border-bottom: 1px solid var(--ll-mist); }
.cap-figure img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--dur-slow) var(--ease-out); }
.cap-card:hover .cap-figure img { transform: scale(1.04); }
.cap-thumb { height: 130px; }
.cap-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.cap-icon { color: var(--ll-ochre); margin-bottom: 12px; display: inline-flex; }
.cap-title { font-family: var(--font-serif); font-weight: 500; font-size: 22px; line-height: 1.2; color: var(--fg-heading); margin: 0 0 12px; }
.cap-list { margin: 0; padding-left: 18px; font-size: 14.5px; line-height: 1.55; color: var(--fg-1); }
.cap-list li + li { margin-top: 4px; }

/* ---------- Carousel ---------- */
.carousel-track { display: flex; gap: 20px; overflow-x: auto; padding: 8px 0 12px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.carousel-track > * { scroll-snap-align: start; }
.carousel-track::-webkit-scrollbar { height: 6px; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--ll-taupe); border-radius: 3px; }
.carousel-controls { display: flex; gap: 8px; }
.carousel-btn {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  border: 1px solid var(--ll-taupe); background: transparent;
  color: var(--fg-heading); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.carousel-btn:hover { background: var(--ll-cream); border-color: var(--ll-umber); }
.carousel-btn:disabled { opacity: 0.4; cursor: default; }

/* ---------- Icon-stat row ---------- */
.iconstat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.iconstat-icon { color: var(--ll-ochre); margin-bottom: 14px; display: inline-flex; }
.band-dark .iconstat-icon { color: var(--ll-ochre); }
.iconstat-label { font-family: var(--font-serif); font-weight: 500; font-size: 19px; line-height: 1.25; color: var(--fg-heading); margin-bottom: 6px; }
.band-dark .iconstat-label { color: var(--ll-white); }
.iconstat-body { font-size: 14.5px; line-height: 1.5; color: var(--fg-2); }
.band-dark .iconstat-body { color: var(--fg-on-dark-muted); }

/* ---------- Feature grid (3-up) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-cell { background: var(--ll-white); border: 1px solid var(--ll-mist); border-radius: var(--radius-md); padding: 28px; box-shadow: inset 0 -2px 0 var(--ll-ochre); }
.feature-icon { color: var(--ll-ochre); margin-bottom: 16px; }
.feature-title { font-family: var(--font-serif); font-weight: 500; font-size: 22px; line-height: 1.2; color: var(--fg-heading); margin: 0 0 8px; }
.feature-body { font-size: 15px; line-height: 1.55; color: var(--fg-1); }

/* ---------- Media-text split ---------- */
.mts { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.mts.reverse > :first-child { order: 2; }
.mts-media { width: 100%; min-height: 340px; border-radius: var(--radius-md); overflow: hidden; position: relative; background: var(--ll-cream); }
.mts-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ll-ochre-deep); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.mts-figure { width: 100%; height: 400px; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-2); border-bottom: 3px solid var(--ll-ochre); background: var(--ll-forest-deep); }
.mts-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mts-icon { color: var(--ll-ochre); }
.mts-title { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.75rem, 2.6vw, 2.5rem); line-height: 1.1; color: var(--fg-heading); margin: 0 0 16px; }
.mts-body { font-size: 17px; line-height: 1.6; color: var(--fg-1); margin: 0 0 16px; }
.mts-list { margin: 16px 0 24px; padding-left: 20px; font-size: 15.5px; line-height: 1.55; color: var(--fg-1); }
.mts-list li + li { margin-top: 6px; }

/* ---------- Big text milestone callouts ---------- */
.milestone-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.milestone { border-top: 2px solid var(--ll-ochre); padding-top: 24px; }
.milestone-label { font-family: var(--font-serif); font-weight: 500; font-size: 26px; line-height: 1.15; color: var(--fg-heading); margin-bottom: 10px; letter-spacing: -0.01em; }
.milestone-body { font-size: 14.5px; line-height: 1.5; color: var(--fg-2); }
.band-dark .milestone { border-top-color: var(--ll-ochre); }
.band-dark .milestone-label { color: var(--ll-white); }
.band-dark .milestone-body { color: var(--fg-on-dark-muted); }

/* ---------- Strata mini-thumb ---------- */
.strata-thumb {
  background: linear-gradient(180deg,
    #C3B59B 0% 10%,    /* Surface alluvium */
    #315C62 10% 26%,   /* USDW */
    #9D877A 26% 48%,   /* Overburden */
    #847D77 48% 56%,   /* Caprock */
    #A87A4B 56% 80%,   /* Reservoir */
    #623714 80% 100%); /* Underburden */
  position: relative;
}
.strata-thumb::after {
  content: ""; position: absolute; left: 60%; top: 55%;
  width: 30%; height: 6px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  filter: blur(1.5px);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ll-forest-deep);
  color: var(--fg-on-dark);
  padding: 72px 48px 40px;
}
.footer-inner { max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.footer-logo img { height: 56px; margin-bottom: 18px; }
.footer-tag { font-family: var(--font-serif); font-style: italic; font-size: 18px; color: var(--fg-on-dark); max-width: 28ch; }
.footer-col h4 { font-family: var(--font-sans); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ll-ochre); margin: 0 0 18px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.footer-col a { color: var(--fg-on-dark); text-decoration: none; transition: color var(--dur-fast); }
.footer-col a:hover { color: var(--ll-ochre); }
.footer-row-icon { display: flex; align-items: center; gap: 10px; color: var(--fg-on-dark); }
.footer-row-icon svg { color: var(--ll-ochre); }
.footer-bottom { border-top: 1px solid rgba(227,222,209,0.18); margin-top: 48px; padding-top: 24px; max-width: var(--container); margin-left: auto; margin-right: auto; display: flex; justify-content: space-between; font-size: 13px; color: var(--fg-on-dark-muted); }

/* ---------- Form ---------- */
.form-grid { display: flex; flex-direction: column; gap: 16px; max-width: 480px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--font-sans); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-2); }
.field input, .field textarea {
  font-family: var(--font-sans); font-size: 15px;
  padding: 11px 14px; border: 1px solid var(--ll-mist);
  border-radius: var(--radius-sm); background: var(--ll-white);
  color: var(--fg-1); outline: none; resize: vertical;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.field input:focus, .field textarea:focus {
  border-color: var(--ll-signal); box-shadow: 0 0 0 3px rgba(46,125,50,0.18);
}

/* ---------- Soft offer callout ---------- */
.soft-offer {
  background: var(--ll-cream);
  border: 1px solid var(--ll-sand);
  border-left: 4px solid var(--ll-ochre);
  border-radius: var(--radius-md);
  padding: 28px 32px;
}

/* ---------- Misc ---------- */
.muted { color: var(--fg-2); }
.center { text-align: center; }
.stack-sm > * + * { margin-top: 12px; }
.stack-md > * + * { margin-top: 24px; }
.stack-lg > * + * { margin-top: 48px; }
.row-gap-lg { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }

/* Project card */
.project-card {
  background: var(--ll-white);
  border: 1px solid var(--ll-mist);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-1), inset 0 -2px 0 var(--ll-ochre);
  transition: box-shadow var(--dur-base), transform var(--dur-base);
  cursor: pointer;
  text-align: left;
  display: flex; flex-direction: column;
}
.project-card:hover { box-shadow: var(--shadow-2), inset 0 -2px 0 var(--ll-ochre); transform: translateY(-1px); }
.project-figure { height: 188px; overflow: hidden; background: var(--ll-forest-deep); border-bottom: 1px solid var(--ll-mist); }
.project-figure img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--dur-slow) var(--ease-out); }
.project-card:hover .project-figure img { transform: scale(1.03); }
.project-thumb { height: 160px; }
.project-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.project-status { font-family: var(--font-sans); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ll-ochre-deep); }
.project-title { font-family: var(--font-serif); font-weight: 500; font-size: 21px; line-height: 1.2; color: var(--fg-heading); margin: 6px 0 8px; }
.project-summary { font-size: 14px; line-height: 1.5; color: var(--fg-2); }
.project-cta { margin-top: auto; padding-top: 16px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-sans); font-size: 13.5px; font-weight: 600; color: var(--ll-signal); transition: gap var(--dur-base) var(--ease-out), color var(--dur-fast); }
.project-card:hover .project-cta { gap: 10px; color: var(--ll-signal-deep); }

/* Page header banding (non-hero pages reuse a smaller hero) */
.page-hero {
  background: var(--grad-hero); color: var(--ll-cream);
  padding: 132px 48px 80px;
  text-align: left;
}
.page-hero-inner { max-width: var(--container); margin: 0 auto; }
.page-hero h1 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(2.4rem, 4.2vw, 4rem); line-height: 1.05; color: var(--ll-white); margin: 0 0 20px; max-width: 22ch; }
.page-hero p { font-size: 19px; line-height: 1.55; color: var(--fg-on-dark); max-width: 56ch; margin: 0; }

/* ============================================================
   Additions: scroll-reveal, Tweak variants, capability grid,
   project grid, and expandable case-study detail blocks.
   ============================================================ */

/* ---------- Scroll reveal (gentle fade + slide-up) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Tweak: demi headline weight ---------- */
.tw-demi .hero-headline, .tw-demi .section-headline, .tw-demi .mts-title,
.tw-demi .page-hero h1, .tw-demi .cap-title, .tw-demi .iconstat-label,
.tw-demi .milestone-label, .tw-demi .feature-title, .tw-demi .pdetail-title { font-weight: 700; }

/* ---------- Tweak: hero treatment ---------- */
body.tw-hero-solid .hero,
body.tw-hero-solid .page-hero { background: var(--ll-forest-deep); }
.page-hero { position: relative; overflow: hidden; }
body.tw-hero-strata .hero::before,
body.tw-hero-strata .page-hero::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
  background: var(--grad-strata); z-index: 1;
}

/* ---------- Capability grid (Home tweak) ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cap-grid .cap-card { width: auto; }

/* ---------- "Why LithoLogic" figure ---------- */
.why-figure {
  border-radius: var(--radius-md); overflow: hidden;
  border-bottom: 3px solid var(--ll-ochre);
  box-shadow: var(--shadow-2);
  background: var(--ll-white);
}
.why-figure img { display: block; width: 100%; height: auto; }

/* ---------- Project grid ---------- */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project-card { width: 100%; }

/* ---------- Contact direct links ---------- */
.contact-link { color: var(--fg-1); text-decoration: none; border-bottom: 1px solid transparent; transition: color var(--dur-fast), border-color var(--dur-fast); }
.contact-link:hover { color: var(--ll-signal); border-bottom-color: var(--ll-signal); }

/* ---------- Expandable case-study detail blocks ---------- */
.pdetail-list { border-top: 1px solid var(--ll-mist); }
.pdetail { border-bottom: 1px solid var(--ll-mist); }
.pdetail-head {
  width: 100%; display: flex; align-items: center; gap: 18px;
  padding: 24px 8px; background: transparent; border: none; cursor: pointer; text-align: left;
  transition: background var(--dur-fast) var(--ease-out);
}
.pdetail-head:hover { background: rgba(196,153,108,0.07); }
.pdetail-head:focus-visible { outline: 2px solid var(--ll-signal); outline-offset: -2px; }
.pdetail-head-icon { color: var(--ll-ochre); flex-shrink: 0; display: inline-flex; }
.pdetail-head-text { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.pdetail-eyebrow { font-family: var(--font-sans); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ll-ochre-deep); }
.pdetail-title { font-family: var(--font-serif); font-weight: 500; font-size: 22px; line-height: 1.2; color: var(--fg-heading); letter-spacing: -0.01em; }
.pdetail-toggle { flex-shrink: 0; width: 36px; height: 36px; border-radius: var(--radius-md); border: 1px solid var(--ll-taupe); display: inline-flex; align-items: center; justify-content: center; color: var(--fg-heading); transition: background var(--dur-fast), border-color var(--dur-fast); }
.pdetail-head:hover .pdetail-toggle { border-color: var(--ll-umber); background: var(--ll-white); }
.pdetail-body { overflow: hidden; }
.pdetail-body-inner { min-height: 0; }
@media (prefers-reduced-motion: no-preference) {
  .pdetail.open .pdetail-body { animation: pdetail-reveal var(--dur-slow) var(--ease-out); }
}
@keyframes pdetail-reveal {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.pdetail-grid { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 48px; padding: 4px 8px 44px; }
.pdetail-media { display: flex; flex-direction: column; gap: 22px; }
.pdetail-figs { display: flex; flex-direction: column; gap: 18px; }
.pdetail-fig { margin: 0; }
.pdetail-fig-frame { border: 1px solid var(--ll-mist); border-radius: var(--radius-md); overflow: hidden; background: var(--ll-white); box-shadow: var(--shadow-1); }
.pdetail-fig-frame img { display: block; width: 100%; height: auto; }
.pdetail-fig figcaption { margin-top: 8px; font-family: var(--font-sans); font-size: 12px; line-height: 1.45; color: var(--fg-2); }
.glance { margin: 0; border-top: 2px solid var(--ll-ochre); padding-top: 14px; }
.glance-row { padding: 9px 0; border-bottom: 1px solid var(--ll-mist); }
.glance-row dt { font-family: var(--font-sans); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ll-ochre-deep); margin: 0 0 3px; }
.glance-row dd { margin: 0; font-size: 14px; line-height: 1.45; color: var(--fg-1); }
.pdetail-copy { padding-top: 4px; }
.pdetail-section { margin-bottom: 24px; }
.pdetail-section h4 { font-family: var(--font-sans); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ll-umber); margin: 0 0 9px; }
.pdetail-section p { font-size: 16px; line-height: 1.62; color: var(--fg-1); margin: 0; }
.pdetail-links { margin-top: 26px; border-top: 1px solid var(--ll-mist); padding-top: 18px; }
.pdetail-links-label { font-family: var(--font-sans); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-2); }
.pdetail-links ul { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.pdetail-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--ll-signal); font-size: 14.5px; font-weight: 500; border-bottom: 1px solid transparent; transition: color var(--dur-fast), border-color var(--dur-fast); }
.pdetail-links a:hover { color: var(--ll-signal-deep); border-bottom-color: currentColor; }

/* ============================================================
   Responsive layout — replaces the page-level inline grids and
   collapses every multi-column block on tablet and phone.
   (The brief calls for full responsiveness: single-column bands,
   swipeable carousels, and a hamburger nav on small screens.)
   ============================================================ */

/* Reusable two-column splits (used by Home + Contact in place of inline grids) */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.split-2.align-start { align-items: flex-start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 48px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Hamburger toggle — hidden on desktop, shown on small screens */
.nav-toggle {
  display: none;
  width: 44px; height: 44px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid currentColor; border-radius: var(--radius-md);
  color: inherit; cursor: pointer; opacity: 0.85;
}
.nav-toggle:hover { opacity: 1; }
.nav-toggle:focus-visible { outline: 2px solid var(--ll-signal); outline-offset: 2px; }

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .iconstat-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .milestone-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .feature-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .mts { grid-template-columns: 1fr; gap: 40px; }
  .mts.reverse > :first-child { order: 0; }   /* keep natural order when stacked */
  .pdetail-grid { grid-template-columns: 1fr; gap: 32px; }
  .split-2 { gap: 48px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
  .band { padding: 80px 32px; }
  .ll-header { padding: 0 24px; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  /* Reveal the hamburger; turn the nav into a dropdown panel */
  .nav-toggle { display: inline-flex; }
  .ll-header .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ll-mist);
    padding: 8px 24px 16px;
    display: none;
  }
  .ll-header .nav.open { display: flex; }
  /* Force readable dark text in the dropdown regardless of header on-dark state */
  .ll-header .nav a,
  .ll-header.on-dark .nav a { color: var(--fg-1); padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--ll-mist); }
  .ll-header .nav a.active::after { display: none; }

  /* Collapse all multi-column layouts to a single column */
  .split-2, .grid-2, .field-row { grid-template-columns: 1fr; }
  .split-2 { gap: 36px; }
  .iconstat-grid, .milestone-grid, .project-grid, .cap-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: left; }

  /* Tighten section padding for small screens */
  .band { padding: 56px 20px; }
  .hero { padding: 116px 20px 64px; min-height: 520px; }
  .page-hero { padding: 104px 20px 56px; }
  .footer { padding: 56px 20px 32px; }
  .ll-header { padding: 0 20px; }
}
