/* ==========================================================================
   Apfel. — Final Apple-style product landing page with mobile nav polish
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --color-bg: #ffffff;
  --color-bg-dark: #000000;
  --color-text: #1d1d1f;
  --color-text-dark: #f5f5f7;
  --color-text-secondary: #6e6e73;
  --color-accent: #0071e3;
  --gala-red: #b8202f;
  --braeburn-red: #a83232;
  --boskoop-red: #8b1e1e;
  --pippin-gold: #d7a63b;
  --nav-height: 44px;
  --section-radius: 30px;
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.10);
  --shadow-strong: 0 28px 60px rgba(0, 0, 0, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background:
    radial-gradient(circle at top, rgba(0, 113, 227, 0.08), transparent 32%),
    linear-gradient(180deg, #fff 0%, #f7f8fc 40%, #fff 100%);
  overflow-x: hidden;
}

img, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
section { position: relative; }
::selection { background: rgba(0, 113, 227, 0.18); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 17px;
  cursor: pointer;
}
.btn--link { color: var(--color-accent); }
.btn--link span { transition: transform 0.2s ease; }
.btn--link:hover span { transform: translateX(3px); }
.btn--pill {
  background: var(--color-accent);
  color: #fff;
  padding: 10px 22px;
  border-radius: 980px;
  font-size: 15px;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 18px rgba(0, 113, 227, 0.24);
}
.btn--pill:hover {
  background: #0077ed;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 113, 227, 0.28);
}
.btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 10px 22px;
  border-radius: 980px;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn--ghost:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  transition: background 0.3s ease;
}
.navbar.is-scrolled { background: rgba(0, 0, 0, 0.92); }
.navbar__inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.navbar__logo { font-size: 18px; line-height: 1; }

.navbar__toggle {
  display: none;
  appearance: none;
  border: 0;
  background: rgba(255,255,255,0.10);
  color: #fff;
  width: 36px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
}
.navbar__toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.navbar__links a {
  color: rgba(245, 245, 247, 0.85);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.navbar__cta {
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 980px;
}

/* HERO */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--color-text-dark);
  text-align: center;
  overflow: hidden;
  padding: 80px 20px 60px;
  background:
    radial-gradient(circle at 50% 22%, rgba(255,255,255,0.12) 0%, rgba(0,0,0,0) 33%),
    radial-gradient(circle at 50% 30%, #1c1c1e 0%, #000 72%);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.52;
  pointer-events: none;
}
.hero::before {
  width: 340px;
  height: 340px;
  top: 8%;
  left: 7%;
  background: rgba(255, 77, 77, 0.18);
  animation: floatBlob 12s ease-in-out infinite;
}
.hero::after {
  width: 440px;
  height: 440px;
  right: 2%;
  bottom: -10%;
  background: rgba(0, 113, 227, 0.18);
  animation: floatBlob 14s ease-in-out infinite reverse;
}
@keyframes floatBlob {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(18px,-24px,0) scale(1.08); }
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.hero__content {
  position: relative;
  z-index: 2;
  pointer-events: none;
  max-width: 980px;
}
.hero__kicker {
  margin-bottom: 18px;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.72);
}
.hero__title {
  font-size: clamp(56px, 10vw, 110px);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 0.92;
}
.hero__subtitle {
  margin-top: 14px;
  font-size: clamp(18px, 3vw, 30px);
  color: rgba(245, 245, 247, 0.88);
  max-width: 760px;
  margin-inline: auto;
  font-weight: 400;
}
.hero__actions {
  margin-top: 28px;
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  pointer-events: auto;
}
.hero__metrics {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 760px;
  margin-inline: auto;
}
.hero-metric {
  padding: 18px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(16px);
}
.hero-metric__value {
  display: block;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.hero-metric__label {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(245,245,247,0.68);
}
.hero__scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(245, 245, 247, 0.58);
  z-index: 2;
  animation: bounce 2.4s ease-in-out infinite;
}
@keyframes bounce {
  0%,100% { transform: translate(-50%,0); opacity: 0.5; }
  50% { transform: translate(-50%,6px); opacity: 1; }
}

.float-tag {
  position: absolute;
  z-index: 2;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  color: rgba(245,245,247,0.95);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(14px);
  font-size: 12px;
  animation: floatTag 7s ease-in-out infinite;
}
.float-tag--1 { top: 18%; left: 8%; }
.float-tag--2 { top: 28%; right: 10%; animation-delay: -2s; }
.float-tag--3 { bottom: 22%; left: 12%; animation-delay: -4s; }
@keyframes floatTag {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.story-section {
  padding: 120px 20px;
  background: linear-gradient(180deg, #fff 0%, #f6f7fb 100%);
}
.story-section__inner,
.compare__inner,
.buy__inner {
  max-width: 1180px;
  margin: 0 auto;
}
.story-section__head {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.story-section__eyebrow {
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.story-section__title {
  margin-top: 10px;
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.story-section__text {
  margin-top: 18px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--color-text-secondary);
}

.horizontal-story {
  padding: 0;
  background: #050505;
  color: #fff;
}
.horizontal-story__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.horizontal-story__track {
  height: 100%;
  display: flex;
  width: max-content;
}
.horizontal-panel {
  width: 100vw;
  height: 100vh;
  padding: 120px 20px 80px;
  display: grid;
  place-items: center;
  text-align: center;
}
.horizontal-panel:nth-child(1) { background: radial-gradient(circle at 50% 30%, rgba(255,77,77,0.12), transparent 35%), #050505; }
.horizontal-panel:nth-child(2) { background: radial-gradient(circle at 50% 30%, rgba(0,113,227,0.14), transparent 35%), #0a0a0a; }
.horizontal-panel:nth-child(3) { background: radial-gradient(circle at 50% 30%, rgba(215,166,59,0.14), transparent 35%), #101010; }
.horizontal-panel:nth-child(4) { background: radial-gradient(circle at 50% 30%, rgba(90,125,58,0.14), transparent 35%), #060606; }
.horizontal-panel__inner { max-width: 720px; }
.horizontal-panel__eyebrow {
  color: rgba(245,245,247,0.66);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 13px;
}
.horizontal-panel__title {
  margin-top: 12px;
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 650;
  letter-spacing: -0.04em;
}
.horizontal-panel__text {
  margin-top: 18px;
  font-size: 19px;
  line-height: 1.55;
  color: rgba(245,245,247,0.74);
}
.horizontal-panel__badge {
  margin-top: 22px;
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(14px);
}

.product-section,
.compare,
.buy,
.footer {
  padding-left: 20px;
  padding-right: 20px;
}
.product-section {
  position: relative;
  min-height: 100vh;
  padding: 120px 20px 80px;
  display: grid;
  justify-items: center;
  text-align: center;
  overflow: hidden;
}
.product-section--dark { background: #000; color: var(--color-text-dark); }
.product-section--light { background: linear-gradient(180deg, #f5f5f7 0%, #fff 100%); color: var(--color-text); }
.product-section--colorful { background: linear-gradient(180deg, #111 0%, #050505 100%); color: var(--color-text-dark); }
.product-section--premium { background: linear-gradient(180deg, #f8f3ea 0%, #fff 100%); color: var(--color-text); }

.product-section__inner {
  max-width: 700px;
  position: relative;
  z-index: 1;
}
.product-section__eyebrow {
  font-size: 21px;
  font-weight: 600;
  color: var(--color-accent);
}
.product-section__title {
  margin-top: 8px;
  font-size: clamp(34px, 6vw, 62px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.product-section__text {
  margin-top: 20px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--color-text-secondary);
}
.product-section--dark .product-section__text,
.product-section--colorful .product-section__text {
  color: rgba(245,245,247,0.76);
}
.product-section__actions {
  margin-top: 24px;
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.product-visual {
  margin-top: 56px;
  width: 100%;
  max-width: 520px;
  display: flex;
  justify-content: center;
}
.apple-graphic {
  position: relative;
  width: 270px;
  height: 270px;
  border-radius: 46% 54% 58% 42% / 55% 48% 52% 45%;
  box-shadow:
    inset -20px -20px 60px rgba(0,0,0,0.35),
    inset 15px 15px 40px rgba(255,255,255,0.16),
    0 30px 60px rgba(0,0,0,0.16);
  transition: transform 0.3s ease, filter 0.3s ease, background 0.4s ease;
  animation: gentleDrift 8s ease-in-out infinite;
}
.apple-graphic::before {
  content: "";
  position: absolute;
  top: -28px;
  left: 50%;
  width: 8px;
  height: 40px;
  background: linear-gradient(#6b4423, #3f2a17);
  border-radius: 4px;
  transform: translateX(-50%) rotate(-8deg);
}
.apple-graphic::after {
  content: "";
  position: absolute;
  top: -18px;
  left: calc(50% + 6px);
  width: 46px;
  height: 26px;
  background: #4c8c3d;
  border-radius: 0% 100% 0% 100%;
  transform: rotate(-25deg);
}
@keyframes gentleDrift {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.apple-graphic--gala { background: radial-gradient(circle at 35% 30%, #e94b4b, var(--gala-red) 70%); }
.apple-graphic--braeburn { background: radial-gradient(circle at 35% 30%, #d4694a, var(--braeburn-red) 70%); }
.apple-graphic--boskoop { background: radial-gradient(circle at 35% 30%, #b3382c, var(--boskoop-red) 70%); }
.apple-graphic--golden { background: radial-gradient(circle at 35% 30%, #f8d86a, var(--pippin-gold) 72%); }

.feature-grid {
  margin-top: 72px;
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: left;
}
.feature-grid li {
  padding: 22px 22px 24px;
  border-radius: 22px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
}
.product-section--light .feature-grid li,
.product-section--premium .feature-grid li {
  background: rgba(255,255,255,0.8);
  border-color: rgba(0,0,0,0.06);
  box-shadow: var(--shadow-soft);
}
.feature-grid h3 { font-size: 21px; font-weight: 600; }
.feature-grid p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}
.product-section--dark .feature-grid p,
.product-section--colorful .feature-grid p {
  color: rgba(245,245,247,0.72);
}

.color-picker {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.color-picker__swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.6);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
}
.color-picker__swatch:hover,
.color-picker__swatch.is-active {
  transform: scale(1.15);
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.12);
}
.color-picker__label {
  margin-top: 12px;
  font-size: 14px;
  color: rgba(245,245,247,0.72);
}

.compare {
  padding: 120px 20px;
  background: #fff;
  text-align: center;
}
.compare__inner { max-width: 1180px; margin: 0 auto; }
.compare__title {
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 650;
  letter-spacing: -0.03em;
}
.compare__subtitle {
  margin-top: 12px;
  font-size: 19px;
  color: var(--color-text-secondary);
}
.compare__table-wrap {
  margin: 48px auto 0;
  max-width: 1100px;
  overflow-x: auto;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  background: #fff;
}
.compare__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.compare__table th,
.compare__table td {
  padding: 16px 12px;
  border-bottom: 1px solid #e5e5ea;
  text-align: center;
}
.compare__table th:first-child,
.compare__table td:first-child {
  text-align: left;
  color: var(--color-text-secondary);
  font-weight: 400;
}
.compare__table th {
  font-size: 17px;
  font-weight: 650;
  background: #fafafa;
}
.compare__table tr:last-child td { border-bottom: none; }

.buy {
  padding: 120px 20px;
  background: linear-gradient(180deg, #f5f5f7 0%, #fff 100%);
  text-align: center;
}
.buy__inner { max-width: 1180px; margin: 0 auto; }
.buy__title {
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 650;
  letter-spacing: -0.03em;
}
.buy__text {
  margin-top: 12px;
  color: var(--color-text-secondary);
  font-size: 19px;
}
.buy__cards {
  margin: 56px auto 0;
  max-width: 1120px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.buy-card {
  background: #fff;
  border-radius: 22px;
  padding: 40px 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: 290px;
}
.buy-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 42px rgba(0,0,0,0.13);
}
.buy-card--highlight { border: 2px solid var(--color-accent); }
.buy-card h3 { font-size: 21px; font-weight: 650; }
.buy-card__price { margin: 12px 0 20px; color: var(--color-text-secondary); }
.buy-card__desc { color: var(--color-text-secondary); font-size: 15px; line-height: 1.55; }
.buy-card__bottom { margin-top: auto; padding-top: 24px; }

.footer {
  background: #f5f5f7;
  border-top: 1px solid #e5e5ea;
  padding: 40px 20px;
}
.footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  color: var(--color-text-secondary);
  font-size: 12px;
}
.footer__links {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__links a:hover { text-decoration: underline; }
.footer__legal {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e5e5ea;
}

.reveal { opacity: 0; transform: translateY(40px); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1024px) {
  .feature-grid, .buy__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__metrics { grid-template-columns: 1fr; max-width: 360px; }
}

@media (max-width: 768px) {
  .navbar__toggle { display: inline-flex; }
  .navbar__links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.96);
    padding: 14px 20px 18px;
    display: grid;
    gap: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .navbar__links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .navbar__links li:not(:last-child) { display: block; }
  .navbar__links a {
    display: block;
    padding: 10px 0;
    font-size: 14px;
  }

  .product-section { padding-top: 100px; }
  .feature-grid, .buy__cards { grid-template-columns: 1fr; }
  .hero__subtitle, .product-section__text, .buy__text, .story-section__text { font-size: 17px; }
  .hero__actions, .product-section__actions { gap: 12px; }
  .apple-graphic { width: 230px; height: 230px; }
  .horizontal-panel { padding-top: 100px; }
  .horizontal-panel__title { font-size: clamp(34px, 11vw, 54px); }
  .horizontal-panel__text { font-size: 17px; }
}

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