/* =========================================================
   Freddie Fisch – Stylesheet
   Palette: Ozean-Teal, Türkis, Koralle, Sonnengelb, Sandcreme
   Typo: Baloo 2 (Überschriften) / Nunito (Fließtext)
   ========================================================= */

:root {
  --ocean-deep: #1e4a5f;
  --ocean-mid: #2f7691;
  --turquoise: #5fa0a3;
  --turquoise-light: #a9c9c4;
  --coral: #e2984a;
  --coral-dark: #c97a2e;
  --sun: #f0b95e;
  --sand: #f7f2e4;
  --seaweed: #5c6b4f;
  --ink: #1b2b2c;

  --font-display: "Baloo 2", "Nunito", sans-serif;
  --font-body: "Nunito", sans-serif;

  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 12px;

  --shadow-soft: 0 18px 40px rgba(20, 35, 40, 0.18);
  --shadow-tight: 0 8px 18px rgba(20, 35, 40, 0.16);

  --max-width: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0 0 0.5em;
  line-height: 1.15;
  color: var(--ocean-deep);
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
}

h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 1em;
  max-width: 66ch;
}

a {
  color: var(--ocean-mid);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--sand);
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 1000;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

/* =========================================================
   Header / Navigation
   ========================================================= */

.site-header {
  background: var(--ocean-deep);
  position: relative;
  z-index: 20;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--sand);
  text-decoration: none;
  font-weight: 700;
}

.nav-brand svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--sand);
  text-decoration: none;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: rgba(255, 246, 233, 0.15);
}

/* =========================================================
   Wave dividers
   ========================================================= */

.wave-divider {
  display: block;
  width: 100%;
  height: auto;
  line-height: 0;
}

.wave-divider svg {
  width: 100%;
  height: 60px;
  display: block;
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  background: linear-gradient(180deg, var(--ocean-deep) 0%, var(--ocean-mid) 100%);
  color: var(--sand);
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 40px;
  position: relative;
  z-index: 2;
}

.hero-copy {
  flex: 1 1 420px;
}

.hero-figure {
  flex: 1 1 360px;
}

.hero-frame {
  background: var(--sand);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-soft);
  max-width: 460px;
  margin: 0 auto;
  transform: rotate(-2deg);
}

.hero-frame img {
  border-radius: calc(var(--radius-lg) - 8px);
  width: 100%;
}

.hero-copy h1 {
  color: var(--sand);
}

.hero-copy .lede {
  font-size: 1.15rem;
  color: rgba(255, 246, 233, 0.9);
  max-width: 48ch;
}

.hero-figure {
  position: relative;
}

.hero-bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-bubbles span {
  position: absolute;
  bottom: -40px;
  display: block;
  width: var(--size, 14px);
  height: var(--size, 14px);
  border-radius: 50%;
  background: rgba(255, 246, 233, 0.35);
  animation: rise 9s linear infinite;
  animation-delay: var(--delay, 0s);
  left: var(--x, 50%);
}

@keyframes rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(-520px) scale(1.4);
    opacity: 0;
  }
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 16px 30px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--coral);
  color: var(--sand);
  box-shadow: 0 12px 24px rgba(255, 107, 74, 0.4);
}

.btn-primary:hover {
  background: var(--coral-dark);
}

.btn-secondary {
  background: var(--sand);
  color: var(--ocean-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--sand);
  border: 2px solid rgba(255, 246, 233, 0.6);
}

.btn-note {
  display: block;
  margin-top: 10px;
  font-size: 0.85rem;
  color: rgba(255, 246, 233, 0.7);
}

/* =========================================================
   Book pages preview section
   ========================================================= */

.pages-section {
  background: var(--sand);
  padding: 20px 0 90px;
}

.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-heading .eyebrow-fish {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.pages-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: center;
  align-items: start;
  gap: 56px 48px;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-card {
  position: relative;
  margin: 0;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 10px;
  box-shadow: var(--shadow-soft);
  transform: rotate(var(--tilt, -3deg));
  transition: transform 0.25s ease;
  width: 100%;
  max-width: 320px;
}

.page-card:nth-child(even) {
  --tilt: 3deg;
}

.page-card:hover {
  transform: rotate(0deg) translateY(-6px);
}

.page-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-md) - 8px);
}

.page-card figcaption {
  padding: 10px 8px 4px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.35;
  color: var(--ocean-deep);
}

.page-card .tape {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 90px;
  height: 28px;
  background: rgba(255, 209, 102, 0.85);
  border: 1px solid rgba(6, 40, 61, 0.1);
}

.page-card:nth-child(even) .tape {
  transform: translateX(-50%) rotate(4deg);
  background: rgba(6, 174, 213, 0.55);
}

.pages-caption {
  text-align: center;
  margin: 8px auto 0;
  max-width: none;
  color: var(--ocean-mid);
  font-weight: 700;
}

.pages-caption:first-of-type {
  margin-top: 44px;
}

/* =========================================================
   Teaser / about-book section
   ========================================================= */

.teaser-section {
  background: var(--turquoise);
  color: var(--ink);
  position: relative;
}

.teaser-section .container {
  padding-top: 60px;
  padding-bottom: 76px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 760px;
  text-align: center;
}

.teaser-section h2 {
  color: var(--ocean-deep);
}

.teaser-section p {
  margin: 0 auto 1em;
  font-size: 1.1rem;
}

.teaser-facts {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.teaser-facts div {
  background: rgba(255, 246, 233, 0.55);
  border-radius: var(--radius-sm);
  padding: 14px 22px;
  font-weight: 700;
  font-family: var(--font-display);
}

/* =========================================================
   Final CTA band
   ========================================================= */

.cta-band {
  background: var(--ocean-deep);
  color: var(--sand);
  text-align: center;
  padding: 70px 24px;
}

.cta-band h2 {
  color: var(--sand);
}

.cta-band p {
  margin: 0 auto 28px;
  color: rgba(255, 246, 233, 0.85);
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  background: var(--ink);
  color: rgba(255, 246, 233, 0.75);
  padding: 36px 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-inner nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-inner a {
  color: rgba(255, 246, 233, 0.85);
  text-decoration: none;
  font-weight: 600;
  margin-left: 10px;
}

.footer-inner a:first-child {
  margin-left: 0;
}

.footer-inner a:hover {
  text-decoration: underline;
}

/* =========================================================
   Story page
   ========================================================= */

.story-hero {
  background: linear-gradient(180deg, var(--ocean-deep), var(--ocean-mid));
  color: var(--sand);
  padding: 56px 24px 40px;
  text-align: center;
}

.story-hero h1 {
  color: var(--sand);
}

.story-hero .lede {
  max-width: 60ch;
  margin: 0 auto;
  color: rgba(255, 246, 233, 0.9);
}

.story-wrap {
  background: var(--sand);
  padding: 56px 0 80px;
}

.story-paper {
  max-width: 720px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 64px);
  box-shadow: var(--shadow-soft);
}

.story-paper h2 {
  font-size: 1.5rem;
}

.story-paper p {
  max-width: 68ch;
  font-size: 1.08rem;
}

.story-figure {
  margin: 36px auto;
  max-width: 420px;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 10px;
  box-shadow: var(--shadow-tight);
}

.story-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-md) - 8px);
}

.story-figure figcaption {
  padding: 10px 6px 2px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--ocean-mid);
}

.story-divider {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 34px 0;
  color: var(--turquoise);
}

.legal-paper h2 {
  margin-top: 2em;
  font-size: 1.25rem;
  color: var(--ocean-mid);
}

.legal-paper h2:first-child {
  margin-top: 0;
}

.legal-paper p {
  font-size: 1rem;
}

.story-end {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 2px dashed rgba(6, 40, 61, 0.15);
  text-align: center;
}

.story-end p {
  margin: 0 auto 20px;
  max-width: 50ch;
}

/* =========================================================
   Author page
   ========================================================= */

.author-hero {
  background: linear-gradient(180deg, var(--ocean-deep), var(--ocean-mid));
  padding: 56px 24px 90px;
  text-align: center;
  color: var(--sand);
}

.author-hero h1 {
  color: var(--sand);
}

.author-hero .lede {
  max-width: 60ch;
  margin: 0 auto;
  color: rgba(255, 246, 233, 0.9);
}

.author-wrap {
  background: var(--sand);
  padding: 0 0 90px;
}

.author-card {
  max-width: 820px;
  margin: -60px auto 0;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: clamp(24px, 5vw, 48px);
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  align-items: flex-start;
}

.author-card img {
  border-radius: 50%;
  width: 200px;
  flex: 0 0 200px;
  box-shadow: var(--shadow-tight);
}

.author-card > div {
  flex: 1 1 320px;
  min-width: 0;
}

.author-card h2 {
  margin-top: 0;
}

.author-card img.author-book {
  border-radius: var(--radius-md);
  width: 240px;
  flex-basis: 240px;
  height: auto;
}

.author-note {
  margin-top: 28px;
  padding: 18px 22px;
  background: var(--sand);
  border-radius: var(--radius-sm);
  font-size: 0.98rem;
  color: var(--ocean-deep);
}

.author-quote {
  margin-top: 28px;
  padding: 20px 24px;
  background: var(--sand);
  border-left: 5px solid var(--coral);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ocean-deep);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 860px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
    padding-top: 40px;
  }

  .hero-copy,
  .hero-figure {
    flex: 1 1 auto;
  }

  .hero-copy .lede {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-figure {
    order: -1;
  }

  .author-card {
    flex-direction: column;
    text-align: center;
  }

  .author-card > div {
    flex: 1 1 auto;
  }

  .author-card img {
    width: 160px;
    flex-basis: 160px;
    margin: 0 auto;
  }

  .author-card img.author-book {
    width: 220px;
    flex-basis: auto;
  }

  .pages-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .author-quote {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .nav {
    justify-content: center;
    text-align: center;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================================================
   Reduced motion
   ========================================================= */

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

  .hero-bubbles span {
    animation: none;
    display: none;
  }

  .btn:hover {
    transform: none;
  }
}

/* =========================================================
   Fish cursor trail
   ========================================================= */

.fish-cursor-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.fish-cursor-layer .cursor-fish {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 14px;
  will-change: transform;
}
