:root {
  --bg: #1E1B2E;
  --bg-glow: #322A4A;
  --panel: #2A2440;
  --logo: #F5E6C8;
  --accent: #F4B860;
  --accent-glow: rgba(244, 184, 96, 0.45);
  --text: #F0EBE0;
  --text-dim: rgba(240, 235, 224, 0.55);
  --field-bg: rgba(255, 255, 255, 0.04);
  --field-border: rgba(245, 230, 200, 0.15);
  --field-border-focus: rgba(244, 184, 96, 0.6);
  --error: #E96D6D;
  --success: #6FDC8C;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(ellipse 900px 700px at 10% 10%, rgba(95, 75, 145, 0.42) 0%, transparent 65%),
    radial-gradient(ellipse 800px 600px at 95% 95%, rgba(180, 120, 70, 0.18) 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
}

.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 120px;
  padding: 48px 64px;
}

.logo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* --- Logo: inline SVG, paths re-coloured via attribute selectors --- */
.fish-mount,
.text-mount { display: block; }
.fish-tilt   { display: block; width: 100%; height: 100%; }
.fish-mount svg,
.text-mount svg {
  width: 100%;
  height: 100%;
  display: block;
}
.fish-mount svg path[fill="black"],
.text-mount svg path[fill="black"] {
  fill: var(--logo);
}
/* "white" parts of the fish (eye, fin, mouth highlight) become cutouts. */
.fish-mount svg path[fill="white"] {
  fill: var(--bg);
}

/* Two-layer swim: outer container bobs vertically; inner layer tilts.
   Both share the same period but the tilt has a negative animation-delay,
   so the nose leads the body — fish initiates the turn before it actually
   dives/rises, which reads as natural locomotion rather than a metronome. */
.fish-mount {
  width: 160px;
  height: 107px;
  animation: bob 4.5s ease-in-out infinite;
  will-change: transform;
}
.fish-tilt {
  /* Pivot near the fish's nose (left edge) so rotation feels like the tail
     waving, not the whole body spinning around its mass. */
  transform-origin: 12% 55%;
  animation: tilt 4.5s ease-in-out -0.5s infinite;
  will-change: transform;
}

@keyframes bob {
  0%, 100% { transform: translateY(-6px); }
  50%      { transform: translateY(6px);  }
}
@keyframes tilt {
  0%, 100% { transform: rotate(9deg);  }
  50%      { transform: rotate(-9deg); }
}

.text-mount {
  width: 220px;
  height: 120px;
}

.slogan {
  font-family: "Fredoka", sans-serif;
  font-weight: 400;
  font-size: 15px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
  margin-top: 6px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 280px;
}

.actions a {
  display: inline-block;
  font-family: "Fredoka", sans-serif;
  font-weight: 500;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease;
  cursor: pointer;
}

.actions a:hover {
  color: var(--accent);
  transform: translateX(6px);
  text-shadow: 0 0 18px var(--accent-glow);
}

.actions a.primary {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.actions a.primary:hover {
  text-shadow: 0 0 24px var(--accent-glow);
}

/* ----- Modal ----- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 12, 25, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-panel {
  background: var(--panel);
  border: 1px solid rgba(245, 230, 200, 0.08);
  border-radius: 18px;
  padding: 32px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);  /* dvh = dynamic viewport, accounts for mobile chrome UI */
  overflow-y: auto;
  position: relative;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.25s ease;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.modal-backdrop.open .modal-panel {
  transform: scale(1) translateY(0);
}
.modal-close {
  /* Sticky + float so the close button stays at the panel's top-right
     while content scrolls beneath it. Background matches the panel so
     scrolled text doesn't bleed through. */
  position: sticky;
  top: 0;
  float: right;
  margin: -8px -8px 0 0;
  width: 36px;
  height: 36px;
  border: 0;
  background: var(--panel);
  color: var(--text-dim);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}
.modal-title {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--logo);
  margin-bottom: 6px;
  padding-right: 32px;
}
.modal-subtitle {
  font-family: "Fredoka", sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 22px;
  line-height: 1.5;
}

.form-row { margin-bottom: 14px; }
.form-row label {
  display: block;
  font-family: "Fredoka", sans-serif;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.form-row input,
.form-row textarea {
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.form-row textarea {
  min-height: 110px;
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--field-border-focus);
  background: rgba(255, 255, 255, 0.06);
}
.form-submit {
  display: inline-block;
  margin-top: 8px;
  background: var(--accent);
  color: var(--bg);
  border: 0;
  border-radius: 10px;
  padding: 12px 24px;
  font-family: "Fredoka", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.form-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px var(--accent-glow);
}
.form-submit:disabled {
  opacity: 0.6;
  cursor: default;
}
.form-status {
  margin-top: 12px;
  font-family: "Fredoka", sans-serif;
  font-size: 14px;
  min-height: 20px;
}
.form-status.error { color: var(--error); }
.form-status.success { color: var(--success); }

/* ----- PP modal: wider panel + readable long-text styling ----- */
.modal-panel-wide { max-width: 720px; }
.pp-meta {
  font-family: "Fredoka", sans-serif;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.pp-body {
  font-family: "Inter", sans-serif;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text);
}
.pp-body h3 {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: var(--logo);
  margin: 28px 0 10px;
}
.pp-body h3:first-of-type { margin-top: 8px; }
.pp-body p { margin-bottom: 12px; }
.pp-body ul {
  margin: 6px 0 14px 22px;
  padding: 0;
}
.pp-body li { margin-bottom: 6px; }
.pp-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 184, 96, 0.35);
  transition: border-color 0.15s ease;
}
.pp-body a:hover { border-color: var(--accent); }
.pp-body strong { color: var(--logo); font-weight: 600; }

@media (max-width: 768px) {
  .stage {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 6vh 24px 6vh;
    gap: 0;
  }
  .fish-mount { width: 120px; height: 80px; }
  .text-mount { width: 160px; height: 88px; }
  .slogan { font-size: 14px; }
  .actions {
    gap: 12px;
    align-items: center;
    min-width: 0;
    margin: auto 0;       /* centre the actions block in remaining space */
  }
  .actions a { text-align: center; }
  .actions a:hover { transform: none; }
  .modal-backdrop { padding: 12px; }
  .modal-panel {
    padding: 22px 18px;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 14px;
  }
  .modal-title { font-size: 19px; }
  .pp-body { font-size: 14px; }
  .pp-body h3 { font-size: 16px; margin: 22px 0 8px; }
}

/* Don't let modal scroll bleed into the page (could trigger pull-to-refresh). */
.modal-backdrop { overscroll-behavior: contain; }
.modal-panel    { overscroll-behavior: contain; }
