/* The Lucky Golf Ball design system: tokens and shared components */

@font-face {
  font-family: "Calistoga";
  src: url("/assets/fonts/Calistoga-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --sky: #6bc8f1;
  --sky-deep: #5e9fd5;
  --lucky-yellow: #f9ea67;
  --ink: #000000;
  --ink-soft: #353329;
  --paper: #ffffff;
  --panel: #ffffff99;
  --fairway: #abd267;
  --green: #61913a;
  --forest: #2f4c2c;
  --ball-shade: #c8c9ca;
  --font-cover: Calistoga, Georgia, serif;
  --font-story: "Times New Roman", "Times New Roman MT Pro", Times, serif;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 32px;
  --space-4: 64px;
  --radius-panel: 12px;
  --radius-round: 50%;
  --shadow-glow: 0 0 32px 12px rgba(255, 255, 255, 0.85);
  --stroke-text: 2px;
  --stroke-heading: 4px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-story);
  font-size: 22px;
  line-height: 31px;
}

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

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-cover);
  font-weight: 400;
}

h2 { font-size: 32px; line-height: 40px; }
h3 { font-size: 24px; line-height: 32px; }

.eyebrow {
  margin: 0 0 var(--space-1);
  font-family: var(--font-cover);
  font-size: 24px;
  line-height: 32px;
}

/* CoverText: yellow Calistoga with an ink outline */
.cover-text {
  color: var(--lucky-yellow);
  -webkit-text-stroke: var(--stroke-text) var(--ink);
  paint-order: stroke fill;
}

.cover-text.heading { -webkit-text-stroke-width: var(--stroke-heading); }

/* StoryPanel: white at 60% over busy art */
.panel {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  background: var(--panel);
  border-radius: var(--radius-panel);
}

.panel p { margin: 0; }

.refrain {
  margin: 0;
  font-size: 22px;
  line-height: 30px;
  font-style: italic;
  text-align: right;
}

.button {
  display: inline-block;
  padding: 12px var(--space-3);
  font-family: var(--font-cover);
  font-size: 20px;
  line-height: 28px;
  color: var(--ink);
  text-decoration: none;
  background: var(--lucky-yellow);
  border: var(--stroke-text) solid var(--ink);
  border-radius: var(--radius-panel);
}

.button.secondary { background: var(--paper); }

.button:hover { text-decoration: underline; }

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

/* Softcover: flush square edges, a crease by the spine, soft shadow */
.book {
  position: relative;
  display: block;
  line-height: 0;
  border-radius: 1px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.25),
    6px 10px 22px rgba(0, 0, 0, 0.28);
}

.book::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5%;
  background: linear-gradient(to right,
    rgba(0, 0, 0, 0.18),
    rgba(0, 0, 0, 0.04) 55%,
    rgba(0, 0, 0, 0.16) 72%,
    rgba(255, 255, 255, 0.22) 80%,
    rgba(255, 255, 255, 0) 100%);
}

.book::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.10) 55%,
    rgba(255, 255, 255, 0) 70%);
}

.bounce { animation: bounce 900ms ease-out 300ms 1 both; }

@keyframes bounce {
  0%   { transform: translateY(0); }
  35%  { transform: translateY(-28px); }
  65%  { transform: translateY(0); }
  82%  { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .bounce { animation: none; }
}
