/* Calcuter site — mirrors the App Store slides: near-black gradient,
   bold headlines, soft per-section glows, framed device screenshots. */

:root {
  --bg-top: rgb(18, 18, 23);
  --bg-bottom: #000;
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.72);
  --hairline: rgba(255, 255, 255, 0.12);
  --card: rgba(255, 255, 255, 0.05);
  --link: #ffb4a8;

  /* Glow colors, taken from marketing/compose.swift */
  --red: 219, 66, 56;
  --amber: 237, 199, 102;
  --green: 64, 184, 140;
  --purple: 140, 102, 242;
  --teal: 26, 158, 173;
  --blue: 51, 128, 242;

  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { background: var(--bg-bottom); overflow-x: clip; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  background: linear-gradient(to bottom, var(--bg-top), var(--bg-bottom) 900px);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* the glows extend past the viewport edges */
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, .button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 680px; margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav ul a { color: var(--muted); font-size: 15px; }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--text); text-decoration: none; }

/* ---------- Glow sections ---------- */
.glow {
  position: relative;
  isolation: isolate;
}
.glow::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -80px -10% auto -10%;
  height: 520px;
  background: radial-gradient(ellipse at 50% 20%, rgba(var(--g), 0.28), transparent 65%);
  pointer-events: none;
}
.g-red { --g: var(--red); }
.g-amber { --g: var(--amber); }
.g-green { --g: var(--green); }
.g-purple { --g: var(--purple); }
.g-teal { --g: var(--teal); }
.g-blue { --g: var(--blue); }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 40px 0 72px;
}
.hero .app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--hairline);
}
h1.headline, h2.headline {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 24px 0 14px;
}
h1.headline { font-size: clamp(38px, 7vw, 68px); }
h2.headline { font-size: clamp(30px, 4.6vw, 44px); margin-top: 0; }
.sub {
  color: var(--muted);
  font-size: clamp(17px, 2.2vw, 20px);
  max-width: 560px;
  margin: 0 auto 28px;
}
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.button {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  color: #000;
  background: #fff;
}
.button:hover { text-decoration: none; background: rgba(255, 255, 255, 0.88); }
.button.secondary {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--hairline);
}
.button.secondary:hover { background: var(--card); }

/* ---------- Device frame ---------- */
.device {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto;
  border-radius: 32px;
  border: 1px solid var(--hairline);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
}
.hero .device { max-width: 280px; margin-top: 56px; }

/* ---------- Feature rows ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
  padding: 64px 0;
}
.feature:nth-of-type(even) .copy { order: 2; }
.feature .copy p { color: var(--muted); font-size: 18px; margin: 0; max-width: 420px; }
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, rgb(var(--g)) 60%, white); /* lightened so the small label passes AA */
  margin: 0 0 12px;
}

/* Receipt-style dashed rule, echoing the receipt tape */
.rule { border: 0; border-top: 1px dashed var(--hairline); margin: 0; }

.styles-strip {
  display: flex;
  gap: 16px;
  margin-top: 28px;
}
.styles-strip img {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  border: 1px solid var(--hairline);
}

/* ---------- Closing CTA ---------- */
.closing { text-align: center; padding: 80px 0; }

/* ---------- Text pages ---------- */
.page { padding: 24px 0 40px; }
.page h1 { font-size: clamp(32px, 6vw, 44px); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; line-height: 1.15; }
.page .lead { color: var(--muted); font-size: 18px; margin: 0 0 32px; }
.page h2 { font-size: 20px; margin: 40px 0 8px; }
.page p, .page li { color: rgba(255, 255, 255, 0.86); }
.page ul { padding-left: 22px; }
.updated { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0 0 32px; }
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 20px 24px;
  margin-top: 12px;
}
.card p { margin: 0 0 6px; }
.card p:last-child { margin: 0; }
.card strong { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }

/* ---------- Footer ---------- */
footer {
  margin-top: 40px;
  padding: 28px 0 48px;
  border-top: 1px dashed var(--hairline);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
footer .wrap, footer .narrow { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer a { color: var(--muted); margin-left: 18px; }
footer a:first-child { margin-left: 0; }
footer a:hover { color: var(--text); }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; gap: 32px; padding: 44px 0; text-align: center; }
  .feature:nth-of-type(even) .copy { order: 0; }
  .feature .copy p { margin: 0 auto; }
  .styles-strip { justify-content: center; }
  .nav ul { gap: 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  .button { transition: background 0.15s; }
}
