:root {
  color-scheme: light;
  font-family: "Avenir-Book", "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
  background: #F8F1E5;
  color: #333030;
  font-synthesis: none;
  --background: #F8F1E5;
  --surface: #FFFFFF;
  --story-background: #E7D3AB;
  --text-primary: #333030;
  --text-secondary: #5F5959;
  --text-tertiary: #9C9696;
  --border: #CECACA;
  --accent: #CC444B;
  --accent-hover: #C67876;
  --on-accent: #FFFFFF;
  --focus-ring: rgba(204, 68, 75, 0.35);
  --screenshot-shadow: rgba(71, 48, 24, 0.14);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  background: #191715;
  color: #F5EEE6;
  --background: #191715;
  --surface: #24211E;
  --story-background: #2C251C;
  --text-primary: #F5EEE6;
  --text-secondary: #CEC4BA;
  --text-tertiary: #9F968E;
  --border: #665F59;
  --accent: #E05A62;
  --accent-hover: #D87B80;
  --on-accent: #FFFFFF;
  --focus-ring: rgba(224, 90, 98, 0.4);
  --screenshot-shadow: rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--text-primary);
  overflow-x: hidden;
}

.auth-page {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 34px;
}

.auth-content {
  width: min(100%, 600px);
  margin-inline: auto;
  text-align: center;
}

.app-icon {
  display: block;
  width: 104px;
  height: 104px;
  margin: 0 auto 20px;
  object-fit: contain;
}

.brand-name {
  margin: 0 0 18px;
  color: var(--accent);
  font-family: "Avenir-Heavy", "Avenir Next", Avenir, sans-serif;
  font-size: 22px;
  font-weight: 800;
}

h1 {
  margin: 0;
  color: var(--text-primary);
  font-family: "Avenir-Medium", "Avenir Next", Avenir, sans-serif;
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.intro {
  max-width: 520px;
  margin: 24px auto 34px;
  color: var(--text-secondary);
  font-family: "AppleSDGothicNeo-Regular", "Apple SD Gothic Neo", sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

.button-group {
  display: grid;
  gap: 12px;
  max-width: 340px;
  margin: 0 auto;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-family: "Avenir-Medium", "Avenir Next", Avenir, sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.primary-button {
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
}

.secondary-button:hover:not(:disabled) {
  border-color: var(--accent-hover);
  color: var(--accent);
  transform: translateY(-1px);
}

.primary-button:focus-visible,
.secondary-button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.privacy-note {
  max-width: 350px;
  margin: 20px auto 0;
  color: var(--text-tertiary);
  font-family: "AppleSDGothicNeo-Light", "Apple SD Gothic Neo", sans-serif;
  font-size: 12px;
  line-height: 1.5;
}

.status-message {
  max-width: 420px;
  margin: 20px auto 0;
  color: var(--text-secondary);
  font-family: "AppleSDGothicNeo-Regular", "Apple SD Gothic Neo", sans-serif;
  font-size: 14px;
  text-align: center;
  line-height: 1.5;
}

.scroll-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 38px;
  color: var(--text-secondary);
  font-family: "Avenir-Medium", "Avenir Next", Avenir, sans-serif;
  font-size: 13px;
  text-decoration: none;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.scroll-link span {
  color: var(--accent);
  font-size: 16px;
}

.scroll-link:hover {
  color: var(--accent);
  transform: translateY(2px);
}

.product-story {
  padding: 104px 24px 112px;
  background: var(--story-background);
}

.product-intro {
  width: min(100%, 720px);
  margin: 0 auto 78px;
  text-align: center;
}

.product-intro h2,
.product-closing h2 {
  margin: 0;
  color: var(--text-primary);
  font-family: "Avenir-Medium", "Avenir Next", Avenir, sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.product-intro p {
  margin: 20px auto 0;
  color: var(--text-secondary);
  font-family: "AppleSDGothicNeo-Regular", "Apple SD Gothic Neo", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

.product-features {
  display: grid;
  gap: 104px;
  width: min(100%, 1180px);
  margin: 0 auto;
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(250px, 0.65fr);
  align-items: center;
  gap: clamp(44px, 7vw, 90px);
}

.feature-row-reversed {
  grid-template-columns: minmax(250px, 0.65fr) minmax(0, 1.6fr);
}

.feature-row-reversed .product-screenshot {
  order: 2;
}

.feature-row-reversed .feature-copy {
  order: 1;
}

.product-screenshot {
  aspect-ratio: 3840 / 2264;
  overflow: hidden;
  margin: 0;
  border-radius: 14px;
  background: var(--background);
  box-shadow: 0 18px 42px var(--screenshot-shadow);
}

.product-screenshot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature-copy h3 {
  margin: 0;
  color: var(--text-primary);
  font-family: "Avenir-Medium", "Avenir Next", Avenir, sans-serif;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.feature-copy p {
  margin: 18px 0 0;
  color: var(--text-secondary);
  font-family: "AppleSDGothicNeo-Regular", "Apple SD Gothic Neo", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

.feature-summary {
  width: min(100%, 760px);
  margin: 102px auto 0;
  color: var(--text-secondary);
  font-family: "AppleSDGothicNeo-Regular", "Apple SD Gothic Neo", sans-serif;
  font-size: 18px;
  line-height: 1.7;
  text-align: center;
}

.product-closing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  width: min(100%, 940px);
  margin: 96px auto 0;
  padding: 38px 42px;
  border-radius: 18px;
  background: var(--surface);
}

.product-closing h2 {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
}

.product-closing p {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-family: "AppleSDGothicNeo-Regular", "Apple SD Gothic Neo", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.product-closing a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: "Avenir-Medium", "Avenir Next", Avenir, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.product-closing a:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .product-story {
    padding: 82px 20px 88px;
  }

  .product-features {
    gap: 78px;
  }

  .feature-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .feature-row-reversed .product-screenshot,
  .feature-row-reversed .feature-copy {
    order: initial;
  }

  .feature-copy {
    width: min(100%, 620px);
  }

  .product-closing {
    display: grid;
    gap: 28px;
    padding: 34px;
  }
}

@media (max-width: 520px) {
  .auth-page {
    padding: 42px 20px 28px;
  }

  .app-icon {
    width: 88px;
    height: 88px;
  }

  .intro {
    font-size: 16px;
  }

  .scroll-link {
    margin-top: 28px;
  }

  .product-story {
    padding: 70px 16px 72px;
  }

  .product-intro {
    margin-bottom: 54px;
  }

  .product-intro p {
    font-size: 16px;
  }

  .product-features {
    gap: 64px;
  }

  .product-screenshot {
    border-radius: 10px;
  }

  .feature-copy {
    padding-inline: 4px;
  }

  .feature-summary {
    margin-top: 68px;
    font-size: 16px;
    text-align: left;
  }

  .product-closing {
    margin-top: 66px;
    padding: 28px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .primary-button,
  .secondary-button,
  .scroll-link,
  .product-closing a {
    transition: none;
  }
}
