/* ==========================================================================
   Design tokens
   ========================================================================== */

:root {
  /* Color — light */
  --color-bg: #f5f5f7;
  --color-section-white: #ffffff;
  --color-card-grey: #f5f5f7;
  --color-bg-elevated: #ffffff;
  --color-bg-recessed: #ececee;
  --color-text: #1d1d1f;
  --color-text-secondary: #58585d;
  --color-accent: #d90044;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-header-bg: rgba(245, 245, 247, 0.72);

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Helvetica, Arial, sans-serif;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Layout */
  --site-width: min(1080px, calc(100vw - 48px));
  --max-width: var(--site-width);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.2s;
}

::selection {
  background: var(--color-accent);
  color: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #161618;
    --color-section-white: #000000;
    --color-card-grey: #222225;
    --color-bg-elevated: #222225;
    --color-bg-recessed: #2d2d30;
    --color-text: #f5f5f7;
    --color-text-secondary: #a1a1a6;
    --color-accent: #ff376b;
    --color-border: rgba(255, 255, 255, 0.1);
    --color-header-bg: rgba(22, 22, 24, 0.75);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 640px) {
  :root {
    --site-width: calc(100vw - 32px);
  }

  .site-nav {
    gap: var(--space-4);
  }
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--color-bg);
}

h1, h2, h3, p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

.container {
  width: var(--site-width);
  max-width: 100%;
  margin-inline: auto;
  padding-inline: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration) var(--ease);
  padding-top: env(safe-area-inset-top, 0px);
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: 0.9375rem;
}

.logo-mark {
  display: flex;
  align-items: center;
}

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

.logo-text {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  font-size: 0.8125rem;
  height: 52px;
}

.nav-link {
  font-weight: 500;
  color: var(--color-text-secondary);
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding-inline: 2px;
  position: relative;
  transition: color var(--duration) var(--ease);
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-link.is-active {
  color: var(--color-text);
}

.nav-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: left 0.35s cubic-bezier(0.32, 0.72, 0, 1),
              width 0.35s cubic-bezier(0.32, 0.72, 0, 1),
              opacity 0.25s ease;
  pointer-events: none;
  opacity: 0;
}

.nav-indicator.is-visible {
  opacity: 1;
}

.header-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0071e3;
  color: #ffffff !important;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1;
  padding: 4px 11px;
  border-radius: 9999px;
  text-decoration: none !important;
  letter-spacing: -0.01em;
  white-space: nowrap;
  margin-left: 2px;
  transition: background-color var(--duration) var(--ease), opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.header-cta-btn:hover {
  background: #0077ed;
  opacity: 0.95;
  text-decoration: none !important;
}

.header-cta-btn:active {
  background: #0062c4;
  transform: scale(0.97);
}

@media (prefers-color-scheme: dark) {
  .header-cta-btn {
    background: #0071e3;
    color: #ffffff !important;
  }

  .header-cta-btn:hover {
    background: #0077ed;
  }
}

/* ==========================================================================
   Notification Banner (Dismissable Under-Header Ribbon — Mobile Only)
   ========================================================================== */

.notification-banner {
  display: none;
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  padding-block: 10px;
  overflow: hidden;
  max-height: 80px;
  opacity: 1;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease,
              padding 0.35s ease,
              border-color 0.35s ease;
}

.notification-banner.is-dismissed {
  max-height: 0;
  opacity: 0;
  padding-block: 0;
  border-bottom-color: transparent;
  pointer-events: none;
}

.notification-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 0.8125rem;
  color: var(--color-text);
  padding-inline: var(--space-8);
  text-align: center;
}

.notification-banner-text {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.notification-banner-link {
  color: var(--color-accent) !important;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  text-decoration: none !important;
  transition: opacity var(--duration) var(--ease);
}

.notification-banner-link:hover {
  text-decoration: underline !important;
  opacity: 0.85;
}

.notification-banner-close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--color-text-secondary);
  background: transparent;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease);
}

.notification-banner-close:hover {
  color: var(--color-text);
  background: var(--color-border);
}

@media (max-width: 640px) {
  .header-cta-btn {
    display: none !important;
  }

  .notification-banner {
    display: block;
  }

  .notification-banner-inner {
    padding-inline: 28px 24px;
    font-size: 0.75rem;
    line-height: 1.35;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  text-align: center;
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
  overflow: hidden;
  position: relative;
}

.hero-copy {
  margin-bottom: 0;
  margin-inline: auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0071e3;
  color: #ffffff !important;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 4.5px 15px;
  border-radius: 9999px;
  margin-bottom: var(--space-4);
  text-decoration: none !important;
  cursor: pointer;
  transition: background var(--duration) var(--ease),
              color var(--duration) var(--ease),
              transform var(--duration) var(--ease),
              opacity var(--duration) var(--ease);
}

.hero-badge:hover {
  background: #0077ed;
  opacity: 0.95;
  transform: scale(1.03);
  color: #ffffff !important;
  text-decoration: none !important;
}

.hero-badge:active {
  background: #0062c4;
  transform: scale(0.97);
}

@media (prefers-color-scheme: dark) {
  .hero-badge {
    background: #0071e3;
    color: #ffffff !important;
    box-shadow: none;
  }

  .hero-badge:hover {
    background: #0077ed;
  }

  .hero-badge:active {
    background: #0062c4;
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: var(--space-3);
}

.hero-subhead {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--color-text-secondary);
  line-height: 1.45;
  max-width: 680px;
  text-wrap: pretty;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

.hero-cta {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-8);
}

.appstore-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 8px;
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.appstore-badge:hover {
  opacity: 0.85;
  transform: scale(0.98);
}

.appstore-badge:active {
  transform: scale(0.95);
}

.badge-img {
  height: 40px;
  width: auto;
  display: block;
}

/* Platform switcher tabs — Pill Capsule */

.platform-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--color-bg-elevated);
  border-radius: 9999px;
  padding: 6px;
  margin-bottom: var(--space-2);
  gap: 4px;
  border: none;
}

.tab {
  padding: 8px 24px;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
  cursor: pointer;
}

.tab[aria-selected="true"] {
  background: var(--color-text);
  color: var(--color-bg);
}

@media (prefers-color-scheme: dark) {
  .tab[aria-selected="true"] {
    background: #ffffff;
    color: #000000;
  }
}

#features,
#faq,
#contact,
section[id],
footer[id] {
  scroll-margin-top: calc(var(--header-height, 52px) + 16px);
}

/* ==========================================================================
   Hero — Linear 3-Platform Track (iPadOS | macOS | iOS)
   ========================================================================== */

.hero {
  background-color: var(--color-bg);
  text-align: center;
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
  overflow: hidden;
  position: relative;
}

/* ==========================================================================
   Hero Platform Showcase Stage (Apple Intelligence Layered Fan Layout)
   ========================================================================== */

.hero-stage-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  overflow: visible;
  padding: 12px 16px clamp(40px, 8vw, 80px);
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.hero-carousel-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

.hero-showcase-stage {
  position: relative;
  width: 100%;
  max-width: 1380px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: clamp(360px, 52vw, 620px);
}

.hero-stage-item {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-item-left,
.hero-item-right {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1 !important;
}

/* -------------------------------------------------------------
   Background Fanning Visual Cards (Always Behind Center Device)
   ------------------------------------------------------------- */
.hero-bg-card {
  position: absolute;
  width: clamp(190px, 23vw, 290px);
  height: clamp(210px, 26vw, 320px);
  border-radius: 24px;
  overflow: visible;
  box-shadow: none;
  border: none;
  user-select: none;
  background: transparent;
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(0.62) rotate(0deg);
  transition: transform 0.82s cubic-bezier(0.175, 0.885, 0.32, 1.18),
              opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
  z-index: 1;
}

@media (prefers-color-scheme: dark) {
  .hero-bg-card {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }
}

/* Feature Cards Base Inner — Containerless Floating Layout */
.bg-card-feature {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  box-sizing: border-box;
  text-align: center;
  position: relative;
  overflow: visible;
  border-radius: inherit;
  background: transparent;
}

@media (prefers-color-scheme: dark) {
  .bg-card-feature {
    background: transparent;
  }
}

/* Feature Card Visual Center */
.feature-card-visual {
  position: relative;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ambient Radial Glows Behind Floating Icons */
.feature-orb-ambient {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  filter: blur(38px);
  pointer-events: none;
  opacity: 0.62;
  transition: opacity 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  .feature-orb-ambient {
    opacity: 0.85;
    filter: blur(44px);
  }
}

.feature-ambient-siri {
  background: radial-gradient(circle, rgba(142, 68, 235, 0.7) 0%, rgba(0, 122, 255, 0.5) 45%, rgba(255, 45, 85, 0.38) 75%, transparent 85%);
}

.feature-ambient-shortcuts {
  background: radial-gradient(circle, rgba(255, 45, 85, 0.65) 0%, rgba(0, 199, 190, 0.55) 55%, transparent 75%);
}

.feature-ambient-icloud {
  background: radial-gradient(circle, rgba(0, 122, 255, 0.65) 0%, rgba(90, 200, 250, 0.45) 60%, transparent 80%);
}

.feature-ambient-ai {
  background: conic-gradient(from 0deg, #ff3b30, #ff9500, #ffcc00, #34c759, #007aff, #5856d6, #af52de, #ff3b30);
  opacity: 0.42;
}

/* Floating App Icons (Enlarged direct squircle assets) */
.feature-app-icon {
  width: clamp(130px, 15vw, 172px);
  height: clamp(130px, 15vw, 172px);
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 2;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.28));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  .feature-app-icon {
    filter: drop-shadow(0 22px 46px rgba(0, 0, 0, 0.7));
  }
}

/* apple-intelligence-2.png squircle styling & optical alignment */
.feature-icon-ai-squircle {
  width: calc(clamp(130px, 15vw, 172px) * 0.869);
  height: calc(clamp(130px, 15vw, 172px) * 0.869);
  border-radius: 22.5%;
}

/* Hide text for floating icons mode */
.feature-card-info {
  display: none !important;
}

.feature-card-title {
  margin: 0;
  font-size: clamp(0.875rem, 1.1vw, 0.9375rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-align: center;
  white-space: nowrap;
  color: var(--color-text, #1d1d1f);
}

@media (prefers-color-scheme: dark) {
  .feature-card-title {
    color: #ffffff !important;
  }
}



/* Recipe Text Cards */
.bg-card-recipe {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3vw, 32px);
  box-sizing: border-box;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: inherit;
  background: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .bg-card-recipe {
    background: #1c1c1e;
  }
}

.recipe-card-title {
  font-family: -apple-system-ui-serif, "New York", "Charter", Georgia, Cambria, "Times New Roman", serif;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--color-text, #1d1d1f);
  margin: 0;
  text-align: center;
  word-break: break-word;
  hyphens: auto;
}

@media (prefers-color-scheme: dark) {
  .recipe-card-title {
    color: #f5f5f7;
  }
}

.recipe-card-paren {
  display: block;
  font-size: 0.88em;
  font-weight: 600;
  opacity: 0.82;
  margin-top: 6px;
  letter-spacing: -0.015em;
}

/* -------------------------------------------------------------
   Platform-Specific Fanned Positions (macOS / iPadOS / iOS)
   ------------------------------------------------------------- */

/* 1. macOS (MacBook Pro Center — Closely framed side wings) */
.hero-showcase-stage[data-platform="macos"].is-fanned .bg-card-left-outer {
  opacity: 1;
  transform: translateX(-196%) translateY(22px) rotate(-5.5deg) scale(0.84);
  transition-delay: 0.12s;
  z-index: 1;
}

.hero-showcase-stage[data-platform="macos"].is-fanned .bg-card-left-inner {
  opacity: 1;
  transform: translateX(-136%) translateY(-18px) rotate(-2.5deg) scale(0.90);
  transition-delay: 0.04s;
  z-index: 2;
}

.hero-showcase-stage[data-platform="macos"].is-fanned .bg-card-right-inner {
  opacity: 1;
  transform: translateX(136%) translateY(-18px) rotate(2.5deg) scale(0.90);
  transition-delay: 0.04s;
  z-index: 2;
}

.hero-showcase-stage[data-platform="macos"].is-fanned .bg-card-right-outer {
  opacity: 1;
  transform: translateX(196%) translateY(22px) rotate(5.5deg) scale(0.84);
  transition-delay: 0.12s;
  z-index: 1;
}

/* 2. iPadOS (Landscape iPad Center — Fully unobstructed side wings) */
.hero-showcase-stage[data-platform="ipados"].is-fanned .bg-card-left-outer {
  opacity: 1;
  transform: translateX(-204%) translateY(20px) rotate(-5deg) scale(0.86);
  transition-delay: 0.12s;
  z-index: 1;
}

.hero-showcase-stage[data-platform="ipados"].is-fanned .bg-card-left-inner {
  opacity: 1;
  transform: translateX(-144%) translateY(-16px) rotate(-2.5deg) scale(0.92);
  transition-delay: 0.04s;
  z-index: 3;
}

.hero-showcase-stage[data-platform="ipados"].is-fanned .bg-card-right-inner {
  opacity: 1;
  transform: translateX(144%) translateY(-16px) rotate(2.5deg) scale(0.92);
  transition-delay: 0.04s;
  z-index: 3;
}

.hero-showcase-stage[data-platform="ipados"].is-fanned .bg-card-right-outer {
  opacity: 1;
  transform: translateX(204%) translateY(20px) rotate(5deg) scale(0.86);
  transition-delay: 0.12s;
  z-index: 1;
}

/* 3. iOS (Compact iPhone Center — Fully unobstructed side wings) */
.hero-showcase-stage[data-platform="ios"].is-fanned .bg-card-left-outer {
  opacity: 1;
  transform: translateX(-170%) translateY(14px) rotate(-3.5deg) scale(0.88);
  transition-delay: 0.12s;
  z-index: 1;
}

.hero-showcase-stage[data-platform="ios"].is-fanned .bg-card-left-inner {
  opacity: 1;
  transform: translateX(-104%) translateY(-10px) rotate(-1.5deg) scale(0.94);
  transition-delay: 0.04s;
  z-index: 3;
}

.hero-showcase-stage[data-platform="ios"].is-fanned .bg-card-right-inner {
  opacity: 1;
  transform: translateX(104%) translateY(-10px) rotate(1.5deg) scale(0.94);
  transition-delay: 0.04s;
  z-index: 3;
}

.hero-showcase-stage[data-platform="ios"].is-fanned .bg-card-right-outer {
  opacity: 1;
  transform: translateX(170%) translateY(14px) rotate(3.5deg) scale(0.88);
  transition-delay: 0.12s;
  z-index: 1;
}

/* -------------------------------------------------------------
   Foreground Featured Center Device (ALWAYS In Front)
   ------------------------------------------------------------- */
.hero-item-center,
.hero-device-center {
  position: relative;
  z-index: 50 !important;
  isolation: isolate;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: clamp(360px, 52vw, 580px);
}

.hero-device-view {
  position: relative;
  z-index: 50 !important;
  display: none;
  width: 100%;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.95);
  will-change: transform, opacity;
}

.hero-device-view.is-active {
  display: flex;
  opacity: 1;
  transform: scale(1);
  animation: appleDevicePop 0.42s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
}

@keyframes appleDevicePop {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(6px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hero-device-view picture {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-device-img {
  position: relative;
  z-index: 50 !important;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.mac-device-img {
  width: 100%;
  max-width: clamp(340px, 56vw, 760px);
  height: auto;
  max-height: clamp(320px, 44vw, 500px);
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.16));
}

.ipad-device-img {
  width: auto;
  max-width: clamp(320px, 48vw, 620px);
  height: auto;
  max-height: clamp(240px, 36vw, 440px);
  aspect-ratio: 2640 / 1880;
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.18));
}

.ios-device-img {
  height: clamp(360px, 52vw, 580px);
  width: auto;
  max-width: min(85vw, 295px);
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.2));
}

@media (prefers-color-scheme: dark) {
  .mac-device-img {
    filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.65));
  }
  .ipad-device-img {
    filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.65));
  }
  .ios-device-img {
    filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.7));
  }
}

/* Responsive adjustments */
/* Responsive adjustments (Medium Screens: 901px - 1200px) */
@media (min-width: 901px) and (max-width: 1200px) {
  .mac-device-img {
    max-width: clamp(320px, 48vw, 580px);
    max-height: clamp(240px, 36vw, 400px);
  }
  .ipad-device-img {
    max-width: clamp(300px, 44vw, 520px);
    max-height: clamp(220px, 32vw, 380px);
  }

  .hero-showcase-stage[data-platform="macos"].is-fanned .bg-card-left-outer {
    transform: translateX(-174%) translateY(18px) rotate(-4.5deg) scale(0.74);
  }
  .hero-showcase-stage[data-platform="macos"].is-fanned .bg-card-left-inner {
    transform: translateX(-120%) translateY(-14px) rotate(-2deg) scale(0.80);
  }
  .hero-showcase-stage[data-platform="macos"].is-fanned .bg-card-right-inner {
    transform: translateX(120%) translateY(-14px) rotate(2deg) scale(0.80);
  }
  .hero-showcase-stage[data-platform="macos"].is-fanned .bg-card-right-outer {
    transform: translateX(174%) translateY(18px) rotate(4.5deg) scale(0.74);
  }

  .hero-showcase-stage[data-platform="ipados"].is-fanned .bg-card-left-outer {
    transform: translateX(-182%) translateY(18px) rotate(-4.5deg) scale(0.76);
  }
  .hero-showcase-stage[data-platform="ipados"].is-fanned .bg-card-left-inner {
    transform: translateX(-128%) translateY(-14px) rotate(-2deg) scale(0.82);
  }
  .hero-showcase-stage[data-platform="ipados"].is-fanned .bg-card-right-inner {
    transform: translateX(128%) translateY(-14px) rotate(2deg) scale(0.82);
  }
  .hero-showcase-stage[data-platform="ipados"].is-fanned .bg-card-right-outer {
    transform: translateX(182%) translateY(18px) rotate(4.5deg) scale(0.76);
  }

  .hero-showcase-stage[data-platform="ios"].is-fanned .bg-card-left-outer {
    transform: translateX(-156%) translateY(12px) rotate(-3deg) scale(0.80);
  }
  .hero-showcase-stage[data-platform="ios"].is-fanned .bg-card-left-inner {
    transform: translateX(-98%) translateY(-8px) rotate(-1deg) scale(0.86);
  }
  .hero-showcase-stage[data-platform="ios"].is-fanned .bg-card-right-inner {
    transform: translateX(98%) translateY(-8px) rotate(1deg) scale(0.86);
  }
  .hero-showcase-stage[data-platform="ios"].is-fanned .bg-card-right-outer {
    transform: translateX(156%) translateY(12px) rotate(3deg) scale(0.80);
  }
}

/* Desktop: Never show mobile glow */
.hero-mobile-glow {
  display: none !important;
}

/* ==========================================================================
   Small & Mobile Screens (<= 900px): Pure Platform Device Showcase
   ========================================================================== */
@media (max-width: 900px) {
  /* Increase gap under platform selector pill */
  .platform-tabs {
    margin-bottom: clamp(20px, 4.5vw, 32px);
  }

  .hero-stage-container {
    padding-left: 8px;
    padding-right: 8px;
    padding-top: 4px;
    padding-bottom: var(--space-6);
    overflow: visible;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
  }

  /* Hide background cards when screen gets too small — just show platform image */
  .hero-item-left,
  .hero-item-right,
  .hero-bg-card {
    display: none !important;
  }

  .hero-carousel-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    padding: 0;
  }

  .hero-showcase-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    height: clamp(270px, 60vw, 440px);
    overflow: visible;
    padding: 0;
  }

  /* Glowing ambient gradient behind platform pictures (Active on small screens when icons are hidden) */
  .hero-mobile-glow {
    display: block !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    max-width: 100vw;
    height: 100%;
    min-height: 320px;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 92%);
    mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 92%);
  }

  .mobile-glow-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
  }

  /* Center: Cyan & warm amber radiance behind screen */
  .mobile-glow-center {
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(260px, 52vw, 440px);
    height: clamp(220px, 44vw, 340px);
    background: radial-gradient(ellipse 70% 50% at 50% 50%, rgba(0, 199, 190, 0.45) 0%, rgba(255, 149, 0, 0.3) 50%, transparent 80%);
    filter: blur(50px);
    opacity: 0.75;
  }

  /* Left: Siri violet & Shortcuts magenta (anchored relative to center device) */
  .mobile-glow-left {
    top: 20%;
    left: calc(50% - clamp(140px, 28vw, 270px));
    transform: translateX(-50%);
    width: clamp(220px, 44vw, 360px);
    height: clamp(220px, 44vw, 360px);
    background: radial-gradient(circle, rgba(142, 68, 235, 0.8) 0%, rgba(255, 45, 85, 0.55) 45%, transparent 75%);
    filter: blur(45px);
    opacity: 0.9;
  }

  /* Right: iCloud electric blue & Apple Intelligence purple (anchored relative to center device) */
  .mobile-glow-right {
    top: 20%;
    left: calc(50% + clamp(140px, 28vw, 270px));
    transform: translateX(-50%);
    width: clamp(220px, 44vw, 360px);
    height: clamp(220px, 44vw, 360px);
    background: radial-gradient(circle, rgba(0, 122, 255, 0.8) 0%, rgba(175, 82, 222, 0.55) 45%, transparent 75%);
    filter: blur(45px);
    opacity: 0.9;
  }

  /* Tailored orb offsets per platform when active */
  .hero-showcase-stage[data-platform="ipados"] .mobile-glow-left {
    left: calc(50% - clamp(130px, 24vw, 240px));
  }
  .hero-showcase-stage[data-platform="ipados"] .mobile-glow-right {
    left: calc(50% + clamp(130px, 24vw, 240px));
  }

  .hero-showcase-stage[data-platform="ios"] .mobile-glow-left {
    left: calc(50% - clamp(100px, 18vw, 150px));
    width: clamp(200px, 36vw, 300px);
    height: clamp(200px, 36vw, 300px);
  }
  .hero-showcase-stage[data-platform="ios"] .mobile-glow-right {
    left: calc(50% + clamp(100px, 18vw, 150px));
    width: clamp(200px, 36vw, 300px);
    height: clamp(200px, 36vw, 300px);
  }

  @media (prefers-color-scheme: light) {
    .mobile-glow-left,
    .mobile-glow-right {
      opacity: 0.55;
      filter: blur(50px);
    }
    .mobile-glow-center {
      opacity: 0.45;
      filter: blur(55px);
    }
  }

  /* Center Featured Platform Device */
  .hero-item-center,
  .hero-device-center {
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: visible;
    z-index: 50 !important;
  }

  .hero-device-view {
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
  }

  .hero-device-view.is-active {
    display: flex;
  }

  .hero-device-view picture {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Remove drop-shadow from all devices on smaller screens */
  .hero-device-img {
    filter: none !important;
    object-fit: contain;
  }

  /* Enlarged platform images — nearly full width on smaller screens */
  .mac-device-img {
    width: 100%;
    max-width: min(96vw, 680px);
    height: auto;
    max-height: 100%;
    filter: none !important;
  }

  .ipad-device-img {
    width: 100%;
    max-width: min(94vw, 600px);
    height: auto;
    max-height: 100%;
    aspect-ratio: 2640 / 1880;
    filter: none !important;
  }

  .ios-device-img {
    height: 100%;
    max-height: 100%;
    width: auto;
    max-width: min(80vw, 290px);
    filter: none !important;
  }
}

/* ==========================================================================
   Key Features / Highlights — Apple Full-Screen Gallery
   ========================================================================== */

.features {
  background-color: var(--color-section-white);
  padding-top: clamp(4.5rem, 9vw, 7.5rem);
  padding-bottom: clamp(5rem, 10vw, 8rem);
  text-align: center;
  overflow: hidden;
}

.features-header {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  text-align: left;
}

.features-heading {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--color-text);
  margin: 0 0 var(--space-3) 0;
}

.features-subhead {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 400;
  font-style: normal;
  color: var(--color-text-secondary);
  line-height: 1.45;
  max-width: 680px;
  text-wrap: pretty;
  margin: 0;
}

.gallery-wrapper {
  position: relative;
  width: 100%;
}

.gallery-track {
  display: flex;
  gap: var(--space-6);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-block: var(--space-2) var(--space-8);
  padding-inline: calc((100vw - var(--site-width)) / 2);
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

/* Full-Screen Immersive Cards */

.gallery-card {
  position: relative;
  flex: 0 0 var(--site-width);
  width: var(--site-width);
  height: clamp(480px, 60vh, 580px);
  scroll-snap-align: center;
  background: var(--color-card-grey);
  border: none;
  border-radius: 28px;
  box-shadow: none;
  padding: clamp(1.75rem, 3.5vw, 2.5rem) clamp(1.75rem, 3.5vw, 2.5rem) 0 clamp(1.75rem, 3.5vw, 2.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  overflow: hidden;
  box-sizing: border-box;
  opacity: 0.75;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card.is-active {
  opacity: 1;
}

.card-copy {
  position: relative;
  z-index: 15;
  width: 100%;
  max-width: 720px;
  margin-inline: 0 auto;
  margin-bottom: clamp(1.75rem, 3.2vw, 2.5rem);
  flex-shrink: 0;
}

.card-copy h3 {
  color: var(--color-text);
  font-size: clamp(1.1875rem, 1.8vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

@media (max-width: 820px) {
  .gallery-card {
    padding: clamp(1.35rem, 4.2vw, 1.875rem) clamp(1.35rem, 4.2vw, 1.875rem) 0 clamp(1.35rem, 4.2vw, 1.875rem);
    border-radius: 24px;
    height: clamp(440px, 62vh, 520px);
  }

  .card-copy {
    margin-bottom: clamp(1rem, 2.6vw, 1.5rem);
    max-width: 100%;
  }

  .card-copy h3 {
    font-size: clamp(1.0625rem, 3.6vw, 1.25rem);
    line-height: 1.38;
    letter-spacing: -0.015em;
  }
}

@media (max-width: 480px) {
  .gallery-card {
    padding: 22px 20px 0 20px;
    border-radius: 22px;
    height: clamp(420px, 60vh, 480px);
  }

  .card-copy {
    margin-bottom: 12px;
  }

  .card-copy h3 {
    font-size: 1.0625rem;
    line-height: 1.36;
    letter-spacing: -0.015em;
  }
}

.card-visual {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.card-img {
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  object-position: top;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: none;
  border: none;
}

.card-visual picture {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 820px;
  align-self: flex-start;
  overflow: visible;
}

/* ==========================================================================
   Card 5: Glorious Markdown Minimal White Container (Whole-Card Centered)
   ========================================================================== */

#card-markdown.gallery-card {
  position: relative;
  overflow: hidden;
  border: none;
  background-color: #4a9e82;
}

#card-markdown.gallery-card::before {
  content: "";
  position: absolute;
  inset: -120px;
  background: 
    radial-gradient(ellipse 75% 65% at 5% 10%, #6ee7b7 0%, rgba(110, 231, 183, 0.95) 45%, transparent 85%),
    radial-gradient(ellipse 80% 75% at 15% 95%, #38bdf8 0%, rgba(56, 189, 248, 0.95) 45%, transparent 85%),
    radial-gradient(ellipse 80% 75% at 50% 50%, #4a9e82 0%, rgba(74, 158, 130, 0.9) 50%, transparent 90%),
    radial-gradient(ellipse 80% 75% at 85% 95%, #818cf8 0%, rgba(129, 140, 248, 0.95) 45%, transparent 85%),
    radial-gradient(ellipse 75% 65% at 95% 5%, #fbbf24 0%, rgba(251, 191, 36, 0.95) 45%, transparent 85%),
    linear-gradient(135deg, #6ee7b7 0%, #38bdf8 25%, #4a9e82 50%, #818cf8 75%, #fbbf24 100%);
  filter: blur(54px);
  transform: scale(1.35);
  pointer-events: none;
  z-index: 0;
}

#card-markdown .card-copy h3 {
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
  #card-markdown.gallery-card {
    background-color: #10161f;
  }

  #card-markdown.gallery-card::before {
    inset: -120px;
    background: 
      radial-gradient(ellipse 75% 65% at 5% 10%, rgba(52, 211, 153, 0.65) 0%, transparent 80%),
      radial-gradient(ellipse 80% 75% at 15% 95%, rgba(56, 189, 248, 0.68) 0%, transparent 80%),
      radial-gradient(ellipse 80% 75% at 50% 50%, rgba(129, 140, 248, 0.60) 0%, transparent 85%),
      radial-gradient(ellipse 80% 75% at 85% 95%, rgba(251, 146, 60, 0.60) 0%, transparent 80%),
      radial-gradient(ellipse 75% 65% at 95% 5%, rgba(251, 191, 36, 0.58) 0%, transparent 80%),
      linear-gradient(135deg, rgba(52, 211, 153, 0.35) 0%, rgba(56, 189, 248, 0.35) 25%, rgba(129, 140, 248, 0.32) 50%, rgba(251, 146, 60, 0.32) 75%, rgba(251, 191, 36, 0.30) 100%);
    filter: blur(62px);
    transform: scale(1.35);
    opacity: 0.92;
  }
}

#card-markdown .card-copy {
  position: absolute;
  top: clamp(1.75rem, 3.5vw, 2.5rem);
  left: clamp(1.75rem, 3.5vw, 2.5rem);
  right: clamp(1.75rem, 3.5vw, 2.5rem);
  z-index: 10;
  pointer-events: none;
  margin: 0;
}

@media (max-width: 820px) {
  #card-markdown .card-copy {
    top: clamp(1.35rem, 4.2vw, 1.875rem);
    left: clamp(1.35rem, 4.2vw, 1.875rem);
    right: clamp(1.35rem, 4.2vw, 1.875rem);
  }
}

@media (max-width: 480px) {
  #card-markdown .card-copy {
    top: 20px;
    left: 20px;
    right: 20px;
  }
}

.card-visual-markdown {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  z-index: 2;
  box-sizing: border-box;
  padding: clamp(16px, 3.5vw, 36px);
}

.md-editor-text-stage {
  width: 100%;
  max-width: 760px;
  min-height: 248px;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.02);
  padding: clamp(18px, 2.6vw, 28px) clamp(20px, 3.2vw, 34px);
  text-align: left;
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: clamp(0.9375rem, 1.7vw, 1.125rem);
  line-height: 1.72;
  color: var(--color-text);
  box-sizing: border-box;
  margin-top: 0;
}

@media (prefers-color-scheme: dark) {
  .md-editor-text-stage {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  }
}

.md-code-line {
  margin-bottom: clamp(6px, 1.2vw, 12px);
  word-break: break-word;
}

.md-line-h2 {
  margin-bottom: clamp(10px, 1.8vw, 16px);
}

.md-line-typing {
  min-height: clamp(5.4em, 8vw, 6.2em);
}

.md-syntax-hash {
  color: var(--color-text-secondary);
  opacity: 0.5;
  font-weight: 600;
  margin-right: 4px;
}

.md-h2-text {
  font-weight: 700;
  font-size: 1.15em;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.md-syntax-num {
  color: var(--color-text-secondary);
  opacity: 0.6;
  font-weight: 600;
  margin-right: 4px;
}

.md-plain-text {
  color: var(--color-text);
  font-weight: 400;
}

.md-syntax-star {
  color: var(--color-text-secondary);
  opacity: 0.5;
  font-weight: 500;
}

.md-syntax-bold {
  font-weight: 700;
  color: var(--color-text);
}

.md-typing-caret {
  display: inline-block;
  width: 2.5px;
  height: 1.15em;
  background: #007aff;
  vertical-align: -0.16em;
  margin-left: 2px;
  border-radius: 1px;
  animation: mdCaretBlink 1s infinite;
}

@media (prefers-color-scheme: dark) {
  .md-typing-caret {
    background: #0a84ff;
  }
}

@keyframes mdCaretBlink {
  0%, 45% { opacity: 1; }
  50%, 95% { opacity: 0; }
  100% { opacity: 1; }
}

@media (max-width: 820px) {
  .md-editor-text-stage {
    max-width: 600px;
    min-height: 230px;
    font-size: 0.9375rem;
    line-height: 1.65;
    padding: 18px 22px;
  }
}

@media (max-width: 640px) {
  .card-visual-markdown {
    padding: 16px;
  }

  .md-editor-text-stage {
    max-width: 100%;
    min-height: 210px;
    padding: 14px 16px;
    font-size: 0.8125rem;
    line-height: 1.52;
    border-radius: 16px;
  }

  .md-line-typing {
    min-height: 7.2em;
  }
}

@media (max-width: 400px) {
  .md-editor-text-stage {
    min-height: 195px;
    padding: 12px 14px;
    font-size: 0.75rem;
    line-height: 1.48;
    border-radius: 14px;
  }

  .md-line-typing {
    min-height: 7.0em;
  }
}

/* ==========================================================================
   Card 6: iCloud Storage & Ownership (Centered Icons & Floating Hearts)
   ========================================================================== */

#card-ownership.gallery-card {
  position: relative;
  overflow: hidden;
  border: none;
  background: 
    radial-gradient(ellipse 65% 55% at 82% 78%, rgba(255, 182, 193, 0.28) 0%, transparent 65%),
    radial-gradient(ellipse 70% 60% at 18% 22%, rgba(135, 195, 255, 0.32) 0%, transparent 65%),
    linear-gradient(145deg, #edf4fe 0%, #f4f7fd 50%, #fdf2f7 100%);
}

@media (prefers-color-scheme: dark) {
  #card-ownership.gallery-card {
    border: none;
    background: 
      radial-gradient(ellipse 65% 55% at 82% 78%, rgba(255, 45, 85, 0.14) 0%, transparent 65%),
      radial-gradient(ellipse 70% 60% at 18% 22%, rgba(0, 122, 255, 0.18) 0%, transparent 65%),
      linear-gradient(145deg, #0d121f 0%, #111420 50%, #1a1219 100%);
  }
}

#card-ownership .card-copy {
  position: absolute;
  top: clamp(1.75rem, 3.5vw, 2.5rem);
  left: clamp(1.75rem, 3.5vw, 2.5rem);
  right: clamp(1.75rem, 3.5vw, 2.5rem);
  z-index: 10;
  pointer-events: none;
}

@media (max-width: 820px) {
  #card-ownership .card-copy {
    top: clamp(1.35rem, 4.2vw, 1.875rem);
    left: clamp(1.35rem, 4.2vw, 1.875rem);
    right: clamp(1.35rem, 4.2vw, 1.875rem);
  }
}

@media (max-width: 480px) {
  #card-ownership .card-copy {
    top: 22px;
    left: 20px;
    right: 20px;
  }
}

.card-visual-ownership {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  box-sizing: border-box;
}

.ownership-icons-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4.5vw, 42px);
  position: relative;
  z-index: 5;
}

.ownership-icon-item {
  width: clamp(96px, 14vw, 140px);
  height: clamp(96px, 14vw, 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.ownership-icon-item picture {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ownership-icon-item:hover {
  transform: translateY(-4px) scale(1.06);
}

/* App icon is full-bleed squircle; sized to 80.5% with matched macOS shadow to optically match iCloud squircle */
.icon-app .ownership-icon-img {
  width: 80.5%;
  height: 80.5%;
  max-width: 80.5%;
  max-height: 80.5%;
  object-fit: contain;
  display: block;
  border-radius: 22.4%;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.16)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.08));
}

/* iCloud Drive already has built-in shadow in its 1024x1024 PNG canvas; no extra shadow added */
.icon-icloud .ownership-icon-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  filter: none;
}

@media (prefers-color-scheme: dark) {
  .icon-app .ownership-icon-img {
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.55)) drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
  }
  .icon-icloud .ownership-icon-img {
    filter: none;
  }
}

.ownership-heart-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2rem, 4.2vw, 2.75rem);
  line-height: 1;
  user-select: none;
}

.ownership-heart-emoji {
  display: inline-block;
  transform-origin: center center;
  animation: naturalHeartbeat 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes naturalHeartbeat {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 4px 10px rgba(255, 45, 85, 0.28));
  }
  18% {
    transform: scale(1.15);
    filter: drop-shadow(0 6px 16px rgba(255, 45, 85, 0.42));
  }
  32% {
    transform: scale(0.97);
    filter: drop-shadow(0 3px 8px rgba(255, 45, 85, 0.25));
  }
  48% {
    transform: scale(1.22);
    filter: drop-shadow(0 8px 20px rgba(255, 45, 85, 0.48));
  }
  68% {
    transform: scale(0.98);
    filter: drop-shadow(0 3px 9px rgba(255, 45, 85, 0.28));
  }
  82% {
    transform: scale(1.02);
    filter: drop-shadow(0 4px 11px rgba(255, 45, 85, 0.3));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 4px 10px rgba(255, 45, 85, 0.28));
  }
}

/* Floating Hearts across the whole card */
.ownership-floating-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.floating-heart {
  position: absolute;
  display: inline-block;
  user-select: none;
  filter: drop-shadow(0 2px 8px rgba(255, 45, 85, 0.25));
}

.fh-1  { top: 18%; left: 12%; font-size: clamp(20px, 3.2vw, 32px); opacity: 0.65; animation: floatDrift1 5.4s ease-in-out infinite alternate; }
.fh-2  { top: 72%; left: 14%; font-size: clamp(24px, 3.8vw, 38px); opacity: 0.72; animation: floatDrift2 6.8s ease-in-out 0.8s infinite alternate; }
.fh-3  { top: 22%; right: 14%; font-size: clamp(22px, 3.4vw, 34px); opacity: 0.60; animation: floatDrift3 6.2s ease-in-out 1.2s infinite alternate; }
.fh-4  { top: 76%; right: 16%; font-size: clamp(26px, 4vw, 40px); opacity: 0.75; animation: floatDrift1 5.9s ease-in-out 0.4s infinite alternate; }
.fh-5  { top: 46%; left: 6%; font-size: clamp(16px, 2.5vw, 24px); opacity: 0.48; animation: floatDrift2 7.5s ease-in-out 2s infinite alternate; }
.fh-6  { top: 50%; right: 7%; font-size: clamp(18px, 2.8vw, 28px); opacity: 0.52; animation: floatDrift3 6.5s ease-in-out 1.6s infinite alternate; }
.fh-7  { top: 86%; left: 46%; font-size: clamp(20px, 3vw, 30px); opacity: 0.62; animation: floatDrift1 7.1s ease-in-out 0.9s infinite alternate; }
.fh-8  { top: 12%; left: 52%; font-size: clamp(16px, 2.4vw, 22px); opacity: 0.45; animation: floatDrift2 6.4s ease-in-out 2.4s infinite alternate; }
.fh-9  { top: 32%; left: 24%; font-size: clamp(14px, 2.2vw, 20px); opacity: 0.50; animation: floatDrift3 5.8s ease-in-out 1.5s infinite alternate; }
.fh-10 { top: 64%; left: 32%; font-size: clamp(16px, 2.5vw, 24px); opacity: 0.55; animation: floatDrift1 6.6s ease-in-out 2.1s infinite alternate; }
.fh-11 { top: 34%; right: 26%; font-size: clamp(15px, 2.3vw, 22px); opacity: 0.48; animation: floatDrift2 7.2s ease-in-out 1.8s infinite alternate; }
.fh-12 { top: 68%; right: 32%; font-size: clamp(18px, 2.8vw, 26px); opacity: 0.58; animation: floatDrift3 6.0s ease-in-out 0.6s infinite alternate; }

@keyframes floatDrift1 {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate(6px, -14px) rotate(8deg) scale(1.08); }
  100% { transform: translate(-8px, -24px) rotate(-6deg) scale(0.96); }
}

@keyframes floatDrift2 {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate(-10px, -18px) rotate(-10deg) scale(1.12); }
  100% { transform: translate(8px, -30px) rotate(8deg) scale(0.92); }
}

@keyframes floatDrift3 {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate(10px, -12px) rotate(12deg) scale(1.06); }
  100% { transform: translate(-6px, -26px) rotate(-8deg) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  .ownership-heart-emoji,
  .floating-heart {
    animation: none;
  }
}

/* Card 2: Frontmatter iPad Screenshot View */

.card-visual-frontmatter {
  width: 100%;
  max-width: 100%;
  margin-top: 10px;
  flex: 1;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  overflow: hidden;
  margin-bottom: 0;
}

.card-visual-frontmatter picture {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 0;
}

.card-img-frontmatter {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: cover;
  object-position: top left;
  display: block;
  margin-bottom: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* Custom UI Mockups for Carousel Cards */

.card-mockup {
  width: 100%;
  max-width: 820px;
  background: var(--color-bg-recessed);
  border: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
  box-shadow: none;
  text-align: left;
}

.mockup-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--color-bg-elevated);
}

.mockup-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-left: 8px;
}

.mockup-body {
  padding: var(--space-8);
  background: var(--color-bg-elevated);
}

.mockup-editor-content {
  font-size: 0.9375rem;
  line-height: 1.65;
}

.mockup-editor-content .md-h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.mockup-editor-content .md-meta {
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  margin-bottom: var(--space-4);
}

.mockup-editor-content .md-meta code {
  background: var(--color-bg-recessed);
  padding: 2px 6px;
  border-radius: 4px;
}

.mockup-editor-content .md-h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

.mockup-editor-content .md-list {
  padding-left: var(--space-4);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-4);
}

.mockup-editor-content .md-text {
  color: var(--color-text-secondary);
}

/* ==========================================================================
   Card 4: Siri & Shortcuts — Seamless Blurred 5-Color Ambient Mesh
   ========================================================================== */

#card-siri.gallery-card {
  background-color: #998ee0;
  border: none;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

#card-siri.gallery-card::before {
  content: "";
  position: absolute;
  inset: -120px;
  background: 
    radial-gradient(ellipse 75% 65% at 5% 5%, #8bdeda 0%, rgba(139, 222, 218, 0.95) 45%, transparent 85%),
    radial-gradient(ellipse 80% 75% at 15% 95%, #43add0 0%, rgba(67, 173, 208, 0.95) 45%, transparent 85%),
    radial-gradient(ellipse 80% 75% at 50% 50%, #998ee0 0%, rgba(153, 142, 224, 0.9) 50%, transparent 90%),
    radial-gradient(ellipse 80% 75% at 85% 95%, #e17dc2 0%, rgba(225, 125, 194, 0.95) 45%, transparent 85%),
    radial-gradient(ellipse 75% 65% at 95% 5%, #ef9393 0%, rgba(239, 147, 147, 0.95) 45%, transparent 85%),
    linear-gradient(135deg, #8bdeda 0%, #43add0 25%, #998ee0 50%, #e17dc2 75%, #ef9393 100%);
  filter: blur(54px);
  transform: scale(1.35);
  pointer-events: none;
  z-index: 0;
}

#card-siri .card-copy {
  position: absolute;
  top: clamp(1.75rem, 3.5vw, 2.5rem);
  left: clamp(1.75rem, 3.5vw, 2.5rem);
  right: clamp(1.75rem, 3.5vw, 2.5rem);
  margin: 0;
  max-width: 720px;
  z-index: 10;
  pointer-events: none;
}

#card-siri .card-copy h3 {
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

/* Soften glare in dark mode with deep velvety cosmic glow */
@media (prefers-color-scheme: dark) {
  #card-siri.gallery-card {
    background-color: #0e0c1a;
  }

  #card-siri.gallery-card::before {
    inset: -120px;
    background: 
      radial-gradient(ellipse 75% 65% at 5% 5%, rgba(139, 222, 218, 0.75) 0%, transparent 80%),
      radial-gradient(ellipse 80% 75% at 15% 95%, rgba(67, 173, 208, 0.8) 0%, transparent 80%),
      radial-gradient(ellipse 80% 75% at 50% 50%, rgba(153, 142, 224, 0.8) 0%, transparent 85%),
      radial-gradient(ellipse 80% 75% at 85% 95%, rgba(225, 125, 194, 0.8) 0%, transparent 80%),
      radial-gradient(ellipse 75% 65% at 95% 5%, rgba(239, 147, 147, 0.75) 0%, transparent 80%),
      linear-gradient(140deg, #181329 0%, #100d1c 50%, #090710 100%);
    filter: blur(58px);
    transform: scale(1.35);
    opacity: 0.94;
  }

  #card-siri .card-copy h3 {
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
  }
}

@media (max-width: 820px) {
  #card-siri .card-copy {
    top: clamp(1.35rem, 4.2vw, 1.875rem);
    left: clamp(1.35rem, 4.2vw, 1.875rem);
    right: clamp(1.35rem, 4.2vw, 1.875rem);
  }
}

@media (max-width: 480px) {
  #card-siri .card-copy {
    top: 22px;
    left: 20px;
    right: 20px;
  }
}

.card-visual-siri {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 0;
  margin: 0;
  overflow: visible;
  z-index: 2;
}

/* Siri Hero Live Dictation Pill (Front & Centre) */

.siri-hero-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: clamp(1rem, 2.5vw, 2rem);
  box-sizing: border-box;
}

.siri-hero-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2.6vw, 20px) clamp(24px, 3.8vw, 38px);
  border-radius: 9999px;
  background: #007aff;
  background-image: linear-gradient(145deg, #007aff 0%, #0062e3 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 12px 36px rgba(0, 122, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, filter 0.3s ease;
  user-select: none;
  cursor: default;
  max-width: 94%;
}

.siri-hero-pill:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 44px rgba(0, 122, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.siri-dictation-text {
  font-size: clamp(1.0625rem, 2.2vw, 1.5rem);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.015em;
  white-space: normal;
  text-align: center;
  min-height: 1.3em;
}

@media (max-width: 768px) {
  .siri-hero-pill {
    padding: 12px 20px;
    max-width: 96%;
  }

  .siri-dictation-text {
    font-size: clamp(0.9375rem, 3.8vw, 1.125rem);
  }
}

@media (max-width: 480px) {
  .siri-hero-pill {
    padding: 10px 16px;
  }

  .siri-dictation-text {
    font-size: 0.9375rem;
  }
}

/* ==========================================================================
   Card 1: Shortcuts — Simulated Screenshot to Markdown Recipe Conversion
   ========================================================================== */

#card-shortcuts.gallery-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: none;
  background: 
    radial-gradient(ellipse 70% 60% at 85% 18%, rgba(255, 45, 85, 0.16) 0%, transparent 65%),
    radial-gradient(ellipse 75% 65% at 12% 82%, rgba(88, 86, 214, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 88% 88%, rgba(0, 122, 255, 0.14) 0%, transparent 65%),
    linear-gradient(150deg, #ffffff 0%, #f7f6fc 45%, #fffbfd 100%);
}

@media (prefers-color-scheme: dark) {
  #card-shortcuts.gallery-card {
    border: none;
    background: 
      radial-gradient(ellipse 70% 60% at 85% 18%, rgba(255, 45, 85, 0.26) 0%, transparent 65%),
      radial-gradient(ellipse 75% 65% at 12% 82%, rgba(88, 86, 214, 0.30) 0%, transparent 65%),
      radial-gradient(ellipse 60% 50% at 88% 88%, rgba(0, 122, 255, 0.20) 0%, transparent 65%),
      linear-gradient(150deg, #0b0814 0%, #0e0a19 45%, #120916 100%);
  }
}

.card-visual-shortcuts {
  flex: 1;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  z-index: 5;
  box-sizing: border-box;
  overflow: hidden;
  padding: 0;
  margin-top: clamp(4px, 1.2vw, 12px);
}

.shortcuts-screen-stage {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
}

.imessage-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 8px;
  position: relative;
}

.imessage-timestamp {
  align-self: center;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--color-text-secondary);
  opacity: 0.75;
  margin-bottom: 2px;
  text-transform: none;
  letter-spacing: -0.01em;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", sans-serif;
}

.timestamp-day {
  font-weight: 600;
}

.imessage-bubble-row {
  display: flex;
  justify-content: center;
  width: 100%;
}

.imessage-bubble {
  position: relative;
  background: #007aff;
  background-image: linear-gradient(180deg, #0b84fe 0%, #007aff 100%);
  color: #ffffff;
  padding: clamp(14px, 2.2vw, 18px) clamp(16px, 2.6vw, 24px);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(0, 122, 255, 0.32), 0 2px 6px rgba(0, 122, 255, 0.18);
  border: none;
  text-align: left;
  word-break: break-word;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Helvetica Neue", sans-serif;
  font-size: clamp(0.875rem, 1.5vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.44;
  letter-spacing: -0.015em;
  max-width: 540px;
  transition: box-shadow 0.45s ease, transform 0.45s ease;
}

@media (prefers-color-scheme: dark) {
  .imessage-bubble {
    background: #0a84ff;
    background-image: linear-gradient(180deg, #0a84ff 0%, #0071e3 100%);
    box-shadow: 0 12px 32px rgba(0, 122, 255, 0.45);
    border: none;
  }
}

.imessage-text {
  margin: 0;
  color: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .imessage-text {
    color: #ffffff;
  }
}

/* iOS 18 Bloom & Ingredient Detection Text Effect - Rock-Solid Stationary */
.ai-word {
  display: inline;
  color: rgba(255, 255, 255, 0.95);
  padding: 1px 0;
  border-radius: 4px;
  transition: color 0.24s ease, 
              text-shadow 0.24s ease, 
              background-color 0.24s ease,
              box-shadow 0.24s ease;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

@media (prefers-color-scheme: dark) {
  .ai-word {
    color: rgba(255, 255, 255, 0.95);
  }
}

/* Regular word bloom - pure luminous text glow with zero movement */
.ai-word.is-blooming {
  color: #ffffff;
  text-shadow: 
    0 0 6px rgba(255, 255, 255, 1),
    0 0 14px rgba(255, 255, 255, 0.85),
    0 0 22px rgba(180, 225, 255, 0.7);
}

@media (prefers-color-scheme: dark) {
  .ai-word.is-blooming {
    color: #ffffff;
    text-shadow: 
      0 0 6px rgba(255, 255, 255, 1),
      0 0 14px rgba(255, 255, 255, 0.85),
      0 0 22px rgba(180, 225, 255, 0.7);
  }
}

.ai-word.has-bloomed {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: none;
}

@media (prefers-color-scheme: dark) {
  .ai-word.has-bloomed {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: none;
  }
}

/* Ingredient word bloom - pure iOS luminous wash with zero layout shift */
.ai-word.is-ingredient-blooming {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.35);
  box-shadow: 
    0 0 8px rgba(255, 255, 255, 0.9),
    0 0 16px rgba(210, 235, 255, 0.65);
  text-shadow: 0 0 8px rgba(255, 255, 255, 1);
}

@media (prefers-color-scheme: dark) {
  .ai-word.is-ingredient-blooming {
    background-color: rgba(255, 255, 255, 0.42);
    box-shadow: 
      0 0 10px rgba(255, 255, 255, 0.95),
      0 0 20px rgba(180, 220, 255, 0.7);
    text-shadow: 0 0 8px rgba(255, 255, 255, 1);
  }
}

/* Ingredient word detected - clean stationary translucent pill */
.ai-word.is-ingredient-detected {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.35);
  text-shadow: none;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  .ai-word.is-ingredient-detected {
    background-color: rgba(255, 255, 255, 0.26);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.45);
    text-shadow: none;
  }
}

/* Ingredient group container */
.ai-ing-group {
  display: inline;
}

/* Phase 1: Incoming iMessage Bubble View */
.shortcuts-imessage-view {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 1;
  visibility: visible;
  margin-top: clamp(34px, 4.8vw, 56px);
  margin-left: auto;
  margin-right: auto;
  transform: scale(1) translateY(0);
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.35s ease,
              visibility 0.35s ease;
  will-change: transform, opacity, filter;
}

.shortcuts-imessage-view.is-pop-in #imessage-bubble {
  animation: imessageBubbleSwipeIn 0.82s cubic-bezier(0.2, 0.9, 0.25, 1) forwards;
}

/* Intentional pop: text message visibly compresses down before dissolving */
.shortcuts-imessage-view.is-fade-out {
  animation: messageCompressAndDissolve 0.36s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  pointer-events: none;
}

@keyframes messageCompressAndDissolve {
  0% {
    transform: scale(1);
    opacity: 1;
    filter: blur(0px);
  }
  32% {
    /* Visible playful squeeze */
    transform: scale(0.92) translateY(-2px);
    opacity: 0.95;
    filter: blur(0px);
  }
  100% {
    /* Seamless dissolve as recipe expands outward */
    transform: scale(0.88) translateY(-6px);
    opacity: 0;
    filter: blur(4px);
    visibility: hidden;
  }
}

/* Phase 2: Formatted Markdown Recipe Card View - Intentional Apple Expand Pop */
.shortcuts-markdown-view {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  will-change: transform, opacity;
  z-index: 5;
}

.shortcuts-markdown-view.is-visible {
  visibility: visible;
  pointer-events: auto;
  animation: recipeExpandAndPop 0.58s cubic-bezier(0.34, 1.48, 0.64, 1) 0.06s forwards;
}

@keyframes recipeExpandAndPop {
  0% {
    transform: scale(0.91) translateY(8px);
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  65% {
    /* Subtle playful overshoot as recipe expands out */
    transform: scale(1.026) translateY(-2px);
  }
  85% {
    transform: scale(0.996) translateY(0);
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Floating Sparkles across Card Background (like the floating hearts on Card 6) */
.shortcuts-floating-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.65s ease;
}

#card-shortcuts.is-converted .shortcuts-floating-sparkles {
  opacity: 1;
  visibility: visible;
}

.floating-sparkle {
  position: absolute;
  display: inline-block;
  user-select: none;
  filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.35));
}

.fs-1  { top: 14%; left: 10%; font-size: clamp(18px, 2.8vw, 28px); opacity: 0.60; animation: floatDrift1 5.6s ease-in-out infinite alternate; }
.fs-2  { top: 74%; left: 12%; font-size: clamp(22px, 3.4vw, 34px); opacity: 0.68; animation: floatDrift2 6.8s ease-in-out 0.6s infinite alternate; }
.fs-3  { top: 18%; right: 12%; font-size: clamp(20px, 3vw, 30px); opacity: 0.58; animation: floatDrift3 6.2s ease-in-out 1.1s infinite alternate; }
.fs-4  { top: 78%; right: 14%; font-size: clamp(24px, 3.6vw, 36px); opacity: 0.72; animation: floatDrift1 6.0s ease-in-out 0.4s infinite alternate; }
.fs-5  { top: 44%; left: 5%; font-size: clamp(16px, 2.4vw, 22px); opacity: 0.45; animation: floatDrift2 7.4s ease-in-out 1.8s infinite alternate; }
.fs-6  { top: 48%; right: 6%; font-size: clamp(18px, 2.6vw, 26px); opacity: 0.50; animation: floatDrift3 6.6s ease-in-out 1.4s infinite alternate; }
.fs-7  { top: 88%; left: 44%; font-size: clamp(18px, 2.8vw, 28px); opacity: 0.58; animation: floatDrift1 7.0s ease-in-out 0.8s infinite alternate; }
.fs-8  { top: 10%; left: 48%; font-size: clamp(15px, 2.2vw, 20px); opacity: 0.42; animation: floatDrift2 6.2s ease-in-out 2.2s infinite alternate; }
.fs-9  { top: 30%; left: 22%; font-size: clamp(14px, 2vw, 18px); opacity: 0.48; animation: floatDrift3 5.9s ease-in-out 1.3s infinite alternate; }
.fs-10 { top: 62%; left: 28%; font-size: clamp(15px, 2.3vw, 22px); opacity: 0.52; animation: floatDrift1 6.5s ease-in-out 2.0s infinite alternate; }
.fs-11 { top: 32%; right: 24%; font-size: clamp(14px, 2.1vw, 20px); opacity: 0.46; animation: floatDrift2 7.1s ease-in-out 1.6s infinite alternate; }
.fs-12 { top: 66%; right: 28%; font-size: clamp(16px, 2.5vw, 24px); opacity: 0.55; animation: floatDrift3 6.1s ease-in-out 0.5s infinite alternate; }

.shortcuts-md-card {
  width: 100%;
  max-width: 760px;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.02);
  padding: clamp(14px, 2.2vw, 22px) clamp(16px, 2.6vw, 28px);
  text-align: left;
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: clamp(0.8125rem, 1.35vw, 0.9375rem);
  line-height: 1.4;
  color: var(--color-text);
  box-sizing: border-box;
  position: relative;
  z-index: 5;
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  .shortcuts-md-card {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  }
}

/* Silky, subtle cascade reveal of lines inside the formatted recipe */
.shortcuts-markdown-view .shortcuts-md-card .md-code-line {
  margin-bottom: 3.5px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.shortcuts-markdown-view.is-visible .shortcuts-md-card .md-code-line {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered cascade for ingredients reforming cleanly into the list */
.shortcuts-markdown-view.is-visible .shortcuts-md-card .md-line-h2 {
  transition-delay: 0.02s;
}

.shortcuts-markdown-view.is-visible .shortcuts-md-card .md-code-line[data-ing-target="ing-1"] { transition-delay: 0.05s; }
.shortcuts-markdown-view.is-visible .shortcuts-md-card .md-code-line[data-ing-target="ing-2"] { transition-delay: 0.08s; }
.shortcuts-markdown-view.is-visible .shortcuts-md-card .md-code-line[data-ing-target="ing-3"] { transition-delay: 0.11s; }
.shortcuts-markdown-view.is-visible .shortcuts-md-card .md-code-line[data-ing-target="ing-4"] { transition-delay: 0.14s; }
.shortcuts-markdown-view.is-visible .shortcuts-md-card .md-code-line[data-ing-target="ing-5"] { transition-delay: 0.17s; }
.shortcuts-markdown-view.is-visible .shortcuts-md-card .md-code-line[data-ing-target="ing-6"] { transition-delay: 0.20s; }

/* Instructions section slide & fade */
.shortcuts-md-card .md-instructions-section {
  margin-top: 0;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1) 0.24s, 
              transform 0.38s cubic-bezier(0.16, 1, 0.3, 1) 0.24s;
}

.shortcuts-markdown-view.is-visible .shortcuts-md-card .md-instructions-section {
  opacity: 1;
  transform: translateY(0);
}

.shortcuts-markdown-view.is-visible .shortcuts-md-card .md-instructions-section .md-code-line {
  opacity: 1;
  transform: translateY(0);
}

/* Delicate ambient light shimmer across card on materialize */
.shortcuts-markdown-view.is-visible .shortcuts-md-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 40%,
    rgba(160, 210, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.18) 60%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: mdCardSheen 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.08s forwards;
  pointer-events: none;
}

@keyframes mdCardSheen {
  0% {
    transform: translateX(-100%);
    opacity: 0.8;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

@media (prefers-color-scheme: dark) {
  .shortcuts-markdown-view.is-visible .shortcuts-md-card::after {
    background: linear-gradient(
      105deg,
      transparent 0%,
      rgba(255, 255, 255, 0.12) 35%,
      rgba(100, 180, 255, 0.28) 50%,
      rgba(255, 255, 255, 0.12) 65%,
      transparent 100%
    );
  }
}

/* Reduced space between H2s and the items immediately underneath */
.shortcuts-md-card .md-line-h2 {
  margin-bottom: 6px;
}

/* Increased space between the end of the ingredients list and the start of the instructions h2 */
.shortcuts-md-card .md-section-gap {
  margin-top: 22px;
}

.md-syntax-bullet {
  color: var(--color-text-secondary);
  opacity: 0.6;
  font-weight: 600;
  margin-right: 4px;
}

@keyframes imessageBubbleSwipeIn {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 820px) {
  .shortcuts-screen-stage {
    max-width: 600px;
  }
  .shortcuts-md-card {
    max-width: 600px;
    font-size: 0.875rem;
    line-height: 1.42;
    padding: 16px 20px;
  }
  .shortcuts-md-card .md-section-gap {
    margin-top: 18px;
  }
}

@media (max-width: 640px) {
  .shortcuts-screen-stage {
    max-width: 100%;
  }

  .imessage-container {
    max-width: 100%;
    gap: 6px;
  }

  .imessage-bubble {
    padding: 12px 15px;
    font-size: 0.8125rem;
    line-height: 1.4;
    border-radius: 18px;
  }

  .shortcuts-md-card {
    max-width: 100%;
    padding: 12px 14px;
    font-size: 0.75rem;
    line-height: 1.38;
    border-radius: 16px;
  }

  .shortcuts-md-card .md-code-line {
    margin-bottom: 3px;
  }

  .shortcuts-md-card .md-line-h2 {
    margin-bottom: 5px;
  }

  .shortcuts-md-card .md-section-gap {
    margin-top: 16px;
  }
}

/* Responsive adjustments for screens smaller than an iPhone Pro Max (<= 430px) */
@media (max-width: 430px) {
  #card-shortcuts.gallery-card {
    padding-top: 18px;
    padding-inline: 16px;
  }

  #card-shortcuts .card-copy {
    margin-bottom: 8px;
  }

  #card-shortcuts .card-copy h3 {
    font-size: clamp(0.9375rem, 4.2vw, 1.0625rem);
    line-height: 1.32;
  }

  #card-shortcuts .card-visual-shortcuts {
    margin-top: 0;
  }

  .imessage-bubble {
    padding: 10px 13px;
    font-size: 0.75rem;
    line-height: 1.38;
  }

  .shortcuts-md-card {
    padding: 10px 12px;
    font-size: 0.6875rem;
    line-height: 1.34;
    border-radius: 14px;
  }

  .shortcuts-md-card .md-code-line {
    margin-bottom: 2px;
  }

  .shortcuts-md-card .md-line-h2 {
    margin-bottom: 3px;
    font-size: 0.75rem;
  }

  .shortcuts-md-card .md-section-gap {
    margin-top: 10px;
  }
}

/* Compact devices (<= 375px, e.g. iPhone SE/mini) */
@media (max-width: 375px) {
  #card-shortcuts.gallery-card {
    padding-top: 15px;
    padding-inline: 12px;
  }

  #card-shortcuts .card-copy h3 {
    font-size: 0.875rem;
    line-height: 1.28;
  }

  .imessage-bubble {
    padding: 8px 11px;
    font-size: 0.6875rem;
    line-height: 1.34;
  }

  .shortcuts-md-card {
    padding: 8px 10px;
    font-size: 0.625rem;
    line-height: 1.3;
    border-radius: 12px;
  }

  .shortcuts-md-card .md-code-line {
    margin-bottom: 1.5px;
  }

  .shortcuts-md-card .md-section-gap {
    margin-top: 8px;
  }
}

/* ==========================================================================
   Card 2: Serving Scale (Falling Onions & Stepper Widget)
   ========================================================================== */

#card-scale.gallery-card {
  position: relative;
  overflow: hidden;
  border: none;
  background: 
    radial-gradient(ellipse 70% 60% at 85% 18%, rgba(255, 159, 10, 0.20) 0%, transparent 65%),
    radial-gradient(ellipse 75% 65% at 14% 82%, rgba(255, 69, 58, 0.16) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(255, 204, 0, 0.14) 0%, transparent 70%),
    radial-gradient(ellipse 55% 55% at 18% 22%, rgba(255, 149, 0, 0.15) 0%, transparent 65%),
    linear-gradient(150deg, #fffcf7 0%, #fbf4ea 45%, #fbf1e8 100%);
}

@media (prefers-color-scheme: dark) {
  #card-scale.gallery-card {
    border: none;
    background: 
      radial-gradient(ellipse 70% 60% at 85% 18%, rgba(255, 159, 10, 0.28) 0%, transparent 65%),
      radial-gradient(ellipse 75% 65% at 14% 82%, rgba(255, 69, 58, 0.22) 0%, transparent 65%),
      radial-gradient(ellipse 60% 50% at 88% 88%, rgba(255, 204, 0, 0.16) 0%, transparent 65%),
      radial-gradient(ellipse 55% 55% at 20% 20%, rgba(255, 149, 0, 0.20) 0%, transparent 65%),
      linear-gradient(150deg, #100b08 0%, #150e09 45%, #18100a 100%);
  }
}

/* Centered In-App Servings Modifier & Full-Width Falling Onions */

.card-visual-scale {
  position: relative;
  width: calc(100% + 2 * clamp(1.75rem, 3.5vw, 2.5rem));
  margin-inline: calc(-1 * clamp(1.75rem, 3.5vw, 2.5rem));
  max-width: none;
  flex: 1;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.onion-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.falling-onion {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-block;
  font-size: 110px;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.servings-modifier-widget {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  padding: 14px 24px;
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 25;
  user-select: none;
}

@media (prefers-color-scheme: dark) {
  .servings-modifier-widget {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  }
}

.servings-widget-icon {
  width: 24px;
  height: 24px;
  color: var(--color-text-secondary);
  opacity: 0.9;
  flex-shrink: 0;
}

.servings-widget-label {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  letter-spacing: -0.01em;
}

.servings-capsule-stepper {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.06);
  padding: 6px 14px;
  border-radius: 10px;
  transition: background var(--duration) var(--ease);
}

@media (prefers-color-scheme: dark) {
  .servings-capsule-stepper {
    background: rgba(255, 255, 255, 0.14);
  }
}

.stepper-action-btn {
  background: none;
  border: none;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
  line-height: 1;
  transition: transform 0.1s ease, opacity 0.1s ease, color 0.1s ease, background 0.1s ease;
}

.stepper-action-btn:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
  .stepper-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }
}

.stepper-action-btn.is-pressed,
.stepper-action-btn:active {
  transform: scale(0.8);
  opacity: 0.5;
}

.stepper-count-num {
  font-size: 1.25rem;
  font-weight: 600;
  min-width: 28px;
  text-align: center;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stepper-count-num.bump {
  transform: scale(1.3);
}

@media (max-width: 768px) {
  .falling-onion {
    font-size: 56px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.08));
  }
}

@media (max-width: 480px) {
  .falling-onion {
    font-size: 46px;
  }

  .servings-modifier-widget {
    padding: 10px 16px;
    gap: 10px;
    border-radius: 14px;
  }

  .servings-widget-icon {
    width: 20px;
    height: 20px;
  }

  .servings-widget-label {
    font-size: 1rem;
  }

  .servings-capsule-stepper {
    gap: 10px;
    padding: 4px 10px;
    border-radius: 8px;
  }

  .stepper-action-btn {
    font-size: 1.15rem;
    padding: 1px 6px;
  }

  .stepper-count-num {
    font-size: 1.1rem;
    min-width: 22px;
  }
}

/* ==========================================================================
   Card 4: Apple Intelligence (Placeholder Visual)
   ========================================================================== */

#card-ai.gallery-card {
  position: relative;
  background-color: var(--color-card-grey);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: clamp(1.75rem, 3.5vw, 2.5rem) clamp(1.75rem, 3.5vw, 2.5rem) clamp(1rem, 2vw, 1.5rem) clamp(1.75rem, 3.5vw, 2.5rem);
}

#card-ai.gallery-card::before {
  content: "";
  position: absolute;
  inset: -80px;
  background: 
    radial-gradient(ellipse 55% 45% at 85% 15%, rgba(225, 125, 194, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 15% 85%, rgba(67, 173, 208, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 45% 45% at 50% 50%, rgba(153, 142, 224, 0.12) 0%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

@media (prefers-color-scheme: dark) {
  #card-ai.gallery-card::before {
    background: 
      radial-gradient(ellipse 55% 45% at 85% 15%, rgba(225, 125, 194, 0.16) 0%, transparent 60%),
      radial-gradient(ellipse 50% 50% at 15% 85%, rgba(67, 173, 208, 0.16) 0%, transparent 60%),
      radial-gradient(ellipse 45% 45% at 50% 50%, rgba(153, 142, 224, 0.14) 0%, transparent 60%);
    filter: blur(45px);
  }
}

/* ==========================================================================
   Card 4: Apple Intelligence (Full-Bleed Aura & Natural Ingredient Physics)
   ========================================================================== */

#card-ai.gallery-card {
  position: relative;
  background-color: var(--color-card-grey);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: clamp(1.75rem, 3.5vw, 2.5rem) clamp(1.75rem, 3.5vw, 2.5rem) clamp(1rem, 2vw, 1.5rem) clamp(1.75rem, 3.5vw, 2.5rem);
}

/* Edge-to-edge full-card glow backdrop */
.ai-fullcard-glow {
  position: absolute;
  inset: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background: 
    radial-gradient(circle at 50% 55%, rgba(153, 142, 224, 0.5) 0%, rgba(225, 125, 194, 0.38) 32%, rgba(67, 173, 208, 0.28) 60%, transparent 80%),
    radial-gradient(ellipse 70% 60% at 88% 12%, rgba(225, 125, 194, 0.3) 0%, transparent 65%),
    radial-gradient(ellipse 65% 65% at 12% 88%, rgba(67, 173, 208, 0.3) 0%, transparent 65%);
  filter: blur(52px);
  animation: aiFullCardGlowPulse 8.5s ease-in-out infinite;
}

@media (prefers-color-scheme: dark) {
  .ai-fullcard-glow {
    background: 
      radial-gradient(circle at 50% 55%, rgba(153, 142, 224, 0.65) 0%, rgba(225, 125, 194, 0.48) 34%, rgba(67, 173, 208, 0.38) 62%, transparent 82%),
      radial-gradient(ellipse 75% 65% at 90% 10%, rgba(225, 125, 194, 0.38) 0%, transparent 70%),
      radial-gradient(ellipse 70% 70% at 10% 90%, rgba(67, 173, 208, 0.38) 0%, transparent 70%);
    filter: blur(56px);
  }
}

@keyframes aiFullCardGlowPulse {
  0%, 38% {
    opacity: 0.3;
    transform: scale(0.97);
  }
  48%, 74% {
    opacity: 1;
    transform: scale(1.05);
  }
  84%, 100% {
    opacity: 0.3;
    transform: scale(0.97);
  }
}

#card-ai {
  position: relative;
}

.card-visual-ai-choreography {
  flex: 1;
  width: 100%;
  max-width: none;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  user-select: none;
  overflow: visible;
  pointer-events: none;
}

.card-visual-ai-choreography .ai-center-button {
  pointer-events: auto;
}

.ai-stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.ai-center-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 76px;
  height: 76px;
  margin-top: -38px;
  margin-left: -38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.06);
  z-index: 20;
  cursor: pointer;
  border: none;
  outline: none;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease;
}

.ai-center-button.is-glowing {
  transform: scale(1.12);
  box-shadow: 0 0 50px rgba(225, 125, 194, 0.85), 0 0 85px rgba(67, 173, 208, 0.6), 0 8px 30px rgba(0, 0, 0, 0.15);
}

.ai-center-button:active {
  transform: scale(0.93);
}

@media (prefers-color-scheme: dark) {
  .ai-center-button {
    background: rgba(44, 44, 46, 0.9);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12);
  }
}

.ai-button-glow-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 125, 194, 0.8) 0%, rgba(67, 173, 208, 0.5) 60%, transparent 80%);
  filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: scale(0.85);
}

.ai-center-button.is-glowing .ai-button-glow-ring {
  opacity: 1;
  transform: scale(1.3);
}

.ai-button-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

@media (prefers-color-scheme: dark) {
  .ai-button-icon {
    filter: invert(1) brightness(1.8);
  }
}

/* Edge-to-edge full-card glow backdrop */
.ai-fullcard-glow {
  position: absolute;
  inset: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background: 
    radial-gradient(circle at 50% 55%, rgba(153, 142, 224, 0.5) 0%, rgba(225, 125, 194, 0.38) 32%, rgba(67, 173, 208, 0.28) 60%, transparent 80%),
    radial-gradient(ellipse 70% 60% at 88% 12%, rgba(225, 125, 194, 0.3) 0%, transparent 65%),
    radial-gradient(ellipse 65% 65% at 12% 88%, rgba(67, 173, 208, 0.3) 0%, transparent 65%);
  filter: blur(52px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: scale(0.97);
}

.ai-fullcard-glow.is-glowing {
  opacity: 1;
  transform: scale(1.05);
}

@media (prefers-color-scheme: dark) {
  .ai-fullcard-glow {
    background: 
      radial-gradient(circle at 50% 55%, rgba(153, 142, 224, 0.65) 0%, rgba(225, 125, 194, 0.48) 34%, rgba(67, 173, 208, 0.38) 62%, transparent 82%),
      radial-gradient(ellipse 75% 65% at 90% 10%, rgba(225, 125, 194, 0.38) 0%, transparent 70%),
      radial-gradient(ellipse 70% 70% at 10% 90%, rgba(67, 173, 208, 0.38) 0%, transparent 70%);
    filter: blur(56px);
  }
}

/* -------------------------------------------------------------
   10 Fruit & Vegetable Ingredients: Physics Driven Elements
   ------------------------------------------------------------- */
.ai-ingredient {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  will-change: transform;
}

.ing-emoji {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-top: -29px;
  margin-left: -29px;
  font-size: clamp(2.3rem, 4.6vw, 3rem);
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.12));
  will-change: transform;
}

@media (prefers-color-scheme: dark) {
  .ing-emoji {
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.65));
  }
}

/* Mobile & Tablet Adjustments */
@media (max-width: 768px) {
  .ai-stage {
    width: 100%;
    height: 270px;
  }

  .ai-center-button {
    width: 66px;
    height: 66px;
    margin-top: -33px;
    margin-left: -33px;
  }

  .ai-button-icon {
    width: 40px;
    height: 40px;
  }

  .ing-emoji {
    font-size: clamp(1.85rem, 5.8vw, 2.35rem);
    width: 46px;
    height: 46px;
    margin-top: -23px;
    margin-left: -23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-ingredient {
    transition: none !important;
  }
}

/* Shared Device Disclaimer */
.ai-card-footnote {
  width: 100%;
  max-width: 100%;
  margin: 0;
  text-align: left;
  z-index: 5;
}

.ai-disclaimer {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-text-secondary);
  opacity: 0.9;
  letter-spacing: -0.01em;
  text-align: left;
}

/* Apple Floating Sticky Controller Dock */

.gallery-dock {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(24px);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-dock.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dock-btn.playpause-btn,
.dock-btn.replay-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 240, 245, 0.52);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: none;
  box-shadow: none;
  color: var(--color-text);
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease);
}

.dock-btn.playpause-btn:hover,
.dock-btn.replay-btn:hover {
  background: rgba(230, 230, 235, 0.75);
}

.dock-btn.playpause-btn:active,
.dock-btn.replay-btn:active {
  transform: scale(0.92);
}

.dock-capsule {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 24px;
  background: rgba(240, 240, 245, 0.52);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: none;
  border-radius: 9999px;
  box-shadow: none;
}

@media (prefers-color-scheme: dark) {
  .dock-btn.playpause-btn,
  .dock-btn.replay-btn,
  .dock-capsule {
    background: rgba(35, 35, 38, 0.52);
  }
  .dock-btn.playpause-btn:hover,
  .dock-btn.replay-btn:hover {
    background: rgba(50, 50, 55, 0.75);
  }
}

@keyframes fillProgress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

.dock-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #8e8e93;
  border: none;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s var(--ease);
}

.dock-dot .dot-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--color-text);
  border-radius: 9999px;
  display: block;
}

.dock-dot:hover {
  background: #636366;
}

.dock-dot.is-active {
  width: 44px;
  background: rgba(142, 142, 147, 0.35);
}

.dock-dot.is-active.is-animating .dot-progress {
  animation: fillProgress 8s linear forwards;
}

.dock-dot.is-active.is-paused .dot-progress {
  animation-play-state: paused;
}

@media (prefers-color-scheme: dark) {
  .dock-dot.is-active {
    background: rgba(255, 255, 255, 0.25);
  }
  .dock-dot .dot-progress {
    background: #ffffff;
  }
}

@media (max-width: 900px) {
  .gallery-card {
    height: 460px;
    padding: var(--space-6) var(--space-6) 0 var(--space-6);
  }
}

@media (max-width: 640px) {
  .hide-mobile {
    display: none;
  }
  .gallery-card {
    height: 420px;
    padding: var(--space-5, 20px) var(--space-5, 20px) 0 var(--space-5, 20px);
  }
  .frontmatter-grid {
    grid-template-columns: 1fr;
  }
  .fm-card.wide {
    grid-column: span 1;
  }
  .gallery-dock {
    bottom: 20px;
  }
}

@media (max-width: 480px) {
  .gallery-card {
    height: 390px;
    padding: var(--space-4) var(--space-4) 0 var(--space-4);
  }
}

/* ==========================================================================
   Platform Features Mini Bento Grid (Inside Features Section)
   ========================================================================== */

.bento-container {
  margin-top: clamp(2rem, 4vw, 3rem);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  max-width: 920px;
  margin-inline: auto;
}

.bento-card {
  background: var(--color-card-grey);
  border-radius: 16px;
  padding: 16px 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 94px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform var(--duration) var(--ease), background var(--duration) var(--ease);
}

.bento-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 30px;
}

.bento-icon {
  width: 30px;
  height: 30px;
  color: var(--color-text);
  display: block;
  transition: transform var(--duration) var(--ease);
}

.bento-card:hover .bento-icon {
  transform: scale(1.08);
}

.bento-title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--color-text);
  margin: 0;
  text-align: center;
  width: 100%;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 540px;
  }
  .bento-card {
    min-height: 90px;
    padding: 14px 8px 12px;
  }
}

@media (max-width: 480px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    max-width: 100%;
  }
  .bento-card {
    padding: 12px 4px 10px;
    min-height: 82px;
    border-radius: 12px;
    gap: 6px;
  }
  .bento-visual {
    height: 24px;
  }
  .bento-icon {
    width: 24px;
    height: 24px;
  }
  .bento-title {
    font-size: 0.6875rem;
  }
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq {
  background-color: var(--color-bg);
  padding-top: clamp(4.5rem, 9vw, 7.5rem);
  padding-bottom: clamp(6rem, 12vw, 9.5rem);
  text-align: left;
}

.faq-heading {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--color-text);
  margin: 0 0 var(--space-3) 0;
}

.faq-subhead {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 400;
  font-style: normal;
  color: var(--color-text-secondary);
  line-height: 1.45;
  max-width: 820px;
  text-wrap: pretty;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.accordion {
  text-align: left;
  background: var(--color-bg-elevated);
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-8);
  box-shadow: none;
}

.accordion-item {
  border-bottom: 1px solid var(--color-bg-recessed);
}

.accordion-item:last-child {
  border-bottom: none;
}

@media (max-width: 640px) {
  .accordion {
    padding-inline: var(--space-4);
  }
}

.accordion-item h3 { margin: 0; }

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
}

.accordion-trigger::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-text-secondary);
  border-bottom: 2px solid var(--color-text-secondary);
  transform: rotate(45deg);
  transition: transform var(--duration) var(--ease);
}

.accordion-trigger[aria-expanded="true"]::after {
  transform: rotate(-135deg);
}

.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--color-text-secondary);
}

.accordion-panel.is-open {
  grid-template-rows: 1fr;
}

.accordion-panel-inner {
  overflow: hidden;
  min-height: 0;
  padding-bottom: 0;
  opacity: 0;
  transition: opacity 0.2s var(--ease), padding-bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-panel.is-open .accordion-panel-inner {
  padding-bottom: var(--space-4);
  opacity: 1;
  transition: opacity 0.35s var(--ease) 0.05s, padding-bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-panel-inner p {
  margin-bottom: var(--space-3);
}

.accordion-panel-inner p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background-color: var(--color-bg);
  text-align: center;
  padding-block: var(--space-16) var(--space-24);
  border-top: 1px solid var(--color-border);
}

.site-footer h2 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}

.footer-links-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: var(--space-6);
}

.footer-link-divider {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  opacity: 0.5;
  user-select: none;
}

a.email-link,
.accordion-panel-inner a,
.docs-content p a,
.docs-content li a {
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
  transition: opacity var(--duration) var(--ease), color var(--duration) var(--ease);
}

a.email-link:hover,
.accordion-panel-inner a:hover,
.docs-content p a:hover,
.docs-content li a:hover {
  opacity: 0.82;
  text-decoration-thickness: 2px;
}

.site-footer a.email-link,
a.footer-contact-link {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: opacity var(--duration) var(--ease), color var(--duration) var(--ease);
}

a.footer-contact-link:hover {
  opacity: 0.82;
  text-decoration-thickness: 2px;
}

.footer-socials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: var(--space-4);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-card-grey);
  color: var(--color-text) !important;
  text-decoration: none !important;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.social-link:hover {
  background: var(--color-bg-recessed);
  color: var(--color-accent) !important;
  transform: translateY(-2px);
}

.social-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}



.fin {
  font-style: italic;
  color: var(--color-text-secondary);
  margin-top: var(--space-6);
}

/* ==========================================================================
   Documentation Page (docs.html)
   ========================================================================== */

.docs-header-section {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.docs-header-section .eyebrow {
  margin-bottom: var(--space-2);
}

.docs-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-3);
}

.docs-subhead {
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  color: var(--color-text-secondary);
  max-width: 680px;
  line-height: 1.5;
}

.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(36px, 6vw, 72px);
  padding-bottom: var(--space-24);
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--header-height, 52px) + var(--space-8));
  background: transparent;
  padding: 0;
}

.docs-sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  padding-left: var(--space-2);
}

.docs-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-nav-list a {
  display: block;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
}

.docs-nav-list a:hover {
  color: var(--color-text);
  background: var(--color-bg-elevated);
}

.docs-nav-list a.is-active {
  color: var(--color-text);
  font-weight: 600;
  background: var(--color-bg-elevated);
}

/* Documentation Content Body */

.docs-content {
  min-width: 0;
  line-height: 1.65;
}

.docs-section {
  margin-bottom: var(--space-16);
  scroll-margin-top: calc(var(--header-height, 52px) + var(--space-8));
}

.docs-section h2 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.docs-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.docs-section p {
  color: var(--color-text);
  font-size: 1rem;
  margin-bottom: var(--space-4);
}

.docs-section p code,
.docs-section li code {
  background: var(--color-bg-elevated);
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 0.875em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  border: 1px solid var(--color-border);
}

.docs-section ul,
.docs-section ol {
  margin-left: var(--space-6);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.docs-section li {
  margin-bottom: var(--space-2);
}

/* Code Snippets */

.docs-code-block {
  background: var(--color-bg-elevated);
  border-radius: var(--radius-md);
  margin-block: var(--space-6);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.docs-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--color-bg-recessed);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.docs-code-copy-btn {
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease);
  cursor: pointer;
}

.docs-code-copy-btn:hover {
  background: var(--color-bg-elevated);
  color: var(--color-text);
}

.docs-code-copy-btn.is-copied {
  color: #30d158;
  border-color: rgba(48, 209, 88, 0.4);
  background: rgba(48, 209, 88, 0.08);
}

.docs-code-block pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text);
}

/* Reference Table */

.docs-table-wrapper {
  overflow-x: auto;
  margin-block: var(--space-6);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.docs-table th,
.docs-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
}

.docs-table tr:last-child td {
  border-bottom: none;
}

.docs-table th {
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-bg-recessed);
}

.docs-table td code {
  background: var(--color-bg-recessed);
  padding: 3px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Callout Box */

.docs-callout {
  background: var(--color-bg-elevated);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin-block: var(--space-6);
}

.docs-callout strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.docs-callout p {
  color: var(--color-text-secondary);
  margin-bottom: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
}

@media (max-width: 860px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    position: static;
    margin-bottom: var(--space-8);
  }
}

/* ==========================================================================
   Newsletter & "Notify Me" Modal Dialog
   ========================================================================== */

dialog.newsletter-modal {
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  background: transparent;
  max-width: min(480px, calc(100vw - 32px));
  width: 100%;
  margin: auto;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.28), 0 0 0 1px var(--color-border);
  overflow: visible;
  color: var(--color-text);
  outline: none;
}

dialog.newsletter-modal::backdrop {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

dialog.newsletter-modal[open]::backdrop {
  opacity: 1;
}

dialog.newsletter-modal[open] {
  animation: modal-pop-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

dialog.newsletter-modal.is-closing {
  animation: modal-pop-out 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
}

dialog.newsletter-modal.is-closing::backdrop {
  opacity: 0;
}

@keyframes modal-pop-in {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modal-pop-out {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
}

.newsletter-modal-card {
  position: relative;
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 36px 28px 28px;
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

@media (prefers-color-scheme: dark) {
  .newsletter-modal-card {
    background-color: rgba(34, 34, 37, 0.94);
    border-color: rgba(255, 255, 255, 0.14);
  }
}

.newsletter-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}

.newsletter-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--color-text);
}

.newsletter-modal-close:active {
  transform: scale(0.92);
}

@media (prefers-color-scheme: dark) {
  .newsletter-modal-close {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-secondary);
  }
  .newsletter-modal-close:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--color-text);
  }
}

.newsletter-modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: 6px;
  color: var(--color-text);
}

.newsletter-modal-title .accent-text {
  color: var(--color-accent);
}

.newsletter-modal-subtitle {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.45;
  margin-bottom: 24px;
}

.newsletter-form-body {
  display: flex;
  gap: 10px;
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .newsletter-form-body {
    flex-direction: column;
    gap: 12px;
  }
}

.newsletter-input-wrap {
  flex: 1;
}

/* Apple-style input field */
.newsletter-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-size: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--font-sans);
  color: #1d1d1f;
  background-color: #ffffff;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) inset;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.15s var(--ease);
}

.newsletter-input::placeholder {
  color: #86868b;
  opacity: 1;
}

.newsletter-input:hover {
  border-color: #86868b;
}

.newsletter-input:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.2);
}

@media (prefers-color-scheme: dark) {
  .newsletter-input {
    background-color: #161618;
    border-color: rgba(255, 255, 255, 0.18);
    color: #f5f5f7;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) inset;
  }

  .newsletter-input::placeholder {
    color: #a1a1a6;
  }

  .newsletter-input:hover {
    border-color: rgba(255, 255, 255, 0.32);
  }

  .newsletter-input:focus {
    border-color: #2997ff;
    box-shadow: 0 0 0 4px rgba(41, 151, 255, 0.28);
  }
}

/* Apple-style primary action button */
.newsletter-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 22px;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--font-sans);
  letter-spacing: -0.01em;
  color: #ffffff;
  background-color: #0071e3;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s var(--ease), opacity 0.15s var(--ease), transform 0.15s var(--ease);
}

.newsletter-submit-btn:hover {
  background-color: #0077ed;
}

.newsletter-submit-btn:active {
  background-color: #0062c4;
  transform: scale(0.98);
}

@media (prefers-color-scheme: dark) {
  .newsletter-submit-btn {
    background-color: #0071e3;
  }
  .newsletter-submit-btn:hover {
    background-color: #0077ed;
  }
  .newsletter-submit-btn:active {
    background-color: #0062c4;
  }
}

.newsletter-submit-btn.is-loading {
  opacity: 0.75;
  cursor: wait;
}

.newsletter-submit-btn .btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: modal-spin 0.6s linear infinite;
  margin-left: 8px;
}

.newsletter-submit-btn.is-loading .btn-spinner {
  display: inline-block;
}

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

.newsletter-feedback {
  margin-top: var(--space-4);
  font-size: 0.875rem;
  line-height: 1.4;
  border-radius: 10px;
  padding: 0;
  transition: all 0.2s var(--ease);
}

.newsletter-feedback.is-success {
  padding: var(--space-3) var(--space-4);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #059669;
}

@media (prefers-color-scheme: dark) {
  .newsletter-feedback.is-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
  }
}

.newsletter-feedback.is-error {
  padding: var(--space-3) var(--space-4);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #dc2626;
}

@media (prefers-color-scheme: dark) {
  .newsletter-feedback.is-error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog.newsletter-modal[open],
  dialog.newsletter-modal.is-closing {
    animation: none !important;
  }
}

/* ==========================================================================
   Fact Sheet & Press Kit Page (press-kit.html)
   ========================================================================== */

.doc-factsheet-container {
  max-width: 740px;
}

.doc-factsheet-header {
  border-bottom: none !important;
  padding-top: clamp(2.5rem, 5vw, 4rem) !important;
  padding-bottom: 0 !important;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem) !important;
}

.doc-factsheet-content .docs-section {
  margin-top: clamp(2.25rem, 4.5vw, 3.5rem);
  margin-bottom: 0;
}

.doc-factsheet-content .docs-section:first-child {
  margin-top: 0;
}

.doc-factsheet-content .docs-section h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: var(--space-4);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.doc-factsheet-content ul {
  padding-left: 1.15rem;
  margin-left: 0;
  margin-bottom: 0;
}

.doc-factsheet-content ul li {
  margin-bottom: 5px;
  line-height: 1.5;
}

.doc-factsheet-content ul li:last-child {
  margin-bottom: 0;
}

.doc-factsheet-bottom {
  padding-top: var(--space-2);
}

.header-cta-btn-secondary {
  background: #ffffff !important;
  color: #0062c4 !important;
  border: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.header-cta-btn-secondary:hover {
  background: #f0f7ff !important;
  color: #0056b3 !important;
  opacity: 1;
}

.header-cta-btn-secondary:active {
  background: #e1efff !important;
  transform: scale(0.97);
}

@media (prefers-color-scheme: dark) {
  .header-cta-btn-secondary {
    background: #222225 !important;
    color: #47a8ff !important;
    border: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }

  .header-cta-btn-secondary:hover {
    background: #2c2c30 !important;
    color: #64b5f6 !important;
  }

  .header-cta-btn-secondary:active {
    background: #36363b !important;
  }
}

/* ==========================================================================
   Newsletter Page (newsletter.html)
   ========================================================================== */

body.newsletter-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.newsletter-page main {
  flex: 1;
}

.newsletter-simple-wrap {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.newsletter-simple-wrap .docs-title {
  margin-bottom: var(--space-3);
}

.newsletter-text {
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  color: var(--color-text-secondary);
  line-height: 1.5;
  max-width: 600px;
}

.newsletter-feedback:empty {
  display: none;
  margin: 0;
  padding: 0;
}

.newsletter-page .newsletter-form-container {
  max-width: 480px;
  margin-top: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-4);
}

.newsletter-social-text {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
  max-width: 600px;
}

.newsletter-social-text a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
  transition: opacity var(--duration) var(--ease);
}

.newsletter-social-text a:hover {
  opacity: 0.82;
}


/* WebP <picture> wrappers: keep feature icons as direct flex items */
.feature-card-visual picture {
  display: contents;
}
