:root {
  --p-white: oklch(1 0 0);
  --p-ink: oklch(0.245 0.005 260);
  --p-muted: oklch(0.49 0.008 260);
  --p-blue: oklch(0.61 0.19 255);
  --surface: var(--p-white);
  --text: var(--p-ink);
  --text-secondary: var(--p-muted);
  --button-bg: var(--p-ink);
  --button-text: var(--p-white);
  --card-bg: oklch(0.972 0.002 260);
  --focus: var(--p-blue);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--surface);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 17px;
}
.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 5px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -1.25px;
  line-height: 1;
}
.apple-logo { width: 19px; height: 25px; fill: currentColor; }
.menu-wrap { position: relative; }
.menu-button {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: background-color 160ms ease-out, transform 160ms ease-out;
}
.menu-button:hover { background: oklch(0.96 0.003 260); }
.menu-button:active { transform: scale(0.94); }
.menu-button span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.site-menu {
  position: absolute;
  top: 48px;
  right: 0;
  width: 220px;
  padding: 8px;
  border: 1px solid oklch(0.9 0.004 260);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 12px 35px oklch(0.2 0.01 260 / 0.12);
}
.site-menu a {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  transition: background-color 160ms ease-out;
}
.site-menu a:hover { background: var(--card-bg); }

.hero {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 50px 20px 0;
  text-align: center;
}
.hero-art {
  --hero-rotate-x: 0deg;
  --hero-rotate-y: 0deg;
  position: relative;
  display: block;
  width: min(405px, 82vw);
  aspect-ratio: 9 / 8;
  user-select: none;
  -webkit-user-drag: none;
  transform: perspective(1000px) rotateX(var(--hero-rotate-x)) rotateY(var(--hero-rotate-y));
  transform-style: preserve-3d;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-video,
.hero-still {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface);
  pointer-events: none;
  -webkit-user-drag: none;
}
.hero-still { display: none; }

h1 {
  margin-top: 5px;
  font-size: clamp(72px, 8.33vw, 140px);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 1;
}
.signin-button {
  display: inline-flex;
  min-width: 174px;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin-top: 48px;
  padding: 11px 25px;
  border-radius: 999px;
  color: var(--button-text);
  background: var(--button-bg);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  transition: transform 160ms ease-out, background-color 160ms ease-out;
}
.signin-button:hover { background: oklch(0.34 0.006 260); transform: scale(1.025); }
.signin-button:active { transform: scale(0.98); }
.hero-tagline {
  margin-top: 38px;
  font-size: clamp(28px, 2.38vw, 40px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.2;
  text-wrap: balance;
}

.features {
  display: grid;
  max-width: 1016px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 88px auto 0;
  padding: 0 20px;
  scroll-margin-top: 24px;
}
.feature-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 28px;
  background: var(--card-bg);
}
.apps-card, .cloud-card { min-height: 530px; }
.app-icon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 52px 18px 20px;
}
.app-icon-row svg {
  width: clamp(48px, 4.3vw, 68px);
  height: clamp(48px, 4.3vw, 68px);
  flex-shrink: 0;
  filter: drop-shadow(0 8px 9px oklch(0.3 0.02 260 / 0.1));
}
.cloud-visual {
  position: relative;
  display: flex;
  height: 140px;
  align-items: center;
  justify-content: center;
  padding-top: 37px;
}
.cloud-visual svg { width: 155px; height: 106px; filter: drop-shadow(0 12px 15px oklch(0.5 0.15 255 / 0.16)); }
.cloud-visual span {
  position: absolute;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--button-text);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.06em;
}
.feature-copy { padding: 32px 38px 42px; text-align: center; }
.feature-copy h2 { font-size: 31px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.12; }
.feature-copy p { max-width: 37ch; margin: 17px auto 0; color: var(--text-secondary); font-size: 17px; line-height: 1.5; }
.site-footer {
  display: flex;
  max-width: 1016px;
  align-items: center;
  gap: 20px;
  margin: 0 auto;
  padding: 35px 24px 40px;
  color: var(--text-secondary);
  font-size: 12px;
}
.site-footer span { margin-right: auto; }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 760px) {
  .site-header { padding: 8px 12px; }
  .brand { font-size: 25px; }
  .apple-logo { width: 17px; height: 23px; }
  .hero { padding: 68px 18px 0; }
  .hero-art { width: min(340px, 92vw); }
  h1 { margin-top: 10px; font-size: clamp(64px, 19vw, 84px); }
  .signin-button { margin-top: 34px; }
  .hero-tagline { max-width: 350px; margin-top: 34px; font-size: 30px; line-height: 1.18; }
  .desktop-break { display: none; }
  .features { grid-template-columns: 1fr; margin-top: 64px; padding: 0 16px; }
  .apps-card, .cloud-card { min-height: 490px; }
  .feature-copy { padding: 28px 25px 36px; }
  .feature-copy h2 { font-size: 29px; }
  .app-icon-row { gap: 5px; padding-inline: 10px; }
  .app-icon-row svg { width: 54px; height: 54px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 0; padding: 28px 24px; }
  .site-footer span { margin: 0 0 8px; }
}

@media (max-width: 374px) {
  .app-icon-row svg { width: 48px; height: 48px; }
  .hero-tagline { font-size: 27px; }
}

.hero,
.features,
.site-footer {
  width: 100%;
}

.site-menu {
  max-width: calc(100vw - 24px);
}

.feature-copy p {
  text-wrap: pretty;
}

@media (min-width: 761px) and (max-width: 900px) {
  .features { gap: 16px; }
  .apps-card, .cloud-card { min-height: 500px; }
  .feature-copy { padding-inline: 24px; }
  .feature-copy h2 { font-size: 27px; }
  .app-icon-row { gap: 6px; padding-inline: 12px; }
  .app-icon-row svg { width: 52px; height: 52px; }
  .site-footer { flex-wrap: wrap; }
}

@media (max-width: 760px) {
  .site-header {
    padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  }
  .hero {
    padding-right: max(18px, env(safe-area-inset-right));
    padding-left: max(18px, env(safe-area-inset-left));
  }
  .signin-button { min-height: 48px; }
  .site-menu a { min-height: 48px; }
  .features { gap: 16px; }
  .feature-card { border-radius: 24px; }
  .apps-card, .cloud-card { min-height: 0; }
  .feature-copy { padding-bottom: 42px; }
  .site-footer {
    padding-right: max(24px, env(safe-area-inset-right));
    padding-bottom: max(28px, env(safe-area-inset-bottom));
    padding-left: max(24px, env(safe-area-inset-left));
  }
  .site-footer a { min-height: 40px; }
}

@media (max-width: 390px) {
  .hero-art { width: min(310px, 90vw); }
  h1 { font-size: clamp(58px, 18vw, 72px); }
  .hero-tagline { font-size: clamp(25px, 7.4vw, 29px); }
  .feature-copy h2 { font-size: 26px; }
  .feature-copy p { font-size: 16px; }
  .app-icon-row svg { width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .hero-video { display: none; }
  .hero-still { display: block; }
}
