/* ============================================================
   page.css — CuttingStraight_Site home page
   ------------------------------------------------------------
   Only the page-specific layout. Colour, type, measure and the
   meaning-carrying components come from tokens.css/components.css,
   copied verbatim from Bible_Study/Design (canonical source — keep
   these two files in sync with that project if it changes).
   ============================================================ */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.scrollprogress {
  position: fixed; top: 0; left: 0; z-index: 20;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--brass));
  transform: scaleX(var(--scroll, 0));
  transform-origin: left center;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .scrollprogress { transition: transform .08s linear; }
}

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  padding: 14px 28px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.topbar .brand { text-decoration: none; }

.topnav {
  display: flex; gap: 20px; flex-wrap: wrap;
  margin-right: auto;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.topnav a {
  color: var(--ink-soft); text-decoration: none;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
}
.topnav a:hover { color: var(--ink); }
.topnav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

.themetoggle {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-faint); background: none;
  border: 1px solid var(--rule-strong); border-radius: 3px;
  padding: 5px 10px; cursor: pointer;
}
.themetoggle:hover { color: var(--ink); }

/* ---------- the column, hung off the plumb line ---------- */

.page {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 64px 28px 0 calc(28px + clamp(20px, 3vw, 40px));
}
.plumb {
  position: absolute; left: 28px; top: 64px; bottom: 0;
  width: 1px; background: var(--rule);
}
.plumb::before {
  content: ""; position: absolute; left: -1px; top: 0;
  width: 3px; height: 64px;
  background: linear-gradient(var(--brass), transparent);
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 56px; align-items: center;
}
.hero h1 {
  max-width: var(--measure);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600; line-height: 1.1;
  letter-spacing: -.02em; margin: .45em 0 .5em; text-wrap: balance;
}
.verse {
  max-width: var(--measure);
  margin: 0 0 1.4em; padding: 0;
}
.verse p {
  margin: 0 0 6px;
  font-size: 20px; line-height: 1.55; font-style: italic;
  color: var(--ink-soft); text-wrap: pretty;
}
.verse cite {
  font-family: var(--font-mono); font-style: normal;
  font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-faint);
}
.intro { max-width: var(--measure); margin: 0 0 1.6em; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  padding: 10px 16px; border-radius: 3px;
  border: 1px solid var(--rule-strong);
  color: var(--ink); background: var(--surface);
}
.btn:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn.primary:hover { color: var(--paper); filter: brightness(1.12); }

/* "The Measured Word": a column of text hung against the plumb line,
   settled and open marks in the margin, a Grounding line beneath. */
.measure { margin: 0; }
.measure svg { display: block; width: 100%; height: auto; overflow: visible; }
.fig-anchor { fill: var(--brass); }
.fig-text rect { fill: var(--rule-strong); }
.fig-settled { fill: none; stroke: var(--settled); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fig-open { fill: var(--open); font-family: var(--font-mono); font-weight: 700; font-size: 15px; }
.fig-ground { fill: var(--sunk); }
.fig-ground-edge { fill: var(--accent); }
.fig-ground-line { fill: var(--rule-strong); }
.fig-line { stroke: var(--accent); stroke-width: 1.4; }
.fig-bob { fill: var(--brass); }

@media (prefers-reduced-motion: no-preference) {
  .fig-line { stroke-dasharray: 290; stroke-dashoffset: 290; animation: fig-draw 1.3s .2s ease-out forwards; }
  .fig-bob { opacity: 0; animation: fig-bob .5s 1.4s ease-out forwards; }
  @keyframes fig-draw { to { stroke-dashoffset: 0; } }
  @keyframes fig-bob { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
}

/* ---------- sections ---------- */

.block { margin-top: 88px; }
.block > .eyebrow { margin-bottom: 14px; }
.section-title {
  font-size: 28px; font-weight: 600; line-height: 1.2;
  letter-spacing: -.01em; margin: 0 0 .7em;
}
.section-intro { max-width: var(--measure); color: var(--ink-soft); margin: -.2em 0 1.4em; }
.note { color: var(--ink-soft); margin: 0; }
.more { margin: 22px 0 0; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; }
.more a::after, .resource-card a.go::after { content: " \2192"; }

.tiles {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--rule);
  border: 1px solid var(--rule); border-radius: 3px; overflow: hidden;
}
.tile { background: var(--surface); padding: 20px 22px; }
.tile .label { display: block; margin-bottom: 10px; color: var(--accent); }
.tile .label .s { color: var(--settled); }
.tile .label .o { color: var(--open); }
.tile p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-soft); }

.groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.group {
  display: block; color: inherit;
  background: var(--surface);
  border: 1px solid var(--rule-strong); border-top: 3px solid var(--accent);
  border-radius: 3px; padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.group:hover { text-decoration: none; box-shadow: var(--shadow-lift); }
.group .label { display: block; margin-bottom: 8px; color: var(--accent); font-size: 12px; }
.group p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-soft); }
@media (prefers-reduced-motion: no-preference) {
  .group:hover { transform: translateY(-2px); }
}

.resource-card {
  max-width: var(--measure);
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  border-left: 3px solid var(--rule-strong);
  border-radius: 3px;
  padding: 22px 26px;
}
.resource-card .label { display: block; margin-bottom: 10px; }
.resource-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 600;
}
.resource-card p { margin: 0 0 12px; color: var(--ink-soft); font-size: 16.5px; }
.resource-card .boundary {
  font-size: 15px; color: var(--ink-faint);
  border-top: 1px solid var(--rule); padding-top: 10px; margin-bottom: 14px;
}
.resource-card a.go {
  font-family: var(--font-mono); font-size: 12.5px;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-2);
}

.foot {
  max-width: 1000px; margin: 96px auto 60px;
  padding: 20px 28px 0 calc(28px + clamp(20px, 3vw, 40px));
  display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.6;
  color: var(--ink-faint);
}
.foot nav { display: flex; gap: 18px; }
.foot a { color: var(--ink-soft); }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr) 150px; gap: 32px; }
  .tiles, .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .page { padding: 40px 16px 0; }
  .plumb { display: none; }
  .hero { grid-template-columns: 1fr; }
  .measure { display: none; }
  .tiles, .groups { grid-template-columns: 1fr; }
  .block { margin-top: 64px; }
  .topbar { gap: 16px; padding: 12px 16px; }
  .topnav { gap: 14px; }
  .foot { padding: 20px 16px 0; }
}
