/* The landing page. Values come from tokens.css (design/tokens.css);
   the rules follow design/DESIGN.md. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 16px/1.65 var(--font);
}

/* Sizes and weights from the font guide (design/reference/font-guide.md):
   Barlow throughout, headings in 700; Raleway only for the brand name. */
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1em; }

a { color: var(--accent-dark); text-underline-offset: .15em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 40rem) { .wrap { padding: 0 32px; } }

/* The wordmark: the word itself, Raleway ExtraBold, blue on light grounds,
   white on dark ones, gold only on the glass over the waves. */
.wm {
  font-family: var(--font-label);
  font-weight: 800;
  font-variant-numeric: lining-nums;
  font-kerning: auto;
  letter-spacing: 0;
  text-decoration: none;
}
.wm-blue { color: var(--ragnord-blue); }

/* The product's name, wherever the page names it: Raleway Italic, regular
   weight, slightly tracked, in body text and headings alike, as beside the
   wordmark in the product's sidebar but at 400 instead of 300 (the user's
   rule, 2026-11-19). In charcoal on light grounds and in a muted gold on
   dark ones. */
:root { --ask-on-light: #35393a; --ask-on-dark: #a38d58; }
.ask, .hero-title .product {
  font-family: var(--font-label); font-weight: 400; font-style: italic; letter-spacing: .04em;
}
.ask { color: var(--ask-on-light); }
.wm-gold { color: var(--accent); }

/* "Ask" marked with the product's highlighter (js/marker.js): gold while
   it waits, then the marker draws across it from left to right, as the
   product's viewer marks a cited sentence (ragnord_rag web/src/app.css
   .highlight, .sweep: the yellow, multiplied into the ground, frayed ends,
   the same curve), and the word turns black under it. The mark is a
   pseudo-element with no text in it, so the frayed edge does not touch
   the letters. */
.marker-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ask.mark-wait { position: relative; color: var(--accent); transition: color 420ms var(--ease) 120ms; }
.ask.mark-wait.marked, .ask.marked { color: var(--ink); }
.ask.marked { position: relative; }
.ask.marked::before {
  content: ""; position: absolute; top: .1em; bottom: .02em; left: -.22em; right: -.18em;
  background: var(--marker); mix-blend-mode: multiply; pointer-events: none;
  border-radius: 2px 3px 3px 2px / 20% 25% 25% 20%; filter: url(#marker-edge);
  animation: marker-sweep 520ms cubic-bezier(.3, .1, .3, 1) both;
}
@keyframes marker-sweep {
  from { clip-path: inset(-6px calc(100% + 6px) -6px -6px); }
  to { clip-path: inset(-6px); }
}
@media (forced-colors: active) { .ask.marked::before { display: none; } }

/* Section labels: small capitals in Raleway 600 with wide tracking. */
.label {
  font-weight: 600;
  font-size: var(--fs-small);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: .8em;
}

/* Primary button: gold fill, dark label. */
.button {
  display: inline-block;
  padding: .7em 1.4em;
  border-radius: var(--r-button);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
  text-decoration: none;
  transition: background var(--motion) var(--ease);
}
.button:hover { background: var(--accent-hover); }

/* Hero: the lines of design hero_01.psd on their ground, drawn by
   js/hero-waves.js on a canvas. The canvas sits on a sticky stage behind the
   hero and the first section (.waves-run): both scroll over it while its
   lines move apart to the left and right and the ground fades from dark to
   the section's light ground. The script sets --waves-p (0 to 1) as the page scrolls. Until it is
   ready (or without WebGL) hero and section show their CSS grounds. */
.waves-zone {
  position: relative;
  isolation: isolate;
  /* The stage's negative margin lets it stick up to a screen past the zone;
     clip keeps it off the next section (and, unlike hidden, keeps sticky). */
  overflow: clip;
}
.waves-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  margin-bottom: -100svh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.waves-zone:not(.waves-ready) .waves-stage { visibility: hidden; }
.waves { display: block; width: 100%; height: 100%; }
.hero, .waves-run { position: relative; z-index: 1; }
.waves-ready .waves-run { background: none; }
/* The section's text comes up as soon as the hero text has faded and is in
   its place well before the lines are gone (js/hero-waves.js, settle()):
   the section overlaps the hero's empty lower part, and its content fades
   in, so it cannot be seen under the hero text at first. Only with the
   waves running; without them the section follows the hero. */
.section.waves-run { padding-top: 15svh; justify-content: flex-start; }
.waves-ready .section.waves-run { margin-top: -35svh; }
.waves-ready .waves-run > .wrap { opacity: clamp(0, (var(--waves-p, 0) - .22) * 5, 1); }
/* Overlapping the hero, the section must not catch its clicks (the hero's
   button), nor may its content while it cannot be seen yet
   (js/hero-waves.js sets .run-shown once it has faded in). */
.waves-ready .waves-run, .waves-ready:not(.run-shown) .waves-run > .wrap { pointer-events: none; }
.waves-ready.run-shown .waves-run > .wrap { pointer-events: auto; }
/* The section fills the screen, so it can snap into place
   (js/section-snap.js): its text at the top, the interface mockup in the
   rest, as large as the room below the text allows at its own proportions
   (5:3) and never wider than the column. On small screens it takes the
   height of its content. */
@media (min-width: 760px) and (min-height: 560px) {
  .section.waves-run { height: 100svh; display: flex; flex-direction: column; padding-bottom: 6svh; }
  .waves-run > .wrap { flex: 1; width: 100%; min-height: 0; display: flex; flex-direction: column; }
  .waves-run .ui-fit { flex: 1 1 0; min-height: 0; container-type: size; }
  .waves-run .ui-frame { width: min(100cqw, 100cqh * 5 / 3); }
}

/* Places as in the PSD (1366 x 768): the title starts at 30 % of the
   height, the claim ends at 30 % from the bottom. Left edge and sizes follow
   the page (.wrap, the font guide). The text fades as it scrolls away. */
.hero {
  color: var(--on-dark);
  background: var(--charcoal-edge) url("../img/waves-ground.png") center / cover;
}
.waves-ready .hero { background: none; }
.hero-inner {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 28.8svh 29.4svh;
  font-weight: 400;
  line-height: 1.2;
}
.waves-ready .hero-inner { opacity: calc(1 - var(--waves-p, 0) * 3); }
.hero-inner p, .hero-title { margin: 0; }
.hero-title { font-size: var(--fs-h1); line-height: 1.2; }
.hero-title .product { color: var(--ask-on-dark); }
/* In the hero "Ask" runs from its own muted gold at the bottom right to
   the wordmark's gold at the top left. Where text cannot take a background,
   it keeps its plain colour. */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .hero-title .product {
    background: linear-gradient(to top left, var(--ask-on-dark), var(--accent));
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
  }
}
@media (forced-colors: active) { .hero-title .product { background: none; color: CanvasText; } }
.hero-title .wm { color: var(--accent); }
.hero-sub { font-size: var(--fs-h3); }
.hero-claim { font-size: var(--fs-h6); line-height: 1.45; }
/* The call to the trial, under the claim: the gold button at h6 size (font
   guide). On the gold its "Ask" takes the button's dark label colour. */
.hero-cta { margin-top: 1.75rem; font-size: var(--fs-h6); line-height: 1.3; }
.button .ask { color: inherit; }

/* A small chevron at the bottom middle of the hero: after four seconds
   on the hero it fades in and breathes slowly in and out (70 % to nothing), to
   say the page goes on below (js/hero-cue.js). It leaves as the page moves
   and comes back after another four seconds at the top. A link to the
   next section, so it can also be clicked. */
.hero-cue {
  position: absolute; left: 50%; bottom: max(16px, 3svh); transform: translateX(-50%);
  padding: 12px; color: #fff; line-height: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 900ms var(--ease), visibility 0s 900ms;
}
.hero-cue.shown { opacity: 1; visibility: visible; transition: opacity 1200ms var(--ease), visibility 0s; }
.hero-cue svg { display: block; opacity: .7; }
.hero-cue.shown svg { animation: cue-breathe 3.2s ease-in-out 1.2s infinite; }
@keyframes cue-breathe { 50% { opacity: 0; } }
.hero-cue:focus-visible { outline-color: #fff; }

@media (prefers-contrast: more), (forced-colors: active) {
  .waves-stage { display: none; }
  .hero, .waves-ready .hero { background: var(--charcoal-edge); }
  .waves-ready .waves-run { background: var(--page); }
  .waves-ready .hero-inner { opacity: 1; }
  .waves-ready .section.waves-run { margin-top: 0; }
  .waves-ready .waves-run > .wrap { opacity: 1; }
}

/* Only the hero fills the screen; the sections take the height of their
   content. */
.section {
  padding: clamp(56px, 9vw, 112px) 0;
  background: var(--page);
}
/* Every section fills the screen, its content in the middle; the page
   snaps from one to the next (js/section-snap.js). */
.section { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.section > .wrap { width: 100%; }

.section-alt { background: var(--surface); }
/* The light ground of the product's main area (ragnord_rag web/src/app.css,
   .main): the page colour across the middle, darker toward the corners.
   js/hero-waves.js fades the hero into the same two colours. */
.section-light {
  background: radial-gradient(ellipse farthest-corner at 50% 50%, var(--page) 55%, var(--page-corner) 100%);
}
.section-light .card { background: var(--surface); }

/* Section sizes from the font guide (design/reference/font-guide.md). */
.section h2 { line-height: 1.15; }
.card h3 { font-size: var(--fs-h5); }
.section .intro { font-size: var(--fs-h6); line-height: 1.45; margin-bottom: .8em; }
.section .intro { color: var(--ink); }
/* Not inside the interface mockup, which has the product's own styles. */
.section p:where(:not(.ui p)) { color: var(--ink-2); max-width: 42rem; }

/* The sections' grounds, alternating: the light ground of "Fragen statt
   suchen." (.ground-light, the product's main area), a shade of it
   (.ground-shade), and once the warm grey #897a71 with black text
   (.ground-warm, 4.45:1 for --ink; the user's choice, 2026-11-18). Each
   is a little darker toward the corners, like the product's main area. */
.ground-light { background: radial-gradient(ellipse farthest-corner at 50% 50%, var(--page) 55%, var(--page-corner) 100%); }
.ground-shade { background: radial-gradient(ellipse farthest-corner at 50% 50%, #ece7df 55%, #ddd6cb 100%); }
.ground-warm { background: radial-gradient(ellipse farthest-corner at 50% 50%, #897a71 55%, #7f7068 100%); }
/* "Für wen ist RAGNØRD Ask?", after the user's reference (bg_ref.png): the
   warm grey a little lighter toward the bottom left and darker toward the
   top right, and over it one family of fine parallel lines that all run
   through the picture, light toward the top right, dark toward the bottom
   left, nearly gone in between (img/lines-light.svg, drawn by the build
   from scripts/lines-svg.mjs). */
.ground-warm.with-lines {
  background: url("../img/lines-light.svg") center / cover no-repeat,
              linear-gradient(to top right, #8d7f75, #897b72 50%, #7e7066);
}
/* On the warm grey all text is white, the brand name too (the user's
   choice, 2026-11-19; about 4:1, enough for the heading, a little under 4.5
   for body text). */
.ground-warm, .ground-warm .intro, .ground-warm p:where(:not(.ui p)),
.ground-warm .wm, .ground-warm .ask { color: #fff; }
.ground-shade .card { background: var(--page); }

/* Two parts side by side under a section's text, one above the other on
   small screens; their titles at h4 size (font guide). */
.pair {
  display: grid;
  gap: 2rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  margin-top: 2.5rem;
}
/* A subheading inside a section's text: h3 in the outline, h4 in size. */
.sub { font-size: var(--fs-h4); line-height: 1.25; margin-bottom: .5em; }
.wrap > .sub { max-width: 42rem; margin-top: 2rem; }

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: 2em;
}
/* "So kommt Ask zu dir.": the steps as a vertical timeline. Each step has
   a gold circle with its number (like the product's source numbers) and a
   line down to the next. With JavaScript (js/reveal.js) the steps build up
   one after the other as they scroll into view: the circle, then the text,
   then the line on to the next step. */
.timeline { list-style: none; margin: 2.5rem 0 0; padding: 0; max-width: 42rem; counter-reset: step; }
.step { position: relative; padding: 0 0 2.25rem 3.75rem; counter-increment: step; }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-variant-numeric: lining-nums;
}
.step::after {
  content: ""; position: absolute; left: calc(1.25rem - 1px); top: 3rem; bottom: .5rem; width: 2px;
  background: var(--accent-border); transform-origin: top;
}
.step:last-child::after { display: none; }
.step h3 { font-size: var(--fs-h5); line-height: 1.25; margin: .45rem 0 .4em; }
.step p:last-child { margin-bottom: 0; }
.step .hint { font-size: var(--fs-small); margin-bottom: .6em; }

.reveal-on .step::before { transition: transform var(--motion) var(--ease), opacity var(--motion) var(--ease); }
.reveal-on .step > * { transition: transform var(--motion) var(--ease) 120ms, opacity var(--motion) var(--ease) 120ms; }
.reveal-on .step::after { transition: transform 700ms var(--ease) 360ms; }
.reveal-on .step:not(.shown)::before { opacity: 0; transform: scale(.4); }
.reveal-on .step:not(.shown) > * { opacity: 0; transform: translateY(1rem); }
.reveal-on .step:not(.shown)::after { transform: scaleY(0); }

.card p:last-child { margin-bottom: 0; }
.after-grid { margin-top: 2rem; }
.card {
  padding: 24px;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: var(--page);
}

/* Legal pages. */
.topbar { padding: 24px 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar .wm { font-size: 1.3rem; }
.prose { max-width: 46rem; }
.prose h2 { font-size: var(--fs-h5); margin-top: 1.8em; }
.prose h3 { font-size: var(--fs-h6); margin-top: 1.4em; }
.prose li { color: var(--ink-2); }
.prose .legal-date { margin-top: 2.5em; font-size: var(--fs-small); color: var(--ink-meta); }

.footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-meta);
  font-size: var(--fs-small);
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; }
.footer nav { display: flex; gap: 20px; }
.footer small { margin-left: auto; font-size: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
