/*
  imagn8.co.uk while the full website (website/) is offline: the home page and
  the two email-confirmation pages (/verify, /verified). Colours and type match
  Theme.swift and website/.
*/

:root {
  --canvas: #F7F5F3;
  --surface: #FFFFFF;
  --ink: #121214;
  --ink-2: #6B6B73;
  --hairline: rgba(0, 0, 0, 0.08);
  --lilac: #9E9EFA;
  --online: #40C773;
  --gutter: 20px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --snappy: cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: light;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

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

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

body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, p, ul { margin: 0; }
a { color: inherit; }

/* ---------- Aura: the blurred blush / peach / lilac glow ---------- */

.aura {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.aura i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(80px);
  transform: translate(-50%, -50%) rotate(var(--r, 0deg));
  animation: drift 16s ease-in-out infinite alternate;
}

/* Faint film grain so the gradients feel printed rather than digital. */
.aura::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Email-confirmed page: soft corner glow, like the app's onboarding steps. */
.verify .aura i:nth-child(1) { left: 96%; top: 4%; width: min(95vw, 900px); aspect-ratio: 1; background: rgba(255, 140, 158, 0.38); }
.verify .aura i:nth-child(2) { left: 68%; top: -12%; width: min(75vw, 700px); aspect-ratio: 1; background: rgba(255, 179, 133, 0.34); animation-delay: -7s; }
.verify .aura i:nth-child(3) { left: 0%; top: 104%; width: min(85vw, 760px); aspect-ratio: 1; background: rgba(158, 158, 250, 0.24); animation-delay: -11s; }

/* Home page: the app's splash screen. */
.home .aura i:nth-child(1) { left: 60%; top: 36%; width: 92%; height: 34%; --r: -35deg; background: rgba(255, 179, 133, 0.75); }
.home .aura i:nth-child(2) { left: 44%; top: 50%; width: 70%; height: 24%; --r: -40deg; background: rgba(255, 140, 158, 0.85); animation-delay: -5s; }
.home .aura i:nth-child(3) { left: 74%; top: 64%; width: 60%; height: 26%; --r: -30deg; background: rgba(158, 158, 250, 0.65); animation-delay: -9s; }
.home .aura i:nth-child(4) { left: 86%; top: 16%; width: 44%; aspect-ratio: 1; background: rgba(255, 140, 158, 0.45); animation-delay: -3s; }

@media (min-width: 1100px) {
  /* Wide screens: keep the glow organic rather than stretched into streaks. */
  .home .aura i:nth-child(1) { left: 66%; top: 40%; width: 70vw; height: 32vw; }
  .home .aura i:nth-child(2) { left: 52%; top: 56%; width: 54vw; height: 20vw; }
  .home .aura i:nth-child(3) { left: 82%; top: 70%; width: 44vw; height: 22vw; }
  .home .aura i:nth-child(4) { left: 92%; top: 10%; width: 34vw; }
  .home .aura i { filter: blur(90px); }
}

@keyframes drift {
  from { translate: 0 0; scale: 1; }
  to { translate: 2% -3%; scale: 1.06; }
}

/* ---------- Email-confirmed page ---------- */

.top,
.panel,
.foot,
.hero {
  position: relative;
  z-index: 1;
}

.top {
  padding: max(22px, env(safe-area-inset-top)) var(--gutter) 0;
}

.wordmark {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 40px var(--gutter) 56px;
}

/* Nothing shows until link.js has read the link, so there's no flash before
   it shows the page or goes home. Without JavaScript, the <noscript> text shows. */
html.js:not([data-state]):not([data-step]) .panel { visibility: hidden; }

/* /verify: the Verify my email step. */
.step { display: none; }
[data-step] .step { display: block; animation: rise 0.7s var(--snappy) both; }

.btn:disabled { cursor: default; opacity: 0.85; }

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

[data-step="working"] .spinner { display: block; }

.message {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 500;
  color: #C2364B;
  text-align: center;
  text-wrap: pretty;
}

.message:empty { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* /verified: the result. */
.state { display: none; }

[data-state="confirmed"] .state--confirmed,
[data-state="expired"] .state--expired,
[data-state="error"] .state--error {
  display: block;
  animation: rise 0.7s var(--snappy) both;
}

[data-device="iphone"] .on-other,
[data-device="other"] .on-iphone { display: none; }

.badge {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 28px;
  border-radius: 50%;
  color: #FFFFFF;
}

.badge svg { width: 30px; height: 30px; }
.badge--ok { background: var(--online); box-shadow: 0 12px 32px rgba(64, 199, 115, 0.35); }
.badge--ink { background: var(--ink); box-shadow: 0 12px 32px rgba(18, 18, 20, 0.18); }

h1 {
  font-size: clamp(32px, 8.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.06;
  text-wrap: balance;
}

.lede {
  margin-top: 14px;
  font-size: 17px;
  color: var(--ink-2);
  text-wrap: pretty;
}

.card,
.steps li {
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  font-size: 15px;
  text-wrap: pretty;
}

.card { margin-top: 28px; }

.steps {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}

.steps strong { font-weight: 600; }

.btn {
  display: flex;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  margin-top: 32px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s var(--snappy), opacity 0.2s;
}

.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(0.97); opacity: 0.9; }
.btn:focus-visible,
.wordmark:focus-visible { outline: 3px solid var(--lilac); outline-offset: 3px; border-radius: 999px; }

.note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-2);
  text-align: center;
  text-wrap: pretty;
}

.foot {
  padding: 0 var(--gutter) max(24px, env(safe-area-inset-bottom));
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-2);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Home page ---------- */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter) max(56px, env(safe-area-inset-bottom));
}

.hero-wordmark {
  font-size: clamp(64px, 21vw, 240px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.86;
  margin-left: -0.04em;
  animation: rise 0.9s var(--snappy) both;
}

.eyebrow {
  margin-top: 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.hero-lines {
  margin-top: 36px;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.45;
  animation: rise 0.9s 0.1s var(--snappy) both;
}

@media (prefers-reduced-motion: reduce) {
  .aura i,
  .step,
  .state,
  .hero-wordmark,
  .hero-lines { animation: none !important; }
}
