/* Upcurve home page: hero, goal-line chart, features, timer panel, screens, latest guides, questions, CTA band.
   Shared tokens, nav, footer and the App Store button live in /site.css. */
/* ---------- hero: the night cockpit ---------- */
.hero {
  background:
    radial-gradient(900px 520px at 88% -8%, var(--glow), transparent 62%),
    radial-gradient(600px 400px at -10% 110%, rgba(70, 200, 138, .10), transparent 60%),
    linear-gradient(160deg, var(--panel-1), var(--panel-2));
  color: var(--panel-text); overflow: hidden; position: relative;
}
.hero::before { /* faint instrument grid */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--panel-line) 1px, transparent 1px);
  background-size: 100% 64px;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 70%); mask-image: linear-gradient(90deg, #000 0%, transparent 70%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: end; padding-top: 72px; }
.hero .copy { padding-bottom: 84px; align-self: center; }
.hero .eyebrow { color: var(--green); }
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.15rem); line-height: 1.03;
  letter-spacing: -.045em; font-weight: 780; margin-bottom: 22px; max-width: 13ch;
}
.hero h1 em { font-style: normal; color: var(--green); }
.hero .lead { color: var(--panel-dim); font-size: 1.2rem; max-width: 31em; margin-bottom: 30px; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; color: var(--panel-dim); font-size: 14px; }
.hero .meta span { border: 1px solid rgba(237, 243, 238, .2); border-radius: 999px; padding: 3px 11px; }
.hero-phone { position: relative; justify-self: center; width: min(330px, 80vw); }
.hero-phone .shot {
  border-radius: 46px 46px 0 0; border: 10px solid #040605; border-bottom: 0;
  background: #040605; overflow: hidden; aspect-ratio: 550 / 1010;
  box-shadow: 0 -10px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(237,243,238,.08);
}
.hero-phone .shot img { width: 100%; }
.float {
  position: absolute; background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-radius: 16px; padding: 11px 15px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35); font-size: 13.5px; line-height: 1.3;
}
.float i {
  display: block; font-style: normal; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 2px;
}
.float b { display: block; font-size: 20px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.float b small { font-size: 13px; color: var(--dim); font-weight: 500; letter-spacing: 0; }
.float.f1 { left: -70px; top: 86%; }
.float.f2 { right: -50px; top: 73%; }
@media (prefers-reduced-motion: no-preference) {
  .float { animation: bob 6s ease-in-out infinite; }
  .float.f2 { animation-delay: -3s; }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- section scaffolding ---------- */
.section { padding: 84px 0 8px; }
.section h2, .g-latest h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem); letter-spacing: -.035em; line-height: 1.1;
  font-weight: 750; margin-bottom: 12px; max-width: 22ch;
}
.section p.sub { color: var(--dim); max-width: 40em; margin-bottom: 30px; font-size: 1.08rem; }
.hint { color: var(--dim); font-size: 14px; margin-top: 14px; }

/* ---------- signature: the stepped goal line ---------- */
.climb {
  background: var(--card); border: 1px solid var(--border); border-radius: 24px;
  box-shadow: var(--inset), var(--shadow-sm); padding: 26px 28px 22px;
}
.climb__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 28px; }
.climb__title { font-weight: 650; font-size: 16px; letter-spacing: -.01em; }
.climb__title small { display: block; color: var(--dim); font-weight: 400; font-size: 13.5px; }
.climb__now { text-align: right; font-size: 12.5px; color: var(--dim); white-space: nowrap; }
.climb__now b { display: block; font-size: 30px; line-height: 1.05; letter-spacing: -.03em; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.tag-example {
  display: inline-block; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 10.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--dim);
  border: 1px solid var(--border-2); border-radius: 6px; padding: 1px 6px; margin-left: 8px; vertical-align: 2px;
}
.plot { position: relative; height: 240px; border-bottom: 1px solid var(--border-2); }
.plot .grid-y { position: absolute; inset: 0; pointer-events: none; }
.plot .grid-y i { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--track); }
.plot .grid-y i span { position: absolute; right: 0; top: -9px; font-size: 11px; color: var(--faint); background: var(--card); padding-left: 6px; font-variant-numeric: tabular-nums; }
.cols { position: absolute; inset: 0 34px 0 0; display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; }
.col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar {
  width: 58%; height: var(--h); border-radius: 7px 7px 3px 3px; background: var(--miss);
  transform-origin: bottom; position: relative;
}
.bar.met { background: var(--met); }
.bar em {
  position: absolute; left: 0; right: 0; bottom: 8px; text-align: center;
  font-style: normal; font-size: 11px; font-weight: 600; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.bar.met em { color: var(--on-met); }
.goal-svg { position: absolute; inset: 0 34px 0 0; width: calc(100% - 34px); height: 100%; overflow: visible; pointer-events: none; }
.goal-svg path { fill: none; stroke: var(--goal); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.step-tag {
  position: absolute; transform: translate(-2px, -130%);
  font-size: 11.5px; font-weight: 650; color: var(--text); white-space: nowrap;
  background: var(--card); border: 1px solid var(--border-2); border-radius: 999px; padding: 2px 9px;
}
.step-tag::before { content: "↑ "; color: var(--accent-text); }
.step-tag.first::before { content: ""; }
.weeks { display: grid; grid-template-columns: repeat(12, 1fr); margin-right: 34px; margin-top: 8px; font-size: 12px; color: var(--faint); text-align: center; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--dim); margin-top: 14px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }
.legend i.line { height: 0; width: 18px; border-top: 2.5px solid var(--goal); border-radius: 0; vertical-align: 3px; }
.tally { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.tally div { font-size: 13.5px; color: var(--dim); }
.tally b { display: block; font-size: 1.6rem; color: var(--text); letter-spacing: -.02em; line-height: 1.2; }
.tally .hl b { color: var(--accent-text); }
/* the drawing animation, only when JS and motion are both welcome */
.anim .bar { transform: scaleY(0); }
.anim .goal-svg, .anim .step-tag { clip-path: inset(0 100% 0 0); }
.anim .step-tag { opacity: 0; clip-path: none; }
.anim.in .bar { transform: scaleY(1); transition: transform .9s cubic-bezier(.2,.8,.2,1) calc(var(--i) * 70ms); }
.anim.in .goal-svg { clip-path: inset(0 0 0 0); transition: clip-path 1.6s ease-in-out .35s; }
.anim.in .step-tag { opacity: 1; transition: opacity .4s ease calc(.35s + var(--d) * 1.6s); }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 24px 22px 22px; box-shadow: var(--inset);
}
.card .ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--soft); color: var(--accent-text); margin-bottom: 16px;
}
.card .ico svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.07rem; font-weight: 680; letter-spacing: -.01em; margin-bottom: 7px; }
.card p { color: var(--dim); font-size: 15.5px; line-height: 1.55; }

/* ---------- timer for holds: a cockpit panel ---------- */
.holds {
  position: relative; overflow: hidden; border-radius: 30px;
  background:
    radial-gradient(700px 420px at 100% 0%, var(--glow), transparent 62%),
    linear-gradient(160deg, var(--panel-1), var(--panel-2));
  color: var(--panel-text); padding: 56px 48px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px 40px;
  border: 1px solid rgba(70, 200, 138, .16);
}
.holds .eyebrow { color: var(--green); }
.holds__head { margin-bottom: 28px; }
.holds h2 { color: #FFFFFF; max-width: 24ch; }
.holds p.sub { color: var(--panel-dim); margin-bottom: 4px; }
.holds__list { list-style: none; display: grid; gap: 18px; }
.holds__list li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; }
.holds__list .n {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid rgba(70, 200, 138, .35); color: var(--green); background: rgba(70, 200, 138, .08);
}
.holds__list .n svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.holds__list b { display: block; font-weight: 650; color: #FFFFFF; font-size: 16px; letter-spacing: -.01em; }
.holds__list span { color: var(--panel-dim); font-size: 15px; line-height: 1.5; }
.holds__list q { quotes: "\201C" "\201D"; color: var(--mint); }
.trio { position: relative; display: flex; justify-content: center; align-items: center; align-self: center; }
.trio figure { margin: 0; min-width: 0; flex: 0 0 36%; position: relative; z-index: 1; }
.trio figure:nth-child(1) { margin-right: -8%; transform: rotate(-4deg) translateY(14px); }
.trio figure:nth-child(3) { margin-left: -8%; transform: rotate(4deg) translateY(14px); }
.trio figure:nth-child(2) { flex-basis: 43%; z-index: 2; }
.trio .ph {
  border-radius: 30px; border: 7px solid #040605; background: #040605; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(237,243,238,.08);
}
.trio figcaption { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--panel-dim); text-align: center; margin-top: 14px; }

/* ---------- screens ---------- */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 8px auto 0; max-width: 900px; }
.shots figure { margin: 0; min-width: 0; }
.shots img { border-radius: 30px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); background: var(--card); }
.shots figcaption { margin-top: 12px; text-align: center; }
.shots figcaption b { display: block; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.shots figcaption span { color: var(--dim); font-size: 14px; }

/* ---------- latest guides ({{latest-guides}} in src/build.py) ---------- */
.g-latest { padding: 84px 0 8px; }
.g-latest .mono { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; color: var(--accent-text); }
.g-latest .mono::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.g-latest h2 { margin-bottom: 30px; }
.g-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.g-card {
  display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden; text-decoration: none; color: var(--text); padding-bottom: 20px;
  box-shadow: var(--inset); transition: transform .2s ease, border-color .2s ease;
}
.g-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.g-card .thumb { display: block; aspect-ratio: 16 / 10; margin-bottom: 10px; overflow: hidden; }
.g-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-card .tag { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin: 0 20px; }
.g-card b { font-size: 1.07rem; line-height: 1.3; letter-spacing: -.01em; margin: 0 20px; }
.g-all { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 18px 22px; border: 1px solid var(--border); border-radius: 18px; background: var(--card); color: var(--text); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.g-all:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.g-all__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.g-all__text b { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.g-all__text small { color: var(--dim); font-size: 14px; }
.g-all__arrow { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent-text); font-size: 18px; font-weight: 600; transition: background .15s, color .15s; }
.g-all:hover .g-all__arrow { background: var(--accent); color: var(--on-met); }

/* ---------- questions ---------- */
.faq h2 { margin-bottom: 22px; }
.faq details { border-top: 1px solid var(--border); padding: 18px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; font-weight: 650; font-size: 1.04rem; letter-spacing: -.01em; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border-2); color: var(--accent-text); font-weight: 400; font-size: 1.1rem; line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--dim); margin-top: 10px; max-width: 62ch; }

/* ---------- CTA band ---------- */
.cta-band {
  margin-top: 96px; position: relative; overflow: hidden;
  background:
    radial-gradient(800px 320px at 92% 0%, var(--glow), transparent 62%),
    linear-gradient(160deg, var(--panel-1), var(--panel-2));
  color: var(--panel-text);
}
.cta-band .wrap { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 26px; padding-top: 56px; padding-bottom: 56px; }
.cta-band h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); letter-spacing: -.035em; line-height: 1.12; font-weight: 750; max-width: 20ch; }
.cta-band h2 em { font-style: normal; color: var(--green); }
.cta-band p { color: var(--panel-dim); margin-top: 8px; }
.cta-band svg.curve { position: absolute; right: 0; bottom: 0; width: 520px; max-width: 70%; height: auto; opacity: .35; pointer-events: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .features { grid-template-columns: 1fr 1fr; }
  .holds { grid-template-columns: 1fr; padding: 40px 28px; gap: 36px; }
  .trio { max-width: 520px; width: 100%; justify-self: center; }
  .shots { grid-template-columns: repeat(3, 58%); overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px; }
  .shots figure { scroll-snap-align: start; }
  .float.f2 { right: -16px; }
}
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 10px; padding-top: 44px; }
  .hero .copy { padding-bottom: 30px; }
  .hero-phone { width: min(290px, 74vw); }
  .float.f1 { left: -22px; top: 87%; } .float.f2 { right: -18px; top: 73%; }
  .float { padding: 9px 12px; } .float b { font-size: 17px; }
  .features, .g-grid { grid-template-columns: 1fr; }
  .section, .g-latest { padding-top: 68px; }
  .climb { padding: 20px 16px 18px; border-radius: 20px; }
  .climb__head { margin-bottom: 30px; }
  .climb__now b { font-size: 24px; }
  .plot { height: 190px; }
  .bar { width: 66%; }
  .bar em { display: none; }
  .weeks { font-size: 10.5px; }
  .tally { gap: 12px 26px; }
  .tally b { font-size: 1.3rem; }
  .step-tag { font-size: 10.5px; padding: 1px 7px; }
  .holds { border-radius: 24px; padding: 32px 20px 36px; }
  .trio .ph { border-width: 4px; border-radius: 18px; }
  .trio figcaption { font-size: 9.5px; }
  .shots { grid-template-columns: repeat(3, 72%); }
  .cta-band .wrap { padding-top: 44px; padding-bottom: 44px; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 2.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim .bar { transform: none; } .anim .goal-svg { clip-path: none; } .anim .step-tag { opacity: 1; }
}
.more-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; }
.more-links a { font-weight: 600; color: var(--accent-text); text-decoration: none; }
.more-links a::after { content: " →"; }
.more-links a:hover { text-decoration: underline; }
