/* mdNotch — presentation site.
   Palette and geometry lifted from the app: the glow spectrum comes from
   IntelligenceGlow in App/Sources/Notch/NotchView.swift, the 22px bottom
   radius and the 0.09 white hairline from the drop zone itself. */

:root {
  --bg: #08080a;
  --bg-raised: #0e0e12;
  --bg-card: #101015;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  --fg: #e9eaf0;
  --fg-muted: #9698a6;
  --fg-dim: #6b6d7c;

  --blue: #598cff;
  --purple: #ad6bff;
  --pink: #ff70bd;
  --orange: #ffa861;

  --spectrum: var(--blue), var(--purple), var(--pink), var(--orange), var(--blue);

  --sans: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --max: 1060px;
  --gutter: 28px;
}

@property --a {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Atmosphere: two very low-saturation spectrum washes plus a fine grid,
   so the page has depth without a gradient slab across it. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(60rem 32rem at 50% -14rem, rgba(89, 140, 255, 0.16), transparent 70%),
    radial-gradient(44rem 26rem at 82% 8rem, rgba(173, 107, 255, 0.10), transparent 72%),
    radial-gradient(40rem 24rem at 12% 22rem, rgba(255, 112, 189, 0.06), transparent 72%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70rem 46rem at 50% 6rem, #000 12%, transparent 76%);
  -webkit-mask-image: radial-gradient(70rem 46rem at 50% 6rem, #000 12%, transparent 76%);
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--fg); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: var(--purple); }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: #cfd2e0;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.08em 0.36em;
}

em { font-style: normal; color: #fff; }

/* ---------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-brand img { border-radius: 7px; display: block; }

.tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 7px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.nav-links a { color: var(--fg-muted); text-decoration: none; }
.nav-links a:hover { color: #fff; }

.lang {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  font-family: var(--mono);
  font-size: 11.5px;
}

.lang a {
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--fg-dim);
  line-height: 1.4;
}

.lang a.is-active {
  color: #0a0a0e;
  background: rgba(255, 255, 255, 0.86);
}

.lang a.is-active:hover { color: #0a0a0e; }

/* -------------------------------------------------------------- layout */

main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.band { padding: 96px 0; border-top: 1px solid var(--line); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin: 0 0 18px;
}

h1 {
  /* The vw term keeps the hand-placed line break from overflowing on a
     narrow phone, where "Paste it as Markdown." has to fit one line. */
  font-size: clamp(1.7rem, 7.2vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 22px;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.65rem, 3.6vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.028em;
  font-weight: 600;
  margin: 0 0 18px;
  text-wrap: balance;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  margin: 0 0 8px;
}

.lede {
  font-size: clamp(1rem, 1.9vw, 1.16rem);
  color: var(--fg-muted);
  max-width: 46ch;
  margin: 0 0 34px;
  text-wrap: pretty;
}

/* --------------------------------------------------------------- hero */

.hero { padding: 76px 0 88px; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: transform 0.16s ease, box-shadow 0.24s ease, border-color 0.16s ease;
}

/* The primary button carries the same rim light as the drop zone. */
.btn-primary {
  position: relative;
  color: #07070a;
  background: #f2f3f8;
  border-color: transparent;
  font-weight: 600;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 13px;
  z-index: -1;
  --a: 0deg;
  background: conic-gradient(from var(--a), var(--spectrum));
  filter: blur(9px);
  opacity: 0.75;
  animation: spin 5s linear infinite;
}

.btn-primary:hover { color: #07070a; transform: translateY(-1px); }
.btn-primary:hover::before { opacity: 1; filter: blur(13px); }

.btn-ghost { color: var(--fg-muted); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { color: #fff; border-color: var(--line-strong); transform: translateY(-1px); }

.cta-meta {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg-dim);
  margin: 16px 0 0;
}

/* --------------------------------------------- the drop-zone replica */

.stage { margin: 64px 0 0; }

.screen {
  position: relative;
  width: 100%;
  max-width: 620px;
  height: 320px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0b0b0f;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}

.wallpaper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(30rem 20rem at 50% 120%, rgba(173, 107, 255, 0.14), transparent 70%),
    radial-gradient(24rem 16rem at 12% 90%, rgba(89, 140, 255, 0.12), transparent 72%),
    linear-gradient(180deg, #101017, #08080c);
}

.menubar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  /* Translucent, so the notch below reads as a cutout rather than
     disappearing into a black strip. */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 3;
}

.notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 190px;
  height: 28px;
  background: #000;
  border-radius: 0 0 10px 10px;
  z-index: 4;
}

.slab-wrap {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 112px;
  z-index: 2;
}

.glow-set {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: zone-glow 9s ease-in-out infinite;
}

.glow {
  position: absolute;
  inset: 0;
  border-radius: 0 0 22px 22px;
  /* Plain fallback value: without @property support the gradient still
     paints, it just doesn't rotate. */
  --a: 0deg;
  background: conic-gradient(from var(--a), var(--spectrum));
  animation: spin 5s linear infinite, breathe 1.4s ease-in-out infinite alternate;
}

.glow-spill { inset: -8px; filter: blur(26px); }
.glow-bloom { inset: -3px; filter: blur(12px); }
.glow-rim   { inset: -1px; filter: blur(2px); animation: spin 5s linear infinite; }

.slab {
  position: absolute;
  inset: 0;
  background: #000;
  border-radius: 0 0 22px 22px;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.09);
}

.slab-body {
  position: absolute;
  inset: 28px 0 0;
  display: grid;
  place-items: center;
}

.phase {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  opacity: 0;
}

.phase-done span { color: #fff; }

.phase-drop    { animation: phase-drop 9s ease-in-out infinite; }
.phase-convert { animation: phase-convert 9s ease-in-out infinite; }
.phase-done    { animation: phase-done 9s ease-in-out infinite; }

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: #fff;
  animation: spin-el 0.8s linear infinite;
}

/* The file being dragged toward the top edge. */
.file-ghost {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 5;
  opacity: 0;
  animation: file-drag 9s ease-in-out infinite;
}

.file-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: #d7d9e6;
  background: rgba(20, 20, 27, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 5px 11px;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, 0.9);
}

.stage-caption {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-dim);
  text-align: center;
  margin: 18px 0 0;
}

@keyframes spin    { to { --a: 360deg; } }
@keyframes spin-el { to { transform: rotate(360deg); } }
@keyframes breathe { from { opacity: 0.55; } to { opacity: 1; } }

@keyframes zone-glow {
  0%, 32%   { opacity: 0; }
  38%, 66%  { opacity: 1; }
  72%, 100% { opacity: 0; }
}

@keyframes file-drag {
  0%       { opacity: 0; transform: translate(-50%, 0); }
  6%       { opacity: 1; transform: translate(-50%, -10px); }
  28%      { opacity: 1; transform: translate(-50%, -190px); }
  34%      { opacity: 0; transform: translate(-50%, -200px); }
  100%     { opacity: 0; transform: translate(-50%, 0); }
}

@keyframes phase-drop {
  0%, 8%    { opacity: 0; }
  14%, 30%  { opacity: 1; }
  35%, 100% { opacity: 0; }
}

@keyframes phase-convert {
  0%, 34%   { opacity: 0; }
  39%, 65%  { opacity: 1; }
  70%, 100% { opacity: 0; }
}

@keyframes phase-done {
  0%, 68%   { opacity: 0; }
  74%, 92%  { opacity: 1; }
  97%, 100% { opacity: 0; }
}

/* -------------------------------------------------------------- steps */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.steps li {
  border-top: 1px solid var(--line-strong);
  padding-top: 20px;
}

.step-no {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--purple);
  margin-bottom: 12px;
}

.steps p { color: var(--fg-muted); margin: 0; font-size: 15px; text-wrap: pretty; }

/* ------------------------------------------------------------ formats */

.chips {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chips li {
  font-family: var(--mono);
  font-size: 14px;
  color: #d2d5e4;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}

.note {
  color: var(--fg-muted);
  max-width: 62ch;
  margin: 0;
  font-size: 15px;
  text-wrap: pretty;
}

/* ------------------------------------------------------------- cards */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 20px 24px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.card:hover { border-color: var(--line-strong); background: #14141b; }

.card-ico {
  color: var(--blue);
  margin-bottom: 14px;
  display: flex;
}

.card:nth-child(2) .card-ico { color: var(--purple); }
.card:nth-child(3) .card-ico { color: var(--pink); }
.card:nth-child(4) .card-ico { color: var(--orange); }
.card:nth-child(5) .card-ico { color: var(--blue); }
.card:nth-child(6) .card-ico { color: var(--purple); }

.card p { color: var(--fg-muted); margin: 0; font-size: 14.5px; text-wrap: pretty; }

.specs {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg-dim);
}

.specs li { display: flex; align-items: center; gap: 10px; }
.specs li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--purple); }

/* ------------------------------------------------------------- closer */

.closer { text-align: center; padding: 104px 0; }
.closer .lede { margin-inline: auto; }
.closer .cta { justify-content: center; }

/* -------------------------------------------------------------- foot */

.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px var(--gutter) 56px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  font-size: 13px;
  color: var(--fg-dim);
}

.foot p { margin: 0; max-width: 62ch; }
.foot a { color: var(--fg-muted); }

/* -------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .nav-links a[href="#how"], .nav-links a[href="#features"] { display: none; }
  .band { padding: 72px 0; }
  .hero { padding: 52px 0 64px; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .cards { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .screen { height: 264px; }
  .slab-wrap { width: 240px; height: 104px; }
  .notch { width: 150px; }
  .stage { margin-top: 48px; }
}

@media (max-width: 520px) {
  .nav-links { gap: 14px; }
  .nav-links a[href="#formats"] { display: none; }
  .specs { gap: 8px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glow, .glow-set, .phase, .file-ghost, .spinner, .btn-primary::before {
    animation: none !important;
  }
  .glow-set { opacity: 1; }
  .phase-convert { opacity: 1; }
  .file-ghost { opacity: 0; }
}
