/* Tiphareth Studio — work-as-landing-page layout.
   Loaded only by _layouts/landing.html. Everything here is namespaced under
   .landing so no other page can be reached. The glass, the sand ground, the
   Cormorant heads and the single gold accent all come from main.css — this
   file only arranges them into a longer argument. */

/* ---------- Shared glass (same recipe as .work-card / .prose-panel) ---------- */

.landing .landing-glass {
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.30), rgba(255,255,255,0.04) 45%), rgba(246, 241, 235, 0.34);
  border: 1.5px solid rgba(246, 241, 235, 0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 4px 24px rgba(28, 28, 30, 0.18);
  color: var(--canvas-ink);
  transition: background 400ms ease, border-color 400ms ease;
}

[theme="dark"] .landing .landing-glass {
  background: linear-gradient(135deg, rgba(226,192,128,0.055), rgba(226,192,128,0) 45%), rgba(20, 15, 35, 0.42);
  border: 1.5px solid rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(226,192,128,0.09), 0 4px 24px rgba(0, 0, 0, 0.20);
}

/* ---------- Section frame ---------- */

/* main.css styles the bare `section` element (700px, centred). The landing
   sections live inside .page's own 820px column, so undo that. */
.landing .landing-section {
  max-width: none;
  margin: 0;
  padding: 0;
}

.landing .section-eyebrow {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

.landing .landing-section h2 {
  font-size: clamp(1.7rem, 4vw, 2.1rem);
  text-align: center;
  line-height: 1.25;
  max-width: 30rem;
  margin: 0 auto 1rem;
}

.landing .landing-section .section-lead {
  max-width: 34rem;
  margin: 0 auto 2.6rem;
}

/* ---------- Header ---------- */

.landing .landing-lede {
  margin-top: 1.2rem;
  font-size: 1rem;
  color: var(--secondary-text-color);
}

/* ---------- Figures (the diagrams do the arguing) ---------- */

.landing .figure-wide {
  width: min(1040px, calc(100vw - 3rem));
  margin-left: 50%;
  transform: translateX(-50%);
}

.landing .landing-figure {
  margin-block: 0 2.2rem;
  padding: 1.8rem clamp(1.2rem, 4vw, 2.6rem) 1.4rem;
  text-align: center;
}

.landing .landing-figure .figure-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 780px;
  margin: 0 auto;
}

.landing .figure-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--canvas-ink-soft);
  margin-bottom: 1.2rem;
}

.landing .landing-figure figcaption {
  margin: 1.1rem auto 0;
  max-width: 40rem;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--canvas-ink-soft);
}

/* ---------- I · the pains ---------- */

.landing .pain-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 0 0 2.4rem;
  padding: 0;
  counter-reset: pain;
}

.landing .pain {
  position: relative;
  padding: 1.3rem 1.4rem 1.2rem;
}

/* Ordinal marker. Sized to be readable rather than decorative — at 0.78rem
   and 70% alpha it was effectively invisible on the fusion ground. Kept below
   the card heading so it still reads as a marker, not a label. */
.landing .pain-num {
  position: absolute;
  top: 0.9rem;
  right: 1.2rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: rgba(212, 175, 55, 0.92);
}

.landing .pain h3 {
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 0.45rem;
  padding-right: 2.3rem;
  color: var(--canvas-ink);
}

.landing .pain p {
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--canvas-ink);
  opacity: 0.85;
}

/* ---------- II · the reframe ---------- */

.landing .landing-rule {
  max-width: 34rem;
  margin: 0 auto 2.4rem;
  padding-left: 1.2rem;
  border-left: 2px solid var(--gold);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--secondary-color);
}

.landing .ledger {
  padding: 1.6rem clamp(1.2rem, 4vw, 2.2rem);
  margin-bottom: 2rem;
}

.landing .ledger-head,
.landing .ledger-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0 1.1rem;
}

.landing .ledger-head {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--canvas-ink-soft);
  padding-bottom: 0.8rem;
}

.landing .ledger-row {
  padding: 0.85rem 0;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  font-size: 0.9rem;
  line-height: 1.5;
}

.landing .ledger-before {
  color: var(--canvas-ink);
  opacity: 0.7;
}

.landing .ledger-after {
  color: var(--canvas-ink);
}

.landing .ledger-arrow svg {
  display: block;
  width: 52px;
  height: 10px;
}

.landing .aside {
  padding: 1.5rem clamp(1.2rem, 4vw, 2.2rem);
  margin-bottom: 1.6rem;
}

.landing .aside-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

.landing .aside p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--canvas-ink);
}

.landing .aside p + p { margin-top: 0.8rem; }

/* ---------- III · capabilities ---------- */

.landing .cap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.landing .cap {
  padding: 1.4rem 1.4rem 1.3rem;
  display: flex;
  flex-direction: column;
}

.landing .cap h3 {
  font-size: 1.12rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 0.9rem;
  color: var(--canvas-ink);
}

.landing .cap-diagram { margin-bottom: 1rem; }

.landing .cap-diagram .cap-svg {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: 0 auto;
}

.landing .cap p {
  font-size: 0.87rem;
  line-height: 1.6;
  color: var(--canvas-ink);
  opacity: 0.88;
}

.landing .cap-tool {
  margin-top: auto;
  padding-top: 0.9rem;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 0.92rem;
  color: var(--gold);
  opacity: 0.95;
}

/* ---------- IV · architecture ---------- */

.landing .arch-note {
  max-width: 36rem;
  margin: 0 auto 1.6rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--secondary-color-2);
}

.landing .parts {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.landing .parts li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.9rem;
  align-items: baseline;
  font-size: 0.85rem;
  line-height: 1.5;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(212, 175, 55, 0.16);
  color: var(--canvas-ink);
}

.landing .part-name {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 0.98rem;
  color: var(--gold);
}

.landing .part-role { opacity: 0.85; }

/* ---------- V · the closing essay ---------- */

.landing .landing-essay { margin-top: 0.6rem; }

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .landing .pain-grid,
  .landing .cap-grid { grid-template-columns: 1fr; }

  .landing .ledger-head { display: none; }

  .landing .ledger-row {
    grid-template-columns: 1fr;
    gap: 0.4rem 0;
  }

  /* stacked: keep the arrow horizontal — rotating a 52x10 viewBox letterboxes
     it into an illegible tick */
  .landing .ledger-arrow svg {
    width: 34px;
    height: 7px;
    margin: 0.15rem 0;
  }

  .landing .parts li { grid-template-columns: 1fr; gap: 0.1rem; }

  /* ---------- Figures: pan, don't shrink ----------

     The figures are hand-tuned drawings on a 620- or 660-unit viewBox. Letting
     them fit the phone width scaled them to 0.49x and dragged the type down with
     them: 12-unit labels landed at 5.8px, i.e. unreadable. Scaling the type back
     up in CSS was measured and rejected — these drawings have under 25% of
     horizontal slack before labels collide with each other or run out of the
     viewBox (the 660x200 query figure breaks first, at ~1.3x), and closing a
     2x deficit needs ~1.9x.

     So: hold every figure at its natural 1:1 size and let the card pan. A
     uniform scale preserves the drawing exactly — nothing is re-laid-out, only
     the window onto it is smaller than the whole.

     Why an explicit min-width and not an intrinsic keyword: an <svg> carrying
     only a viewBox has no CSS intrinsic width. width:auto, width:max-content,
     width:fit-content and min-width:max-content were all tried here and all
     resolve to the container width — they parse, compute, and do nothing. The
     px value is the viewBox width, so it must be kept in step with it. */
  .landing .landing-figure {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    /* reclaim gutter so the crossover into panning happens as late as possible */
    padding-inline: 0.9rem;
    /* Brass the scrollbar where the platform draws one. Measured here it costs
       zero layout height, i.e. it is an overlay that only appears mid-scroll, so
       treat this as decoration and not as the affordance — the "drag to pan"
       cue below is what actually tells the reader. */
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.5) transparent;
  }

  .landing .landing-figure::-webkit-scrollbar { height: 6px; }
  .landing .landing-figure::-webkit-scrollbar-track { background: transparent; }
  .landing .landing-figure::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.5);
    border-radius: 3px;
  }

  /* the framing text is not part of the drawing — pin it so it stays readable
     while the drawing pans underneath */
  .landing .landing-figure .figure-eyebrow,
  .landing .landing-figure figcaption {
    position: sticky;
    left: 0;
  }

  .landing .landing-figure .figure-svg {
    max-width: none;
    margin-inline: 0;
    min-width: 620px;
  }

  .landing .landing-figure .figure-svg[viewBox^="0 0 660"] { min-width: 660px; }
}

/* The panning cue.

   The brass hairline above is a desktop-only affordance: on touch devices
   scrollbars are transient overlays that appear during a scroll, which is after
   the reader needed to know. So say it in words instead.

   Attached to the figure rather than to .figure-eyebrow because the last figure
   on every one of the seven pages has no eyebrow.

   600px, not the 720px above, is where this turns on: the rule needs to promise
   something true, and at 620px of drawing against (100vw - 76.8px) of card the
   620-unit figures only start panning below ~697px. At 600px there is ~100px to
   pan — enough that the cue is earned rather than pedantic. */
@media (max-width: 600px) {
  .landing .landing-figure::after {
    content: "drag to pan";
    display: block;
    position: sticky;
    left: 0;
    margin-top: 0.8rem;
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.65;
  }
}
