/* RadicalDock — radicaldock.com
 *
 * Colour comes from the app's own icon, sampled rather than chosen beside it (Docs/BRAND.md).
 * Structure follows the grammar a Mac app's marketing page is read in: one container width, one
 * button shape, one corner radius, sections that alternate ground.
 *
 * The idea: the page is the object. The navigation at the foot of the window is a real dock, built
 * from the app's own rendered tiles, and it magnifies with the curve the app magnifies with.
 */

:root {
  /* Sampled from Resources/Artwork/app-icon.png */
  --ink: #302963;
  --indigo: #464191;
  --periwinkle: #ACA8F1;
  --paper: #F3F3FC;
  --teal: #49E7E0;
  --amber: #FFCB78;
  --pink: #FF9ABA;

  --ground: #ffffff;
  --band: var(--paper);
  --muted: #6b6785;
  --hair: rgba(48, 41, 99, 0.12);

  --wrap: 1100px;
  --radius: 28px;
  --radius-s: 18px;
  --pill: 980px;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.1875rem, 1.1rem + 0.5vw, 1.4375rem);
  --step-head: clamp(2.125rem, 1.4rem + 3vw, 3.75rem);
  --step-display: clamp(2.5rem, 1.5rem + 4.2vw, 4.25rem);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--radius-s) 0;
}
.skip:focus { left: 0; }

.wrap { width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; }
.narrow-wrap { width: min(760px, calc(100% - 48px)); }

/* ─────────────────────────── Type ─────────────────────────── */

h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.022em; line-height: 1.06; }
h1 { font-size: var(--step-display); }
h2 { font-size: var(--step-head); }
h3 { font-size: 1.1875rem; letter-spacing: -0.01em; line-height: 1.3; }

p { margin: 0; }

.eyebrow {
  font-size: var(--step-small); font-weight: 600; color: var(--muted);
  letter-spacing: 0.01em; margin-bottom: 18px;
}

/* The one label treatment, above a picture or a group and nowhere else. */
.label {
  font-size: var(--step-small); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--indigo); margin-bottom: 14px;
}
.label.on-deep { color: var(--periwinkle); }

.lead { font-size: var(--step-lead); line-height: 1.5; color: var(--ink); margin-top: 22px; }
.lead.narrow { max-width: 62ch; }
.on-deep { color: #fff; }
.lead.on-deep { color: rgba(255, 255, 255, 0.74); }

/* ─────────────────────────── Buttons, one shape ─────────────────────────── */

.btn {
  display: inline-block; background: var(--indigo); color: #fff; text-decoration: none;
  font-size: var(--step-body); font-weight: 600; padding: 14px 28px; border-radius: var(--pill);
  transition: background 160ms ease, transform 160ms ease;
}
.btn:hover { background: var(--ink); }
.btn:active { transform: scale(0.985); }
.btn-small { padding: 8px 18px; font-size: var(--step-small); }
.btn-wide { padding: 16px 40px; }

.actions { margin-top: 32px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.actions-note { font-size: var(--step-small); color: var(--muted); }

/* ─────────────────────────── Header ─────────────────────────── */

.bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 12px max(24px, calc((100% - var(--wrap)) / 2));
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font-weight: 700; letter-spacing: -0.015em;
}
.brand img { border-radius: 7px; }
.bar-nav { margin-left: auto; display: flex; gap: 26px; }
.bar-nav a { color: var(--ink); text-decoration: none; font-size: var(--step-small); font-weight: 500; }
.bar-nav a:hover { color: var(--indigo); }
@media (max-width: 720px) { .bar-nav { display: none; } .bar-nav + .btn { margin-left: auto; } }

/* ─────────────────────────── Hero ─────────────────────────── */

.hero { position: relative; padding: 104px 0 0; overflow: hidden; color: #fff; }
.hero-bg {
  position: absolute; inset: 0;
  /* Light enough that the room behind is actually a room. At 0.78 the photograph read as flat
     navy, which is the same as not having one. */
  background:
    linear-gradient(180deg, rgba(16, 13, 38, 0.38), rgba(16, 13, 38, 0.8)),
    url("/img/desk.jpg") center 35% / cover no-repeat;
}
.hero-film {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1;
}
/* The scrim has to sit over the film as well as over the still, so it moves onto a layer of its
   own rather than being the element's own background. */
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16, 13, 38, 0.38), rgba(16, 13, 38, 0.8));
}
@media (prefers-reduced-motion: reduce) { .hero-film { display: none; } }

.hero-text { position: relative; text-align: center; }
.hero .eyebrow { color: var(--periwinkle); }
.hero h1 { color: #fff; }
.hero .lead { color: rgba(255, 255, 255, 0.76); margin-inline: auto; max-width: 60ch; }
.hero .actions { justify-content: center; }
.hero .actions-note { color: rgba(255, 255, 255, 0.6); }
.hero .btn { background: #fff; color: var(--ink); }
.hero .btn:hover { background: var(--periwinkle); }

.hero-words {
  margin-top: 34px; font-size: var(--step-small); color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.01em;
}
.hero-words i { font-style: normal; opacity: 0.45; padding: 0 6px; }

/* The dock itself: a real bar of real tiles. Held inside the page's one container width, so it
   reads as an object sitting on the page rather than a band bleeding off both edges. */
.hero-dock-stage {
  position: relative; margin: 72px auto 0; padding-bottom: 88px; text-align: center;
  width: min(var(--wrap), calc(100% - 48px));
}
.hero-dock {
  display: inline-flex; align-items: flex-end; gap: 10px;
  padding: 12px; border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  max-width: 100%; flex-wrap: wrap; justify-content: center;
}
.hero-dock .tile {
  height: 84px; width: auto; border-radius: 14px; flex: none;
  transform-origin: bottom center;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero-dock-stage figcaption {
  margin-top: 26px; font-size: var(--step-small); color: rgba(255, 255, 255, 0.55);
}

/* ─────────────────────────── Sections ─────────────────────────── */

.section { padding: 112px 0; }
.section.band { background: var(--band); }
.section.deep { background: var(--ink); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.two.reverse > :first-child { order: 2; }
@media (max-width: 860px) {
  .two { grid-template-columns: 1fr; gap: 40px; }
  /* Stacked, the words come first whichever side the picture was on. Letting the figure lead put
     its caption directly above the heading, where it read as a kicker. */
  .two.reverse > :first-child { order: 2; }
  .section { padding: 72px 0; }
}

/* Widgets, set as a menu: name, description, count, in aligned columns. */
.menu { list-style: none; margin: 56px 0 0; padding: 0; }
.menu li {
  display: grid; grid-template-columns: 150px 1fr auto; gap: 24px; align-items: baseline;
  padding: 20px 0; border-top: 1px solid var(--hair);
}
.menu li:last-child { border-bottom: 1px solid var(--hair); }
.menu b { font-weight: 700; letter-spacing: -0.01em; }
.menu span { color: var(--ink); font-size: var(--step-body); }
.menu i {
  font-style: normal; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--indigo);
}
.menu-note { margin-top: 20px; font-size: var(--step-small); color: var(--muted); }
@media (max-width: 680px) {
  .menu li { grid-template-columns: 1fr auto; }
  .menu span { grid-column: 1 / -1; }
}

/* Cards: filled, never outlined. */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--ground); border-radius: var(--radius); padding: 32px; }
.section.band .card { background: #fff; }
.card p { margin-top: 12px; color: var(--ink); font-size: var(--step-body); line-height: 1.6; }
.card-deep { background: rgba(255, 255, 255, 0.07); }
.card-deep h3 { color: #fff; }
.card-deep p { color: rgba(255, 255, 255, 0.86); }

/* Points set as prose beside a picture, rather than a third row of identical cards. */
.two.beside { margin-top: 56px; align-items: start; }
.points h3 { margin-top: 28px; }
.points h3:first-child { margin-top: 0; }
.points p { margin-top: 10px; font-size: var(--step-body); line-height: 1.6; }

/* A product render, presented as itself. */
.shot { margin: 56px 0 0; }
.shot img { width: 100%; border-radius: var(--radius); background: var(--ink); }
.shot figcaption { margin-top: 14px; font-size: var(--step-small); color: var(--muted); }
.shot-flush { margin: 0; }
.shot-tall { margin: 0; }
.shot-tall img { max-width: 420px; margin-inline: auto; }

.facts { margin: 36px 0 0; display: grid; gap: 18px; }
.facts div { padding-top: 14px; }
.facts dt { font-weight: 700; font-size: var(--step-body); }
.facts dd { margin: 4px 0 0; color: var(--ink); font-size: var(--step-body); }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 56px 0 0;
}
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stats div {
  background: var(--band); border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column-reverse; justify-content: flex-end;
}
.stats dt { font-size: var(--step-small); color: var(--muted); font-weight: 500; }
.stats dd {
  margin: 0 0 10px; font-size: 2.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stats dd span {
  display: block; font-size: var(--step-small); font-weight: 500; letter-spacing: 0;
  color: var(--muted); margin-top: 8px;
}

/* Price, set as a receipt: aligned columns, a rule, a total. */
.receipt {
  margin: 48px auto 0; max-width: 560px; background: #fff; border-radius: var(--radius);
  padding: 40px;
}
.receipt-line { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; }
.receipt-line span { color: var(--ink); font-size: var(--step-body); }
.receipt-line b { font-weight: 600; font-size: var(--step-body); font-variant-numeric: tabular-nums; }
.receipt-rule {
  height: 0; border-top: 2px dotted var(--hair); margin: 14px 0;
}
.receipt-total span, .receipt-total b { font-size: var(--step-lead); color: var(--ink); font-weight: 800; }
.receipt-foot {
  margin-top: 20px; font-size: var(--step-body); color: var(--ink); line-height: 1.6;
}
.receipt .actions { justify-content: center; margin-top: 28px; }

/* FAQ */
.faq { margin-top: 48px; }
/* Separated by space and a tone step rather than by rules. Fourteen hairlines on one page is a
   habit, not a decision; the menu below keeps its rules because a priced list is the one place
   they belong. */
.faq details {
  background: var(--band); border-radius: var(--radius-s); padding: 0 24px; margin-bottom: 10px;
}
.faq details[open] { background: #fff; outline: 1px solid var(--hair); outline-offset: -1px; }
.faq summary {
  cursor: pointer; padding: 20px 0; font-weight: 600; list-style: none; display: flex;
  justify-content: space-between; gap: 20px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-weight: 400; font-size: 1.5rem; color: var(--indigo); line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq p { padding: 0 0 24px; color: var(--ink); font-size: var(--step-body); max-width: 62ch; }

/* The reply card */
.cta { text-align: center; }
.cta-icon { margin: 0 auto 28px; border-radius: 22px; }
.cta .lead { margin-inline: auto; }
.cta .actions { justify-content: center; }

/* The back of the card */
.foot { background: var(--band); padding: 72px 0 40px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; gap: 32px; } }
.foot-note { margin-top: 14px; font-size: var(--step-small); color: var(--muted); max-width: 32ch; }
.foot h4 { font-size: var(--step-small); margin-bottom: 14px; }
.foot nav a {
  display: block; color: var(--muted); text-decoration: none; font-size: var(--step-small);
  padding: 5px 0;
}
.foot nav a:hover { color: var(--indigo); }
.foot-legal {
  margin-top: 56px; padding-top: 24px;
  font-size: var(--step-small); color: var(--muted);
}

/* ─────────────────────────── The page's own dock ─────────────────────────── */

.dock-nav {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: flex-end; gap: 8px;
  padding: 9px; border-radius: 22px;
  background: rgba(48, 41, 99, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 16px 40px rgba(20, 16, 48, 0.3);
  opacity: 0; pointer-events: none;
  transition: opacity 260ms ease;
}
.dock-nav.is-shown { opacity: 1; pointer-events: auto; }
.dock-nav a { display: block; flex: none; transform-origin: bottom center; }
.dock-nav img {
  height: 44px; width: auto; border-radius: 11px;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (max-width: 560px) { .dock-nav { display: none; } }

/* ─────────────────────────── Reveal ─────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] { opacity: 0; transform: translateY(14px); }
  [data-reveal].is-in {
    opacity: 1; transform: none;
    transition: opacity 620ms ease, transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }
}
