/* GeoLicious – Entwurf 2: klar, hell, im Stil von Apples Produktseiten.
   Akzent ist das Rot des App-Icons; sonst Schwarz, Weiß und Apples Hellgrau. */

:root {
  --accent: #E8001C;
  --accent-hover: #C80018;
  --accent-2: #FF6A3D;

  --bg: #FFFFFF;
  --bg-alt: #F5F5F7;
  --tile: #F5F5F7;
  --tile-on-alt: #FFFFFF;
  --text: #1D1D1F;
  --text-2: #6E6E73;
  --line: #D2D2D7;
  --nav: rgba(255, 255, 255, 0.72);

  --dark-bg: #000000;
  --dark-tile: #161617;
  --dark-text: #F5F5F7;
  --dark-text-2: #A1A1A6;

  --max: 1024px;
  --wide: 1240px;
  --gutter: clamp(16px, 4vw, 32px);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-alt: #101012;
    --tile: #161617;
    --tile-on-alt: #1D1D1F;
    --text: #F5F5F7;
    --text-2: #A1A1A6;
    --line: #424245;
    --nav: rgba(22, 22, 23, 0.72);
    --dark-bg: #101012;
    --dark-tile: #1D1D1F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #101012;
  --tile: #161617;
  --tile-on-alt: #1D1D1F;
  --text: #F5F5F7;
  --text-2: #A1A1A6;
  --line: #424245;
  --nav: rgba(22, 22, 23, 0.72);
  --dark-bg: #101012;
  --dark-tile: #1D1D1F;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 52px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, .display {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.07;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(48px, 8vw, 96px); letter-spacing: -0.03em; line-height: 1.02; }
h2 { font-size: clamp(36px, 5.6vw, 64px); letter-spacing: -0.025em; }
h3 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.12; }
p { margin: 0; text-wrap: pretty; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wide { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }

.eyebrow {
  display: block; font-size: clamp(19px, 2vw, 24px); font-weight: 600;
  letter-spacing: 0.004em; margin-bottom: 8px;
  color: var(--accent);
}
.lede {
  font-size: clamp(19px, 2vw, 24px); line-height: 1.33; font-weight: 500;
  letter-spacing: 0.009em; color: var(--text-2);
  max-width: 34em;
}
.center .lede { margin-left: auto; margin-right: auto; }
.lede strong { color: var(--text); font-weight: 600; }

.gradient-text {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Lokale Navigation ---------- */

.localnav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.localnav .wide { display: flex; align-items: center; height: 52px; gap: 24px; }
.localnav .title {
  display: flex; align-items: center; gap: 8px;
  font-size: 21px; font-weight: 600; letter-spacing: 0.011em; color: var(--text);
  margin-right: auto;
}
.localnav .title img { width: 26px; height: 26px; border-radius: 6px; }
.localnav .title:hover { text-decoration: none; }
.localnav nav { display: flex; gap: 22px; font-size: 12px; letter-spacing: -0.01em; }
.localnav nav a { color: var(--text); opacity: 0.88; }
.localnav nav a:hover { color: var(--accent); text-decoration: none; opacity: 1; }
.localnav .lang { font-size: 12px; color: var(--text-2); }
.localnav .lang a { color: var(--text-2); }
.localnav .lang b { color: var(--text); font-weight: 600; }

/* ---------- Schaltflächen ---------- */

.btn {
  display: inline-block; border-radius: 980px;
  background: var(--accent); color: #fff;
  font-size: 17px; font-weight: 400; letter-spacing: -0.022em;
  padding: 11px 22px;
  transition: background 0.2s ease;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn-small { font-size: 12px; padding: 4px 11px; }
.more::after { content: " ›"; }
.more { font-size: 17px; }
.cta { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: center; margin-top: 32px; }

/* ---------- iPhone-Rahmen ----------
   Maße aus dem großen iPhone mit Dynamic Island (430 × 932 pt), alles in Prozent der
   Gerätebreite über Container-Einheiten – der Screenshot bestimmt die Höhe selbst,
   nichts wird beschnitten. */

.iphone {
  container-type: inline-size;
  position: relative;
  width: 100%;
}
.iphone .body {
  position: relative;
  padding: 2.6cqw;
  border-radius: 15.6cqw;
  background: #0B0B0C;
  box-shadow:
    0 0 0 0.45cqw #3B3B3F,              /* Rahmenkante */
    0 0 0 0.75cqw #1A1A1C,
    0 2cqw 6cqw rgba(0, 0, 0, 0.18),
    0 10cqw 24cqw -6cqw rgba(0, 0, 0, 0.35);
}
.iphone .body img { width: 100%; border-radius: 13cqw; }
.iphone .body::after { /* Dynamic Island */
  content: ""; position: absolute;
  top: calc(2.6cqw + 2.5cqw); left: 50%; transform: translateX(-50%);
  width: 28.5cqw; height: 8.4cqw; border-radius: 99px;
  background: #000;
}
.iphone::before, .iphone::after { /* Seitentasten */
  content: ""; position: absolute; width: 0.9cqw; border-radius: 1cqw;
  background: #2A2A2D;
}
.iphone::before { left: -1.5cqw; top: 26%; height: 14cqw; box-shadow: 0 19cqw 0 #2A2A2D; } /* Lautstärke */
.iphone::after { right: -1.5cqw; top: 30%; height: 22cqw; }                                   /* Seitentaste */

/* ---------- iPad-Rahmen (12,9″ quer) ---------- */

.ipad-frame { container-type: inline-size; width: 100%; }
.ipad-frame .body {
  position: relative;
  padding: 2.1cqw;
  border-radius: 3.6cqw;
  background: #0B0B0C;
  box-shadow:
    0 0 0 0.25cqw #3B3B3F,
    0 0 0 0.4cqw #1A1A1C,
    0 1cqw 3cqw rgba(0, 0, 0, 0.15),
    0 5cqw 12cqw -3cqw rgba(0, 0, 0, 0.35);
}
.ipad-frame .body img { width: 100%; border-radius: 1.5cqw; }
.ipad-frame .body::after { /* Kamera an der langen Seite */
  content: ""; position: absolute; top: 0.85cqw; left: 50%; transform: translateX(-50%);
  width: 0.45cqw; height: 0.45cqw; border-radius: 50%; background: #1E2430;
}

/* ---------- Hero ---------- */

.hero { padding: clamp(56px, 9vw, 96px) 0 0; overflow: clip; }
.hero .icon { width: 88px; height: 88px; border-radius: 20px; margin: 0 auto 20px; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.3); }
.hero h1 { margin-top: 4px; }
.hero .lede { margin-top: 20px; }
.hero .note { margin-top: 16px; font-size: 14px; color: var(--text-2); }

.lineup {
  display: flex; justify-content: center; align-items: flex-end;
  gap: clamp(12px, 3vw, 40px);
  margin: clamp(48px, 7vw, 80px) auto 0;
  padding: 0 var(--gutter) clamp(56px, 8vw, 96px);
  max-width: 1100px;
}
.lineup .iphone { width: clamp(150px, 26vw, 300px); flex: none; }
.lineup .iphone.side { width: clamp(130px, 22vw, 260px); }

/* ---------- Abschnitte ---------- */

section { padding: clamp(80px, 11vw, 140px) 0; }
.alt { background: var(--bg-alt); }
.dark { background: var(--dark-bg); color: var(--dark-text); }
.dark .lede { color: var(--dark-text-2); }
.dark .lede strong { color: var(--dark-text); }

.section-head { margin-bottom: clamp(48px, 7vw, 80px); }
.section-head .lede { margin-top: 20px; }

/* ---------- Highlights (Kachelraster) ---------- */

.bento {
  display: grid; gap: 20px;
  grid-template-columns: repeat(6, 1fr);
}
.tile {
  background: var(--tile); border-radius: 28px;
  padding: clamp(28px, 3.5vw, 44px);
  overflow: clip; position: relative;
  display: flex; flex-direction: column;
}
.alt .tile { background: var(--tile-on-alt); }
.tile h3 { font-size: clamp(22px, 2.3vw, 28px); }
.tile p { color: var(--text-2); margin-top: 10px; font-size: 17px; }
.tile p strong { color: var(--text); font-weight: 600; }
.tile .big {
  font-size: clamp(64px, 8vw, 96px); font-weight: 700; letter-spacing: -0.04em; line-height: 1;
  margin-bottom: 8px;
}
.tile .glyph { width: 44px; height: 44px; color: var(--accent); margin-bottom: 18px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.tile.split { flex-direction: row; align-items: flex-end; gap: 32px; padding-bottom: 0; }
.tile.split .copy { flex: 1; align-self: center; padding-bottom: clamp(28px, 3.5vw, 44px); }
.tile.split .iphone { width: min(46%, 280px); flex: none; margin-bottom: -18%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 24px; }
.chips span {
  font-size: 15px; font-weight: 500; padding: 7px 14px; border-radius: 999px;
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
}
.alt .chips span { background: var(--bg-alt); }

/* ---------- Funktionsabschnitte ---------- */

.showcase .device { width: min(340px, 78vw); margin: 0 auto; }
.pair {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 6vw, 96px);
  max-width: 820px; margin: 0 auto; align-items: start;
}
.pair figure { margin: 0; }
.pair .iphone { width: min(320px, 100%); margin: 0 auto; }
.pair figcaption { margin-top: 36px; text-align: center; color: var(--text-2); font-size: 17px; }
.pair figcaption strong { display: block; color: var(--text); font-size: 21px; font-weight: 600; margin-bottom: 4px; }
.dark .pair figcaption { color: var(--dark-text-2); }
.dark .pair figcaption strong { color: var(--dark-text); }

.facts3 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  margin-top: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line); padding-top: 40px;
}
.facts3 h3 { font-size: 21px; margin-bottom: 8px; }
.facts3 p { color: var(--text-2); }
.facts3 .glyph { width: 32px; height: 32px; color: var(--accent); margin-bottom: 14px; }

.numbers {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: clamp(56px, 8vw, 96px); text-align: center;
}
.numbers .value { font-size: clamp(48px, 7vw, 80px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.numbers .label { margin-top: 10px; color: var(--dark-text-2); font-size: 17px; }
.footnote { margin-top: 32px; text-align: center; font-size: 12px; color: var(--dark-text-2); }

.searchfield {
  display: flex; align-items: center; gap: 12px;
  max-width: 440px; margin: 40px auto 0;
  padding: 14px 20px; border-radius: 999px;
  background: var(--tile); color: var(--text);
  font-size: 21px; font-weight: 500;
}
.searchfield svg { width: 22px; height: 22px; color: var(--text-2); flex: none; }
.searchfield .typed { white-space: nowrap; overflow: hidden; }
.searchfield .caret { width: 2px; height: 26px; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .searchfield .caret { animation: none; } }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: clamp(32px, 8vw, 120px); align-items: center; }
.search-row .iphone { width: min(320px, 70vw); }
.search-row .searchfield { margin-left: 0; }
.examples { margin-top: 28px; display: grid; gap: 14px; }
.examples div { display: flex; gap: 14px; align-items: baseline; font-size: 17px; color: var(--text-2); }
.examples code {
  font: 600 17px ui-monospace, "SF Mono", Menlo, monospace; color: var(--text);
  min-width: 7.5em;
}

.ipad-wrap { max-width: 1000px; margin: 0 auto; }

.privacy-icon { width: 88px; height: 88px; margin: 0 auto 28px; color: var(--dark-text); }
.dark .facts3 { border-color: #424245; }
.dark .facts3 p { color: var(--dark-text-2); }

.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards3 .tile code {
  font: 600 13px ui-monospace, "SF Mono", Menlo, monospace; color: var(--accent);
  margin-bottom: 16px; display: block;
}

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 820px; margin: 0 auto; }
.plans .tile { text-align: left; }
.plans .price { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; margin: 6px 0 2px; }
.plans .sub { color: var(--text-2); font-size: 14px; }
.plans ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.plans li { padding-left: 28px; position: relative; }
.plans li::before {
  content: ""; position: absolute; left: 2px; top: 0.35em; width: 12px; height: 7px;
  border: solid var(--accent); border-width: 0 0 2px 2px; transform: rotate(-45deg);
}
.plans .featured { box-shadow: inset 0 0 0 2px var(--accent); }

.final .icon { width: 120px; height: 120px; border-radius: 27px; margin: 0 auto 28px; box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.35); }

footer {
  background: var(--bg-alt); color: var(--text-2);
  font-size: 12px; line-height: 1.33; letter-spacing: -0.01em;
  padding: 20px 0 32px;
}
footer .fine { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 16px; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 0; }
footer nav a { color: var(--text-2); padding: 0 10px; border-left: 1px solid var(--line); }
footer nav a:first-child { padding-left: 0; border-left: 0; }
footer nav a:hover { color: var(--text); }

/* ---------- Einblenden (nur mit JS, nur ohne reduzierte Bewegung) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 833px) {
  .localnav nav { display: none; }
  .bento { grid-template-columns: 1fr 1fr; }
  .span-2, .span-3 { grid-column: span 1; }
  .span-4, .span-6 { grid-column: span 2; }
  .facts3, .cards3 { grid-template-columns: 1fr; }
  .search-row { grid-template-columns: 1fr; text-align: center; }
  .search-row .iphone { margin: 0 auto; }
  .search-row .searchfield { margin-left: auto; }
  .examples div { justify-content: center; }
  .plans { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .span-2, .span-3, .span-4, .span-6 { grid-column: span 1; }
  .tile.split { flex-direction: column; align-items: center; }
  .tile.split .copy { padding-bottom: 0; }
  .tile.split .iphone { width: 62%; margin-bottom: -22%; }
  .pair { grid-template-columns: 1fr; gap: 64px; }
  .pair .iphone { width: 70%; }
  .numbers { grid-template-columns: 1fr; gap: 36px; }
  .lineup .iphone.side { display: none; }
  .lineup .iphone { width: 62vw; }
}

.numbers .value .unit { font-size: 0.5em; letter-spacing: -0.01em; }

/* ---------- Animationen ----------
   Alles hier ist Zugabe: ohne JS, ohne Scroll-Timelines oder mit „Bewegung reduzieren“
   steht die Seite fertig da. Scroll-gekoppelte Effekte nutzen die Einzel-Eigenschaften
   translate/scale/rotate, damit sie sich nicht mit dem transform des Einblendens beißen. */

@media (prefers-reduced-motion: no-preference) {

  /* Hero: die drei iPhones steigen beim Laden versetzt auf. */
  .lineup .iphone { animation: hero-rise 1.4s cubic-bezier(.16, 1, .3, 1) both; }
  .lineup .iphone:nth-child(1) { animation-delay: .25s; }
  .lineup .iphone:nth-child(2) { animation-delay: .1s; }
  .lineup .iphone:nth-child(3) { animation-delay: .4s; }
  @keyframes hero-rise {
    from { opacity: 0; translate: 0 120px; }
    to   { opacity: 1; translate: 0 0; }
  }
  .hero .wrap > * { animation: fade-up 1s cubic-bezier(.16, 1, .3, 1) both; }
  .hero .wrap > :nth-child(2) { animation-delay: .05s; }
  .hero .wrap > :nth-child(3) { animation-delay: .1s; }
  .hero .wrap > :nth-child(4) { animation-delay: .15s; }
  .hero .wrap > :nth-child(5) { animation-delay: .2s; }
  .hero .wrap > :nth-child(6) { animation-delay: .25s; }
  @keyframes fade-up {
    from { opacity: 0; translate: 0 24px; }
    to   { opacity: 1; translate: 0 0; }
  }

  /* Gruppen erscheinen nacheinander statt alle auf einmal. */
  .js :is(.bento, .facts3, .cards3, .plans, .pair, .numbers) > .reveal:nth-child(2) { transition-delay: .08s; }
  .js :is(.bento, .facts3, .cards3, .plans, .pair, .numbers) > .reveal:nth-child(3) { transition-delay: .16s; }
  .js :is(.bento, .facts3, .cards3, .plans, .pair, .numbers) > .reveal:nth-child(4) { transition-delay: .24s; }
  .js :is(.bento, .facts3, .cards3, .plans, .pair, .numbers) > .reveal:nth-child(5) { transition-delay: .32s; }

  /* Datenschutz: das Schild zeichnet sich, sobald der Abschnitt sichtbar wird. */
  .js .draw :is(path, rect) { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s cubic-bezier(.65, 0, .35, 1) .15s; }
  .js .in .draw :is(path, rect) { stroke-dashoffset: 0; }
  .js .draw rect { transition-delay: .6s; }
  .js .draw path:last-child { transition-delay: .8s; }

  @supports (animation-timeline: view()) {

    /* Hero beim Wegscrollen: außen rücken auseinander, die Mitte hebt sich. */
    .lineup { view-timeline: --lineup block; }
    .lineup .iphone.side, .lineup .iphone:not(.side) {
      animation: hero-rise 1.4s cubic-bezier(.16, 1, .3, 1) both, var(--spread) linear both;
      animation-timeline: auto, --lineup;
      animation-range: normal, exit 0% exit 100%;
    }
    .lineup .iphone:nth-child(1) { --spread: spread-left; }
    .lineup .iphone:nth-child(2) { --spread: lift; }
    .lineup .iphone:nth-child(3) { --spread: spread-right; }
    @keyframes spread-left  { to { transform: translateX(-12%) rotate(-3deg); } }
    @keyframes spread-right { to { transform: translateX(12%) rotate(3deg); } }
    @keyframes lift         { to { transform: translateY(-8%) scale(1.04); } }

    /* Highlight-Kachel: das iPhone schiebt sich von unten herein. */
    .tile.split .iphone {
      animation: slide-in linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 45%;
    }
    @keyframes slide-in { from { translate: 0 35%; } to { translate: 0 0; } }

    /* Großes Einzelgerät wächst beim Hereinscrollen leicht. */
    .showcase .device .iphone {
      animation: grow linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 40%;
    }
    @keyframes grow { from { scale: .86; } to { scale: 1; } }

    /* Suche: das Gerät steigt etwas langsamer als die Seite. */
    .search-row > .iphone .body {
      animation: drift-soft linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
    @keyframes drift-soft { from { translate: 0 40px; } to { translate: 0 -40px; } }

    /* iPad kippt aus der Schräge in die Ebene. */
    .ipad-frame { perspective: 1800px; }
    .ipad-frame .body {
      transform-origin: 50% 100%;
      animation: tilt linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 50%;
    }
    @keyframes tilt {
      from { rotate: x 22deg; scale: .9; }
      to   { rotate: x 0deg; scale: 1; }
    }
  }
}

/* Leiste bekommt erst nach dem ersten Scrollen ihre Trennlinie. */
.localnav { transition: border-color .3s ease; }
.localnav:not(.scrolled) { border-bottom-color: transparent; }

/* Früher als style-Attribute im HTML – ausgelagert, damit die CSP ohne 'unsafe-inline' auskommt. */
.facts3, .cards3 { text-align: left; }
.search-row .lede { margin-top: 20px; }
.final .lede { margin-top: 16px; }
.ipad-wrap { padding: 0 var(--gutter); }
