/* ==========================================================================
   $SIRI: "Hey Siri, buy Apple."

   Design system: Apple dark. Pure black canvas, #1c1c1e grouped surfaces
   (iOS secondarySystemBackground), hairline separators, iOS-blue pill CTAs,
   Settings-style icon tiles, inset grouped lists, iMessage-style chat.
   Type: SF Pro on Apple devices via the system stack, Inter elsewhere.
   ========================================================================== */

:root {
  /* surfaces */
  --bg: #000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;
  --hairline: rgba(255, 255, 255, 0.10);
  --hairline-strong: rgba(255, 255, 255, 0.16);

  /* text */
  --label: #f5f5f7;
  --secondary: #a1a1a6;
  --tertiary: #86868b;
  --quaternary: #6e6e73;

  /* system colours */
  --blue: #0a84ff;
  --blue-hover: #2b93ff;
  --green: #30d158;
  --orange: #ff9f0a;
  --pink: #ff375f;
  --purple: #bf5af2;
  --teal: #64d2ff;

  /* Siri palette for glow / gradients */
  --s-pink: #ff2d75;
  --s-purple: #9b5cff;
  --s-blue: #3a8dff;
  --s-cyan: #35d6ff;
  --s-orange: #ff8a3d;
  --siri-stops: var(--s-pink), var(--s-purple), var(--s-blue), var(--s-cyan), var(--s-orange), var(--s-pink);

  /* type scale */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* layout */
  --container: 1024px;
  --narrow: 720px;
  --gutter: 24px;
  --nav-h: 52px;
  --section-y: 128px;

  /* radii */
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
}

@media (max-width: 734px) {
  :root {
    --gutter: 20px;
    --nav-h: 48px;
    --section-y: 80px;
    --r-xl: 22px;
    --r-lg: 18px;
  }
}

@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
strong { font-weight: 600; color: var(--label); }

::selection { background: rgba(10, 132, 255, 0.45); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.container.narrow { max-width: var(--narrow); }

/* --------------------------------------------------------------------------
   Siri screen-edge glow (iOS 18/26 signature)
   -------------------------------------------------------------------------- */
.siri-glow {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.siri-glow::before,
.siri-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: conic-gradient(from var(--angle, 0deg), var(--siri-stops));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  animation: spin 4s linear infinite;
}
.siri-glow::before { filter: blur(22px); padding: 28px; opacity: 0.9; }
.siri-glow::after  { filter: blur(4px);  padding: 6px;  opacity: 1; }
.siri-glow.on { opacity: 1; }
.siri-glow.pulse::before { animation: spin 4s linear infinite, breathe 1.6s ease-in-out infinite; }

@keyframes spin { to { --angle: 360deg; } }
@keyframes breathe {
  0%, 100% { transform: scale(1);    opacity: 0.75; }
  50%      { transform: scale(1.01); opacity: 1; }
}

/* --------------------------------------------------------------------------
   Floating "Hey Siri" pill (page-wide wake word)
   -------------------------------------------------------------------------- */
.wake-pill {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 18px 0 8px;
  border-radius: 980px;
  border: 1px solid var(--hairline-strong);
  background: rgba(28,28,30,0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: var(--label);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.012em;
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.8);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s, background 0.2s, border-color 0.2s;
}
.wake-pill[hidden] { display: none; }
.wake-pill.is-hidden { transform: translate(-50%, 140%); opacity: 0; pointer-events: none; }
@media (min-width: 735px) {
  /* desktop: dock bottom-right so it never sits over centred content */
  .wake-pill { left: auto; right: 24px; bottom: 24px; transform: none; }
  .wake-pill.is-hidden { transform: translateY(140%); }
}
.wake-pill:hover { background: rgba(44,44,46,0.9); }
.wake-pill-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.1);
  color: var(--secondary);
  transition: background 0.2s, color 0.2s;
}
.wake-pill[aria-pressed="true"] .wake-pill-icon { background: var(--blue); color: #fff; }
.wake-pill.listening { border-color: transparent; }
.wake-pill.listening::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--angle, 0deg), var(--siri-stops));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 3s linear infinite; pointer-events: none;
}
.wake-pill.listening .wake-pill-icon {
  background: conic-gradient(from var(--angle, 0deg), var(--siri-stops)); color: #fff;
  animation: spin 3s linear infinite;
}
.wake-pill.armed .wake-pill-icon { animation: spin 3s linear infinite, breathe 0.9s ease-in-out infinite; }
@media (max-width: 480px) { .wake-pill { font-size: 14px; height: 44px; } }

/* --------------------------------------------------------------------------
   The orb (with the official Siri glyph floating inside)
   -------------------------------------------------------------------------- */
.orb {
  --size: 200px;
  position: relative;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  isolation: isolate;
  flex: 0 0 auto;
}
.orb > span { position: absolute; border-radius: 50%; }
.orb-glow {
  inset: -22%;
  background: conic-gradient(from var(--angle, 0deg), var(--siri-stops));
  filter: blur(calc(var(--size) * 0.16));
  opacity: 0.5;
  animation: spin 9s linear infinite;
}
.orb-ring {
  inset: 0;
  background: conic-gradient(from var(--angle, 0deg), var(--siri-stops));
  animation: spin 6s linear infinite reverse;
  -webkit-mask: radial-gradient(circle, transparent 66%, #000 68%, #000 100%);
          mask: radial-gradient(circle, transparent 66%, #000 68%, #000 100%);
  filter: blur(1px);
}
/* iOS 18 Siri tile palette (orange → red → pink → lavender → blue) as drifting blobs */
.orb-core {
  inset: 4%;
  background:
    radial-gradient(circle at 22% 22%, #fe9f1b, transparent 55%),
    radial-gradient(circle at 78% 18%, #ff2063, transparent 55%),
    radial-gradient(circle at 82% 62%, #fd56cb, transparent 50%),
    radial-gradient(circle at 60% 92%, #ef7aff, transparent 50%),
    radial-gradient(circle at 18% 80%, #02a4fd, transparent 55%),
    radial-gradient(circle at 50% 50%, #f76e49, transparent 70%),
    #ff5a8a;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.35), inset 0 -20px 40px rgba(0,0,0,0.25);
  animation: drift 16s linear infinite;
}
.orb-shine {
  inset: 4%;
  background: radial-gradient(ellipse at 35% 22%, rgba(255,255,255,0.45), transparent 38%);
  mix-blend-mode: screen;
}
@keyframes drift { to { transform: rotate(360deg); } }

.orb-mark {
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: calc(var(--size) * 2.5);
  z-index: 2;
  pointer-events: none;
}
.orb-mark svg {
  /* explicit px via calc: percentage-sized SVGs inside a grid mis-position in Chromium */
  width: calc(var(--size) * 0.64);
  height: calc(var(--size) * 0.64);
  overflow: visible;
  color: #fff;
  filter:
    drop-shadow(0 0 calc(var(--size) * 0.025) rgba(255,255,255,0.75))
    drop-shadow(0 calc(var(--size) * 0.015) calc(var(--size) * 0.04) rgba(0,0,0,0.35));
  transform-origin: 50% 50%;
  animation: mark-float 5.5s ease-in-out infinite;
  will-change: transform;
}
@keyframes mark-float {
  0%, 100% { transform: translateY(0)     rotate(0deg)  scale(1); }
  30%      { transform: translateY(-3.5%) rotate(-3deg) scale(1.03); }
  70%      { transform: translateY(2.5%)  rotate(3deg)  scale(0.98); }
}

.orb.thinking .orb-glow { opacity: 0.95; animation-duration: 2.5s; }
.orb.thinking .orb-ring { animation-duration: 1.5s; }
.orb.thinking .orb-core { animation-duration: 4s; }
.orb.thinking .orb-mark svg { animation: mark-flip 1.6s cubic-bezier(0.45, 0, 0.2, 1) infinite; }
.orb.listening .orb-glow { opacity: 1; animation: spin 2s linear infinite, breathe 0.9s ease-in-out infinite; }
.orb.listening .orb-core { animation-duration: 8s; }
.orb.listening .orb-mark svg {
  animation: mark-pulse 0.9s ease-in-out infinite;
  filter:
    drop-shadow(0 0 calc(var(--size) * 0.05) rgba(255,255,255,0.95))
    drop-shadow(0 calc(var(--size) * 0.015) calc(var(--size) * 0.04) rgba(0,0,0,0.35));
}
.orb.speaking .orb-core { animation-duration: 6s; }
.orb.speaking .orb-mark svg { animation: mark-talk 0.45s ease-in-out infinite; }

@keyframes mark-flip {
  0%   { transform: rotateY(0deg)   scale(1); }
  50%  { transform: rotateY(180deg) scale(1.06); }
  100% { transform: rotateY(360deg) scale(1); }
}
@keyframes mark-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes mark-talk  { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.08) rotate(-2deg); } }

.orb-mini { --size: 36px; }
.orb-mini .orb-glow { filter: blur(8px); opacity: 0.6; }
.orb-mini .orb-core { box-shadow: inset 0 0 6px rgba(0,0,0,0.35); }
.orb-mini .orb-mark svg { width: calc(var(--size) * 0.7); height: calc(var(--size) * 0.7); filter: drop-shadow(0 0 2px rgba(255,255,255,0.7)); }

/* --------------------------------------------------------------------------
   Typography helpers
   -------------------------------------------------------------------------- */
.section-head { text-align: center; margin-bottom: 56px; }
.section-title {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.07;
}
.section-sub {
  margin: 14px auto 0;
  max-width: 600px;
  color: var(--secondary);
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.4;
  letter-spacing: -0.01em;
}
@media (max-width: 734px) { .section-head { margin-bottom: 36px; } }

.grad {
  background: linear-gradient(92deg, var(--s-pink) 0%, var(--s-purple) 32%, var(--s-blue) 64%, var(--s-orange) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: shimmer 7s ease-in-out infinite;
}
@keyframes shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* --------------------------------------------------------------------------
   Buttons (iOS pills)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 980px;
  border: 0;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.012em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-secondary { background: rgba(255,255,255,0.10); color: var(--label); }
.btn-secondary:hover { background: rgba(255,255,255,0.16); }
.btn-lg { height: 50px; padding: 0 28px; }
.btn-sm { height: 30px; padding: 0 14px; font-size: 14px; }
.is-disabled { opacity: 0.4; pointer-events: none; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@media (max-width: 480px) {
  .cta-row { flex-direction: column; align-items: stretch; width: 100%; max-width: 360px; margin-left: auto; margin-right: auto; }
  .cta-row .btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(0,0,0,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.brand img { border-radius: 7px; }
.nav-links { display: flex; gap: 32px; font-size: 14px; color: rgba(255,255,255,0.8); }
.nav-links a { transition: color 0.2s; }
.nav-links a:hover { color: #fff; }
@media (max-width: 734px) { .nav-links { display: none; } }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(calc(100svh - var(--nav-h)), 860px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 48px 0 96px; /* bottom clearance for the floating "Hey Siri" pill on mobile */
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(50% 45% at 50% 22%, rgba(155, 92, 255, 0.22), transparent 70%),
    radial-gradient(38% 34% at 40% 26%, rgba(255, 45, 117, 0.16), transparent 70%),
    radial-gradient(40% 36% at 62% 24%, rgba(58, 141, 255, 0.16), transparent 70%);
}
.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero .orb { --size: clamp(116px, 14vw, 160px); margin-bottom: 28px; cursor: pointer; }

.hero-title {
  font-size: clamp(52px, 9.2vw, 104px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}
.hero-title .line { display: block; }
/* background-clip:text clips to the line box; give the gradient line room for descenders (the y in "buy") */
.hero-title .line.grad { padding-bottom: 0.14em; margin-bottom: -0.14em; }

.hero-sub {
  max-width: 620px;
  color: var(--secondary);
  font-size: clamp(18px, 1.9vw, 23px);
  line-height: 1.35;
  letter-spacing: -0.014em;
  margin-bottom: 36px;
}

.ca {
  margin-top: 30px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  height: 40px;
  padding: 0 6px 0 16px;
  border-radius: 980px;
  border: 0;
  background: rgba(255,255,255,0.08);
  color: var(--secondary);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.ca:hover { background: rgba(255,255,255,0.12); }
.ca-label { font-weight: 600; color: var(--label); }
.ca-value {
  font-family: var(--mono);
  font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: min(52vw, 360px);
}
.ca-copy {
  height: 28px; display: inline-flex; align-items: center;
  padding: 0 12px; border-radius: 980px;
  background: rgba(255,255,255,0.12); color: var(--label); font-size: 13px; font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.ca.copied .ca-copy { background: var(--green); color: #04130c; }

/* --------------------------------------------------------------------------
   Ticker strip
   -------------------------------------------------------------------------- */
.marquee {
  position: relative;
  overflow: hidden;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex; align-items: center; gap: 36px;
  width: max-content;
  animation: marquee 40s linear infinite;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--tertiary);
}
.marquee-track i { width: 4px; height: 4px; border-radius: 50%; background: var(--quaternary); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { position: relative; padding: var(--section-y) 0; }
.section + .section { padding-top: 0; }

/* --------------------------------------------------------------------------
   Icon tiles (iOS Settings style)
   -------------------------------------------------------------------------- */
.tile {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 11px;
  display: grid; place-items: center;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 1px 2px rgba(0,0,0,0.4);
}
.tile-blue   { background: linear-gradient(180deg, #3aa0ff, #0a6ee6); }
.tile-green  { background: linear-gradient(180deg, #4ce06a, #22b34a); }
.tile-purple { background: linear-gradient(180deg, #cf7bff, #9b3fe0); }
.tile-white  { background: linear-gradient(180deg, #ffffff, #d9d9de); color: #000; }
.tile-siri   { background: conic-gradient(from 200deg, #fe9f1b, #ff2063, #fd56cb, #ef7aff, #02a4fd, #fe9f1b); }

/* --------------------------------------------------------------------------
   Why: cards
   -------------------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; } }

.card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 36px 32px 34px;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.3s;
}
.card:hover { transform: translateY(-4px); background: #202022; }
.card .tile { margin-bottom: 24px; width: 48px; height: 48px; border-radius: 12px; }
.card h3 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.card p { color: var(--secondary); font-size: 17px; line-height: 1.47; }
@media (max-width: 734px) {
  .card { padding: 28px 24px 26px; }
  .card h3 { font-size: 21px; }
}

/* --------------------------------------------------------------------------
   Inset grouped list (iOS)
   -------------------------------------------------------------------------- */
.list {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  min-height: 60px;
}
.row + .row::before {
  /* iOS-style separator inset past the icon */
  content: "";
  position: absolute;
  left: 80px; right: 0; top: 0;
  height: 1px;
  background: var(--hairline);
}
.row-body { flex: 1; min-width: 0; }
.row-body h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.016em; line-height: 1.3; margin-bottom: 3px; }
.row-body p { font-size: 15px; line-height: 1.45; color: var(--secondary); }
.row-body a { color: var(--blue); }
.row-body a:hover { text-decoration: underline; }
.row-num {
  flex: 0 0 auto;
  color: var(--quaternary);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 734px) {
  .row { padding: 16px 16px; gap: 14px; }
  .row + .row::before { left: 74px; }
  .row-num { display: none; }
}

/* key/value rows (facts) */
.row.kv { justify-content: space-between; min-height: 52px; padding: 14px 20px; font-size: 16px; }
.row.kv + .row.kv::before { left: 20px; }
.row.kv .val { color: var(--secondary); text-align: right; font-variant-numeric: tabular-nums; }
.row.kv .val strong { color: var(--label); }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 20px; }
@media (max-width: 800px) { .facts { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; } }
.group-label {
  color: var(--tertiary);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 20px;
  margin-bottom: 8px;
}
.cta-row-facts { margin-top: 48px; }

/* --------------------------------------------------------------------------
   Siri sheet: hidden until summoned, then slides up over the page like iPhone
   -------------------------------------------------------------------------- */
.siri-sheet {
  position: fixed;
  inset: 0;
  z-index: 900; /* above nav + pill, below the edge glow */
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 var(--gutter) calc(20px + env(safe-area-inset-bottom, 0px));
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
.siri-sheet.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0s;
}
.siri-sheet .siri-panel {
  width: min(var(--narrow), 100%);
  transform: translateY(40px) scale(0.97);
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.siri-sheet.open .siri-panel { transform: none; }
@media (max-width: 734px) {
  .siri-sheet { padding: 0; }
  .siri-sheet .siri-panel {
    width: 100%;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    border-bottom: 0;
  }
  .siri-sheet .siri-panel-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}
html.siri-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   Inline dock for the chat + the "Hey Siri" controls beneath it
   -------------------------------------------------------------------------- */
.siri-dock { position: relative; }
.siri-dock .sheet-only { display: none; } /* the dismiss (X) only makes sense in the sheet */

.summon { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.summon-compact { margin-top: 28px; gap: 14px; }
.summon .orb { --size: clamp(96px, 12vw, 132px); }
.summon-status { color: var(--secondary); font-size: 15px; letter-spacing: -0.01em; min-height: 1.5em; max-width: 480px; }
.summon .btn[aria-pressed="true"] { background: rgba(255,255,255,0.10); color: var(--label); }
.summon .btn[aria-pressed="true"]:hover { background: rgba(255,255,255,0.16); }
.summon .btn[aria-pressed="true"] svg { color: var(--s-pink); }
.summon .btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* --------------------------------------------------------------------------
   Siri panel (iMessage-style)
   -------------------------------------------------------------------------- */
.siri-panel {
  position: relative;
  background: #000;
  border-radius: var(--r-xl);
  border: 1px solid var(--hairline);
  box-shadow: 0 40px 100px -40px rgba(0,0,0,0.9);
  overflow: hidden;
}
.siri-panel::before {
  /* soft Siri-colour hairline; brightens when she's active */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--angle, 0deg), var(--siri-stops));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; animation: spin 8s linear infinite; pointer-events: none;
  transition: opacity 0.4s;
  z-index: 3;
}
.siri-panel.active::before { opacity: 0.9; animation-duration: 3s; }

.siri-panel-head {
  display: flex; align-items: center; gap: 12px;
  height: 64px;
  padding: 0 16px 0 18px;
  background: rgba(28,28,30,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--hairline);
  position: relative; z-index: 2;
}
.siri-panel-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.siri-panel-title strong { font-size: 17px; letter-spacing: -0.016em; }
.siri-status { font-size: 13px; color: var(--tertiary); transition: color 0.2s; }
.siri-status.listening { color: var(--pink); }
.siri-status.thinking { color: var(--purple); }
.siri-status.speaking { color: var(--teal); }

.siri-panel-tools { margin-left: auto; display: flex; gap: 6px; }
.tool {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  border-radius: 980px; border: 0;
  background: rgba(255,255,255,0.08); color: var(--secondary);
  cursor: pointer; font-size: 13px; font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.tool:hover { color: var(--label); background: rgba(255,255,255,0.14); }
.tool[aria-pressed="true"] { color: #fff; background: var(--blue); }
.tool[aria-pressed="true"]:hover { background: var(--blue-hover); }
.tool[aria-pressed="false"] .wave { opacity: 0.3; }
.tool[disabled] { opacity: 0.35; cursor: not-allowed; }
.tool-icon { width: 34px; padding: 0; justify-content: center; }
@media (max-width: 560px) {
  .tool span { display: none; }
  .tool { width: 34px; padding: 0; justify-content: center; }
}

.chat {
  height: min(48vh, 440px);
  overflow-y: auto;
  padding: 20px 16px 12px;
  display: flex; flex-direction: column; gap: 8px;
  scroll-behavior: smooth;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent;
  overscroll-behavior: contain;
}
@media (max-width: 734px) { .chat { height: clamp(240px, 42svh, 440px); } }

.msg {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.012em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: pop 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
.msg.user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 6px; }
.msg.siri { align-self: flex-start; background: #262629; color: var(--label); border-bottom-left-radius: 6px; }
.msg.siri.error { color: #ff9a9a; }
.msg.siri .cursor {
  display: inline-block; width: 7px; height: 1em; vertical-align: -2px; margin-left: 2px;
  background: conic-gradient(from var(--angle, 0deg), var(--siri-stops)); border-radius: 2px;
  animation: blink 0.9s steps(2) infinite, spin 3s linear infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.typing { display: inline-flex; gap: 4px; align-items: center; height: 1.35em; padding: 0 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--tertiary); animation: bounce 1.1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-3px); opacity: 1; } }

.siri-panel-foot {
  position: relative; z-index: 2;
  background: rgba(28,28,30,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--hairline);
  padding: 10px 0 12px;
}

.composer {
  display: flex; align-items: center; gap: 8px;
  padding: 0 16px;
}
.field {
  flex: 1; min-width: 0;
  display: flex; align-items: center;
  height: 40px;
  padding: 0 4px 0 14px;
  border-radius: 980px;
  border: 1px solid var(--hairline-strong);
  background: rgba(0,0,0,0.35);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field:focus-within { border-color: rgba(10,132,255,0.8); box-shadow: 0 0 0 3px rgba(10,132,255,0.2); }
.field input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent; color: var(--label);
  font-size: 17px; letter-spacing: -0.012em; height: 100%;
}
.field input::placeholder { color: var(--tertiary); }
.field input:disabled { opacity: 0.6; }
.mic {
  flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; border: 0; background: transparent; color: var(--secondary);
  cursor: pointer; position: relative;
  transition: color 0.2s, background 0.2s;
}
.mic:hover { color: var(--label); }
.mic.on { color: #fff; background: conic-gradient(from var(--angle, 0deg), var(--siri-stops)); animation: spin 3s linear infinite; }
.mic.on::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid rgba(255,45,117,0.55); animation: ping-ring 1s ease-out infinite;
}
@keyframes ping-ring { 0% { transform: scale(0.85); opacity: 1; } 100% { transform: scale(1.45); opacity: 0; } }
.mic[disabled] { opacity: 0.35; cursor: not-allowed; }
.send {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: var(--blue); color: #fff;
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
}
.send:hover { background: var(--blue-hover); }
.send:active { transform: scale(0.94); }
.send[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }

.composer-note { margin: 10px 16px 0; text-align: center; color: var(--quaternary); font-size: 12px; letter-spacing: 0; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 40px 0 calc(96px + env(safe-area-inset-bottom, 0px)); /* clears the floating pill */
  color: var(--tertiary);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--secondary); font-size: 14px; font-weight: 500; margin-bottom: 16px; }
.footer-brand img { border-radius: 6px; }
.disclaimer { max-width: 720px; margin: 0 auto 18px; color: var(--quaternary); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.footer-links a { color: var(--tertiary); transition: color 0.2s; }
.footer-links a:hover { color: var(--label); }

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
