/* semnal.me home page: "The ring is the page" (from mockup 04).
   Shared tokens, body, .wrap, .muted and .kicker come from site.css. Everything here is scoped to .home,
   so nothing leaks into /privacy, /terms or posts.
   One passive scroll listener (ring.js) writes --p (0..1) on the scene; CSS derives every transform and
   opacity from it. The phones are schematic drawings, not the app's real screens. */

.home .btn { display: inline-block; padding: 13px 26px; border-radius: 999px; background: var(--coral); color: #fff; font-weight: 600; text-decoration: none; }
.home .btn:hover { background: var(--coral-lo); color: #fff; }
.home .btn:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.home .btnnote { font-size: 12px; margin: 8px auto 0; }

/* ---------- the scene: a tall block with one pinned stage ---------- */
.home .scene { --p: 0; position: relative; height: 560vh; }
.home .stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg);
  --cy: 40%;                              /* how far down the ring's centre sits */
  --R: min(36vw, 25vh, 290px);            /* radius of the outer orbit */
  --pw: calc(var(--R) * .25);             /* width of a small phone outline */
  --phh: calc(var(--pw) * 1.9);
  /* sub-progress of each part of the story, all 0..1 */
  --sig: clamp(0, (var(--p) - .36) / .08, 1);   /* the phone becomes the signal */
  --ppl: clamp(0, (var(--p) - .58) / .06, 1);   /* the people appear */
}
@supports (height: 1svh) { .home .stage { --R: min(36vw, 25svh, 290px); } }

/* everything radial hangs off one zero-size point: the centre of the ring */
.home .centre { position: absolute; left: 50%; top: var(--cy); width: 0; height: 0; }
.home .round { position: absolute; left: calc(var(--d) / -2); top: calc(var(--d) / -2); width: var(--d); height: var(--d); border-radius: 50%; pointer-events: none; }

.home .orbit { border: 1px solid var(--line); }
.home .o1 { --d: calc(var(--R) * 1.48); } .home .o2 { --d: calc(var(--R) * 1.76); } .home .o3 { --d: calc(var(--R) * 2); }

/* glow: scroll sets how much, a slow breath (3.6s) lives on the inner element */
.home .glow { --d: calc(var(--R) * 2.3); opacity: calc(var(--sig) * .9); }
.home .glow i { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(255,122,89,.42), rgba(255,122,89,.14) 42%, rgba(255,122,89,0) 68%); animation: breathe 3.6s ease-in-out infinite alternate; }
@keyframes breathe { from { opacity: .6; } to { opacity: 1; } }

/* concentric rings spreading outward, one after another */
.home .wave { --d: calc(var(--R) * 2); border: 1.5px solid var(--coral); --w: clamp(0, (var(--p) - var(--w0)) / .2, 1);
  transform: scale(calc(.45 + var(--w) * .75)); opacity: clamp(0, min(var(--w) * 8, (1 - var(--w)) * 2), .7); }

/* the ring that travels out to the people */
.home .travel { --d: calc(var(--R) * 2); border: 2px solid var(--coral);
  transform: scale(clamp(.5, .74 + (var(--p) - .68) * 1.4, 1.08));
  opacity: clamp(0, min((var(--p) - .6) * 20, (.93 - var(--p)) * 20), .9); }

/* the ring itself */
.home .ring { --d: calc(var(--R) * 1.1); transform: scale(calc(.8 + .2 * var(--sig))); }
.home .ring svg { display: block; width: 100%; height: 100%; }
.home .ring .fill { opacity: var(--sig); }

/* a window of the story: visible between --from and --to, fading at both ends */
.home .win { opacity: clamp(0, min((var(--p) - var(--from)) * var(--k, 25), (var(--to) - var(--p)) * var(--k, 25)), 1); }

.home .tagl { position: absolute; white-space: nowrap; font-size: 11px; letter-spacing: .04em; color: var(--muted); background: #fff; padding: 1px 6px; border-radius: 999px; line-height: 1.6; }
.home .l-top { left: 0; bottom: calc(var(--R) * .6); transform: translateX(-50%); }
.home .l-left { right: calc(var(--R) * .58); top: 0; transform: translateY(-50%); text-align: right; border-radius: 8px; }
.home .l-right { left: calc(var(--R) * .58); top: 0; transform: translateY(-50%); border-radius: 8px; }
@media (min-width: 800px) { .home .tagl { font-size: 13px; } }

/* the people you chose: small phone outlines on the orbits */
.home .person { position: absolute; left: 0; top: 0; width: 0; height: 0;
  transform: translate(calc(var(--R) * var(--x)), calc(var(--R) * var(--y)));
  opacity: var(--ppl); --lit: clamp(0, (var(--p) - var(--at)) * 25, 1); }
.home .ph { position: absolute; left: calc(var(--pw) / -2); top: calc(var(--phh) / -2); width: var(--pw); height: var(--phh); border: 1.5px solid #c9c6c0; border-radius: calc(var(--pw) * .24); background: #fff; }
.home .ph::after { content: ""; position: absolute; z-index: -1; left: -60%; right: -60%; top: -20%; bottom: -20%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,122,89,.4), rgba(255,122,89,0)); opacity: var(--lit); }
.home .lit { position: absolute; inset: -1.5px; border: 1.5px solid var(--coral); border-radius: inherit; background: #fff3ee; opacity: var(--lit); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7%; }
.home .lit b { width: 40%; aspect-ratio: 1; border-radius: 50%; border: calc(var(--pw) * .07) solid var(--coral); margin-bottom: 6%; }
.home .lit s { width: 56%; height: 1.5px; background: #dcb5aa; }
.home .chip { position: absolute; left: 0; top: calc(var(--phh) / 2 + 6px); transform: translateX(-50%); opacity: var(--lit); display: grid; white-space: nowrap; font-size: 11px; line-height: 1.5; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.home .chip.up { top: auto; bottom: calc(var(--phh) / 2 + 6px); }
.home .chip span { grid-area: 1 / 1; text-align: center; }
@media (min-width: 800px) { .home .chip { font-size: 12px; padding: 2px 10px; } }

/* the words: under the ring, one caption per part of the story */
.home .caps { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--cy) + var(--R) + 16px); }
.home .cap { position: absolute; left: 0; right: 0; top: 0; padding: 0 16px; text-align: center; pointer-events: none; }
.home .cap > * { max-width: 600px; margin-left: auto; margin-right: auto; }
.home .cap .kicker { font-size: 11px; margin: 0 0 4px; }
.home .cap h2 { font-size: clamp(24px, min(5vw, 5.4vh), 46px); font-weight: 300; line-height: 1.12; letter-spacing: -0.02em; margin: 0 auto 8px; }
.home .cap p.t { font-size: clamp(15px, 1.5vw, 18px); color: var(--muted); margin-top: 0; margin-bottom: 0; max-width: 460px; }
.home .hero-cap { pointer-events: auto; }
/* Faded out: not clickable and not in the tab order either. */
.home .stage.past .hero-cap { pointer-events: none; visibility: hidden; }
.home h1 { font-size: clamp(40px, min(9vw, 10vh), 88px); font-weight: 200; line-height: 1; letter-spacing: -0.03em; margin: 0 auto; }
.home .tag { font-size: clamp(16px, 2vw, 21px); font-weight: 300; margin-top: 6px; margin-bottom: 14px; }
.home .sum { display: none; font-size: 16px; margin-top: -4px; margin-bottom: 16px; max-width: 460px; }
@media (min-height: 900px) and (min-width: 800px) { .home .sum { display: block; } }
.home .hint { font-size: 12px; margin-top: 10px; margin-bottom: 0; }

/* ---------- tapping the ring: on every slide it moves to the next slide ---------- */
.home .tapring { position: absolute; left: 50%; top: var(--cy); width: calc(var(--R) * 1.1); height: calc(var(--R) * 1.1);
  transform: translate(-50%, -50%); border: 0; padding: 0; border-radius: 50%; background: transparent;
  cursor: pointer; -webkit-tap-highlight-color: transparent; z-index: 2; }
.home .tapring:focus-visible { outline: 2px solid var(--text); outline-offset: 6px; }
.home .tapring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--coral); opacity: 0; transform: scale(.8); }
.home .tapring.go::after { animation: tapgo .7s ease-out; }
@keyframes tapgo { 0% { opacity: .9; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.9); } }
.home .tapnote { font-size: 12px; color: var(--muted); margin-top: 12px !important; margin-bottom: 0; }

/* Short screens (a phone held sideways): the ring moves up and gets smaller, and the words get
   smaller, so every caption and the hero's button still fit above the bottom edge. */
@media (max-height: 560px) {
  .home .stage { --cy: 27%; --R: min(36vw, 17vh, 290px); }
  @supports (height: 1svh) { .home .stage { --R: min(36vw, 17svh, 290px); } }
  .home .caps { top: calc(var(--cy) + var(--R) + 8px); }
  .home .stage h1 { font-size: 30px; }
  .home .stage .tag { font-size: 15px; margin: 2px 0 8px; }
  .home .stage .btn { padding: 8px 20px; font-size: 15px; }
  .home .stage .btnnote { margin-top: 4px; font-size: 11px; }
  .home .stage .hint { margin-top: 4px; font-size: 11px; }
  .home .cap h2 { font-size: 22px; margin-bottom: 4px; }
  .home .cap p.t { font-size: 14px; line-height: 1.35; }
  .home .cap .kicker { margin-bottom: 2px; }
  .home .tapnote { margin-top: 4px !important; font-size: 11px; }
}

/* ---------- the story as a plain list ----------
   Shown by default: without JavaScript, and with Reduce Motion on. The pinned stage is shown only
   when the page is scripted (<html class="js">) and Reduce Motion is off (no .no-story). */
.home .scene { display: none; }
.home .storylist { display: block; padding: 72px 0 40px; }
/* .story-ready is set by ring.js once it runs: a script that never loads leaves the list in place. */
.js.story-ready:not(.no-story) .home .scene { display: block; }
.js.story-ready:not(.no-story) .home .storylist { display: none; }
@media (prefers-reduced-motion: reduce) {
  .home .scene { display: none !important; }
  .home .storylist { display: block !important; }
}
.home .storylist .head { text-align: center; margin-bottom: 40px; }
.home .storylist .head svg { width: 96px; height: 96px; display: block; margin: 0 auto 18px; }
.home .storylist .head .sumline { max-width: 460px; margin: 0 auto 18px; }
.home .storylist ol { list-style: none; counter-reset: s; max-width: 620px; margin: 0 auto; padding: 0; }
.home .storylist li { counter-increment: s; position: relative; padding: 18px 0 18px 52px; border-top: 1px solid var(--line); }
.home .storylist li::before { content: counter(s); position: absolute; left: 0; top: 18px; width: 32px; height: 32px; border-radius: 50%; border: 5px solid var(--coral); font-size: 0; }
.home .storylist li .kicker { font-size: 11px; margin: 0 0 4px; }
.home .storylist h2 { font-size: 22px; font-weight: 400; margin: 0 0 4px; letter-spacing: -0.01em; }
.home .storylist p.t { margin: 0; color: var(--muted); }

/* ---------- the still sections ---------- */
.home section.plain { padding: 80px 0; border-top: 1px solid var(--line); }
.home section.plain h2 { font-size: clamp(30px, 5.4vw, 52px); font-weight: 200; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 10px; text-align: center; }
.home .lead { text-align: center; max-width: 620px; margin: 0 auto 44px; font-size: 18px; font-weight: 300; }
.home .trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px; }
.home .trio h3 { font-weight: 400; }
.home .trio p { margin: 0; font-size: 15px; color: var(--muted); }
.home .trio p.limit { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text); }

/* who it is for: three circles, each with a small ring sitting on its edge */
.home .disc { position: relative; width: 176px; height: 176px; border-radius: 50%; border: 1px solid #d6d2cb; margin: 0 auto 24px; display: grid; place-items: center; text-align: center; padding: 22px; }
.home .disc::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; border: 1px solid var(--line); }
.home .disc h3 { position: relative; margin: 0; font-size: 19px; line-height: 1.2; font-weight: 300; letter-spacing: -0.01em; }
.home .disc i { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 4px solid var(--coral); background: #fff; transform: rotate(var(--a)) translateY(-88px); }

/* more it can do: small diagram icons */
.home .ico { display: block; width: 64px; height: 64px; margin: 0 0 14px; }
.home .ico * { fill: none; stroke: var(--text); stroke-width: 1.2; stroke-linecap: round; }
.home .ico .hair { stroke: #cfcbc4; }
.home .ico .dot { fill: var(--text); }
.home .more h3 { margin: 0 0 6px; font-size: 20px; }
.home .alt { background: var(--bg2); }

.home .panels { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0; border: 1px solid var(--line); border-radius: 28px; background: #fff; }
.home .panel { padding: 34px; }
.home .panel + .panel { border-left: 1px solid var(--line); }
.home .panel h3 { margin: 0 0 14px; font-size: 26px; font-weight: 300; letter-spacing: -0.01em; }
.home .panel ul { list-style: none; margin: 0; padding: 0; }
.home .panel li { position: relative; padding: 10px 0 10px 24px; font-size: 15px; color: var(--muted); border-top: 1px solid var(--line); }
.home .panel li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #b9b5ae; }
.home .panel .plainline { margin: 0; }
.home .small { font-size: 13px; margin: 14px 0 0; }

.home .close { position: relative; overflow: hidden; text-align: center; padding: 120px 0 !important; }
.home .close::before, .home .close::after { content: ""; position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1px solid var(--line); pointer-events: none; }
.home .close::before { width: 460px; height: 460px; margin: -230px 0 0 -230px; }
.home .close::after { width: 760px; height: 760px; margin: -380px 0 0 -380px; }
.home .close .wrap { position: relative; z-index: 1; }
.home .close h2 { max-width: 760px; margin: 0 auto 28px !important; }

@media (max-width: 760px) {
  .home section.plain { padding: 56px 0; }
  .home .trio { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .home .panels { grid-template-columns: minmax(0, 1fr); }
  .home .panel { padding: 24px 20px; }
  .home .panel + .panel { border-left: 0; border-top: 1px solid var(--line); }
  .home .close { padding: 88px 0 !important; }
}
