:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --text-primary: #1e1e1e;
  --text-tertiary: #8c8c8c;
  --text-inverse: #f5f5f5;
  --border-default: #d1d1d1;
  --border-subtle: #e4e4e4;
  --success: #027b3a;
  --radius-full: 999px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-card: 4px 4px 8px rgba(0, 0, 0, 0.08);
  --hero-image: url("assets/Hero Image Light.png");
  --community-image: url("assets/Frame 48.png");
  --earth-icon-image: url("assets/Basket Icon Background.png");
  --hero-emphasis: #f5f5f5;
  --form-bg: #ffffff;
  --form-input-bg: #ffffff;
  --form-input-color: #2f2f2f;
  --form-placeholder: #6b6b6b;
  --form-button-bg: #1e1e1e;
  --form-button-text: #f5f5f5;
  --form-button-hover: #111111;
  --step-track: #d8d8d8;
  --step-fill: #1e1e1e;
  --feature-phone-bg: #ffffff;
  --community-overlay:
    none;
  --hero-overlay:
    radial-gradient(circle at 50% 42%, rgba(0, 0, 0, 0.8), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 61%, rgba(255, 255, 255, 0.75) 84%, #fff 98%);
  --basket-bg: #ffffff;
}

[data-theme="dark"] {
  --bg-primary: #000000;
  --bg-secondary: #1e1e1e;
  --text-primary: #f5f5f5;
  --text-tertiary: #afafaf;
  --border-default: #4f4f4f;
  --border-subtle: #343434;
  --success: #48c67b;
  --hero-image: url("assets/dark mode/Hero image night.png");
  --community-image: url("assets/dark mode/Frame 48.png");
  --earth-icon-image: url("assets/dark mode/Basket Icon Background.png");
  --hero-emphasis: #f5f5f5;
  --form-bg: #000000;
  --form-input-bg: #000000;
  --form-input-color: #f5f5f5;
  --form-placeholder: #afafaf;
  --form-button-bg: #f5f5f5;
  --form-button-text: #1e1e1e;
  --form-button-hover: #dcdcdc;
  --step-track: #343434;
  --step-fill: #f5f5f5;
  --feature-phone-bg: #1a1a1a;
  --community-overlay:
    radial-gradient(circle at 50% 48%, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.85) 58%),
    linear-gradient(0deg, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, 0.75) 86%, #000 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 61%, rgba(0, 0, 0, 0.75) 84%, #000 98%);
  --hero-overlay:
    radial-gradient(circle at 50% 30%, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.95) 52%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.2) 35%, rgba(0, 0, 0, 0.95) 100%);
  --basket-bg: #000000;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  color: var(--text-primary);
  background: var(--bg-primary);
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.section {
  padding: 120px 0;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 28px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--hero-image) center center / cover no-repeat;
}

.hero-fade {
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}

.top-nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  margin: 0 auto;
  width: fit-content;
  height: 64px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 20px;
  letter-spacing: -0.03em;
}

.top-nav .brand {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}

.top-nav .brand img {
  width: 40px;
  height: 40px;
  filter: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 72px;
  text-align: center;
  color: var(--text-inverse);
}

.hero-title {
  font-family: "Source Serif 4", serif;
  font-size: clamp(46px, 6.2vw, 78px);
  line-height: 1.03;
  letter-spacing: -0.015em;
  font-weight: 400;
  margin: 0 auto;
  max-width: 900px;
  color: #f5f5f5;
  text-align: center;
}

.hero-title-line {
  display: block;
  white-space: nowrap;
}

.word-stack {
  position: relative;
  display: inline-block;
  height: 1.1em;
  min-width: 4.6ch;
  font-style: italic;
  color: var(--hero-emphasis);
  vertical-align: baseline;
}

.word-track {
  position: relative;
  display: block;
  height: 100%;
}

.word-track span {
  position: absolute;
  inset: 0;
  line-height: 1.03;
  opacity: 0;
  animation: heroWord 8s infinite;
}

.word-track span:nth-child(1) {
  animation-delay: 0s;
}

.word-track span:nth-child(2) {
  animation-delay: 2s;
}

.word-track span:nth-child(3) {
  animation-delay: 4s;
}

.word-track span:nth-child(4) {
  animation-delay: 6s;
}

@keyframes heroWord {
  0%,
  22% {
    opacity: 1;
    transform: translateY(0);
  }
  28%,
  100% {
    opacity: 0;
    transform: translateY(-4%);
  }
}

.hero-subtitle {
  max-width: 515px;
  margin: 20px auto 0;
  font-size: 16px;
  line-height: 24px;
}

.waitlist-form {
  margin: 32px auto 0;
  width: fit-content;
  border: 1px solid var(--border-default);
  background: var(--form-bg);
  border-radius: var(--radius-full);
  padding: 6px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 311px) auto;
  gap: 8px;
  align-items: center;
}

.waitlist-form input {
  height: 46px;
  border: 0;
  appearance: none;
  border-radius: calc(var(--radius-full) - 8px);
  padding: 1px 16px 0;
  font-size: 16px;
  line-height: normal;
  color: var(--form-input-color);
  background: var(--form-input-bg);
  outline: none;
}

.waitlist-form input::placeholder {
  color: var(--form-placeholder);
}

.waitlist-form input:focus {
  box-shadow: none;
}

.waitlist-form input.invalid {
  box-shadow: 0 0 0 1px #ff7d7d;
}

.waitlist-form button {
  height: 46px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--form-button-bg);
  color: var(--form-button-text);
  padding: 0 48px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.14s ease;
}

.waitlist-form button:hover {
  background: var(--form-button-hover);
}

.waitlist-form button:active {
  transform: translateY(1px);
}

.waitlist-form button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.waitlist-form .field-message {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -20px;
  min-height: 16px;
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  color: #ff7d7d;
  text-align: left;
}

.waitlist-form .field-message.success {
  color: var(--success);
}

.phone-hero {
  width: 300px;
  margin: 64px auto 0;
}

.phone-mockup-img {
  width: 100%;
  height: auto;
  display: block;
}

.phone-shell {
  width: 300px;
  height: 626px;
  border-radius: 34px;
  background: #fff;
  border: 1px solid #d8d8d8;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
  padding: 14px;
}

.phone-shell.compact {
  width: 187px;
  height: 370px;
  margin-left: auto;
}

.phone-notch {
  width: 92px;
  height: 20px;
  border-radius: 999px;
  background: #0d0d0d;
  margin: 4px auto 12px;
}

.phone-screen {
  border-radius: 22px;
  height: calc(100% - 36px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    url("assets/phone-bg.png") center / cover no-repeat;
  padding: 16px;
  color: #1f1f1f;
}

.phone-label {
  font-size: 12px;
  line-height: 16px;
  opacity: 0.86;
}

.phone-value {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 600;
}

.philosophy h2,
.features h2 {
  text-align: center;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.01em;
  font-weight: 500;
}

.section-copy {
  max-width: 628px;
  margin: 8px auto 0;
  color: var(--text-tertiary);
  text-align: center;
  font-size: 16px;
  line-height: 24px;
}

.philosophy-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  min-height: 320px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.card h3 {
  font-size: 24px;
  line-height: 30px;
  letter-spacing: -0.01em;
  font-weight: 500;
}

.card p {
  margin-top: 8px;
  color: var(--text-tertiary);
  font-size: 16px;
  line-height: 24px;
}

.card-wide {
  grid-column: 1 / -1;
}

.features {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 110px;
}

.steps-head {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step {
  font-size: 24px;
  line-height: 30px;
  letter-spacing: -0.01em;
  font-weight: 500;
}

.step-progress {
  margin-top: 24px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--step-track);
  overflow: hidden;
}

.step-progress span {
  display: block;
  width: 33.34%;
  height: 100%;
  background: var(--step-fill);
}

.feature-panel {
  margin-top: 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 72px;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.feature-phone {
  min-height: 400px;
  border-radius: var(--radius-lg);
  background: var(--feature-phone-bg);
  display: grid;
  place-items: center;
}

.feature-shot {
  width: 219px;
  height: 393px;
  display: block;
}

.feature-copy h3 {
  font-size: 24px;
  line-height: 30px;
  font-weight: 500;
}

.feature-copy p {
  margin-top: 8px;
  color: var(--text-tertiary);
  font-size: 16px;
  line-height: 24px;
  max-width: 476px;
}

.community-hero {
  position: relative;
  height: 260vh;
  padding: 0;
  --community-progress: 0;
  --community-reveal-opacity: 0;
  --community-title-opacity: 1;
  --community-overlay-opacity: 1;
  --community-line-opacity: 0;
  --community-target-opacity: 0;
  --community-media-opacity: 1;
}

.community-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.community-stage {
  position: relative;
  width: 100%;
  height: 100%;
  color: var(--text-primary);
  background: var(--bg-primary);
}

.community-stage-media {
  position: absolute;
  inset: 0;
  background: var(--community-image) center / cover no-repeat;
  transform-origin: top left;
  will-change: transform, border-radius;
  z-index: 2;
  opacity: var(--community-media-opacity);
}

.community-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--community-overlay);
  opacity: var(--community-overlay-opacity);
  pointer-events: none;
  z-index: 2;
}

.community-stage h2 {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: var(--community-title-opacity);
  z-index: 3;
  width: min(980px, calc(100% - 96px));
  color: var(--text-inverse);
}

.community-reveal {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: var(--community-reveal-opacity);
  transform: translateY(calc(24px * (1 - var(--community-reveal-opacity))));
  will-change: opacity, transform;
}

.community-reveal > .container {
  min-height: 100vh;
  padding-top: 116px;
  padding-bottom: 116px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.community-hero h2 {
  font-family: "Source Serif 4", serif;
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.015em;
  font-weight: 400;
  text-align: center;
}

.baskets {
  position: relative;
  min-height: 190px;
}

.basket-card {
  position: absolute;
  width: 375px;
  height: 80px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  background: var(--basket-bg);
  padding: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.basket-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: block;
  overflow: hidden;
}

.basket-card .icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.basket-card h4 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.basket-card p {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-tertiary);
}

.basket-value {
  margin-left: auto;
  text-align: right;
}

.basket-value strong {
  display: block;
  font-size: 16px;
  line-height: 24px;
}

.basket-value span {
  font-size: 12px;
  line-height: 16px;
  color: var(--success);
}

.baskets.top .center,
.baskets.bottom .center {
  left: calc(50% - 187.5px);
}

.baskets.top .left,
.baskets.bottom .left {
  left: 0;
  top: 95px;
}

.baskets.top .right,
.baskets.bottom .right {
  right: 0;
  top: 95px;
}

.community-line {
  margin: 26px auto 48px;
  padding: 0 72px;
  text-align: center;
  font-family: "Source Serif 4", serif;
  font-size: 48px;
  line-height: 1.03;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  opacity: var(--community-line-opacity);
  transition: opacity 0.1s linear;
}

.cta-final {
  min-height: 100vh;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
}

.cta-final .container {
  width: min(1168px, calc(100% - 32px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cta-final h2 {
  font-family: "Source Serif 4", serif;
  font-size: clamp(54px, 8vw, 90px);
  line-height: 1.03;
  letter-spacing: -0.015em;
  font-weight: 400;
  font-style: italic;
}

.cta-final p {
  margin-top: 28px;
  font-size: 16px;
  line-height: 24px;
  color: var(--text-tertiary);
}

.footer {
  padding: 32px 0;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 10px;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer a,
.footer p {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-tertiary);
  text-decoration: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}

.theme-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
}

.theme-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.theme-btn[aria-pressed="true"] {
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(8px);
  border-radius: 12px;
  border: 1px solid #2f5f42;
  background: #0f281a;
  color: #80e0a4;
  padding: 10px 14px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1199px) {
  .section {
    padding: 96px 0;
  }

  .hero {
    min-height: 100vh;
    min-height: 100svh;
  }

  .waitlist-form {
    grid-template-columns: minmax(0, 280px) auto;
  }

  .philosophy-grid {
    gap: 16px;
  }

  .card {
    min-height: 260px;
  }

  .feature-panel {
    padding: 40px;
  }

  .basket-card {
    width: 320px;
  }

  .baskets.top .center,
  .baskets.bottom .center {
    left: calc(50% - 160px);
  }
}

@media (max-width: 767px) {
  .container {
    width: min(1120px, calc(100% - 20px));
  }

  .top-nav {
    top: 12px;
    gap: 10px;
    padding: 8px 10px;
  }

  .top-nav a:not(.brand) {
    font-size: 13px;
  }

  .hero {
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero-content {
    padding-top: 56px;
  }

  .hero-subtitle {
    max-width: 360px;
  }

  .hero-title-line {
    white-space: normal;
  }

  .waitlist-form {
    width: min(100%, 480px);
    grid-template-columns: 1fr;
    padding: 8px;
    border-radius: 20px;
  }

  .waitlist-form .field-message {
    bottom: -18px;
    left: 8px;
    right: 8px;
  }

  .waitlist-form input,
  .waitlist-form button {
    width: 100%;
  }

  .waitlist-form button {
    padding: 0 24px;
  }

  .phone-hero {
    width: 220px;
    margin-top: 42px;
  }

  .phone-mockup-img {
    width: 100%;
  }

  .phone-shell {
    width: 220px;
    height: 458px;
  }

  .philosophy h2,
  .features h2 {
    font-size: 30px;
    line-height: 36px;
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
  }

  .card-wide {
    grid-column: auto;
  }

  .steps-head {
    gap: 8px;
  }

  .step {
    font-size: 18px;
    line-height: 24px;
  }

  .feature-panel {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .feature-phone {
    min-height: 300px;
  }

  .feature-shot {
    width: 168px;
    height: auto;
  }

  .community-hero {
    height: auto;
    padding: 0;
  }

  .community-pin {
    position: relative;
    height: auto;
    overflow: visible;
  }

  .community-stage {
    height: auto;
  }

  .community-stage-media {
    position: relative;
    inset: auto;
    height: 560px;
    transform: none !important;
  }

  .community-stage::after {
    opacity: 1;
  }

  .community-stage h2 {
    top: 280px;
    width: calc(100% - 32px);
  }

  .community-reveal {
    position: relative;
    inset: auto;
    opacity: 1;
    transform: none;
    margin-top: -36px;
    z-index: 3;
  }

  .community-reveal > .container {
    padding-top: 48px;
    padding-bottom: 24px;
    min-height: auto;
  }

  .community-line {
    font-size: 38px;
    margin: 20px auto 32px;
    padding: 0 12px;
    opacity: 1;
  }

  .baskets {
    display: grid;
    gap: 12px;
    min-height: unset;
  }

  .basket-card {
    position: static;
    width: 100%;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-right {
    width: 100%;
    justify-content: space-between;
  }
}
