/* Small Wave Games — site styles */

@font-face { font-family: "Unbounded"; src: url("fonts/unbounded-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("fonts/unbounded-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --sea: #0A3D5C;
  --deep: #072C43;
  --lagoon: #2EC4B6;
  --lagoon-ink: #0E7470;
  --foam: #EEF8F7;
  --sun: #FFD23F;
  --ink: #0B2A3C;
  --muted: #4A6676;
  --line: #CFE4E3;
  --surface: #FFFFFF;

  --bg: var(--foam);
  --text: var(--ink);
  --link: var(--lagoon-ink);

  --display: "Unbounded", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #06263A;
    --text: #E4F2F1;
    --muted: #9DBAC4;
    --line: #18435C;
    --surface: #0A3350;
    --link: var(--lagoon);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

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

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }

/* ---------- Header ---------- */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand img { height: 48px; width: auto; }
.nav { display: flex; gap: clamp(14px, 3vw, 28px); font-weight: 600; }
.nav a { color: inherit; text-decoration: none; }
.nav a:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--sea);
  color: var(--foam);
  overflow: hidden;
  isolation: isolate;
}
.hero .site-header { position: relative; z-index: 2; }
.hero-body {
  position: relative;
  z-index: 2;
  padding-top: clamp(48px, 9vw, 110px);
  padding-bottom: clamp(170px, 22vw, 250px);
}
.hero h1 { max-width: 11ch; }
.hero p.lede { max-width: 34rem; font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: #C9E3E6; margin: 24px 0 32px; }
.sun {
  position: absolute;
  z-index: 0;
  width: clamp(220px, 34vw, 440px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sun);
  right: clamp(-60px, 6vw, 120px);
  bottom: clamp(70px, 9vw, 120px);
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px;
  font: 700 1rem/1 var(--body);
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--sun); color: var(--deep); }
.btn-primary:hover { background: #FFDD66; }
.btn-ghost { color: var(--foam); box-shadow: inset 0 0 0 2px rgba(238, 248, 247, .55); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--foam); }

/* the sea at the bottom of the hero */
.sea { position: absolute; left: 0; right: 0; bottom: 0; height: clamp(150px, 19vw, 220px); z-index: 1; }
.sea .layer { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; }
.sea .layer svg { width: 100%; height: 100%; }
.sea .back { animation: drift 26s linear infinite; }
.sea .front { animation: drift 17s linear infinite reverse; height: 56%; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.buoys { position: absolute; inset: auto 0 0 0; height: clamp(150px, 19vw, 220px); z-index: 1; pointer-events: none; }
.buoy {
  position: absolute;
  width: clamp(48px, 6vw, 72px);
  bottom: var(--y);
  left: var(--x);
  animation: bob 3.6s ease-in-out infinite;
  animation-delay: var(--d);
  filter: drop-shadow(0 6px 0 rgba(7, 44, 67, .35));
}
.buoy svg { width: 100%; height: auto; transform: rotate(var(--r)); }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .sea .layer, .buoy { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Sections ---------- */
section { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { max-width: 40rem; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.125rem; margin-top: 14px; }

/* games list: a ship's log, one row per game */
.games { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--text); }
.game {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 8px 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.game .icon { width: 64px; }
.game h3 { margin-bottom: 4px; }
.game p { margin: 0; color: var(--muted); }
.status {
  font-weight: 600; font-size: .9rem;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(46, 196, 182, .16);
  color: var(--link);
  white-space: nowrap;
}
.status .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lagoon); margin-right: 8px; vertical-align: 1px; }
@media (max-width: 600px) {
  .game { grid-template-columns: 52px 1fr; }
  .game .icon { width: 52px; }
  .status { grid-column: 2; justify-self: start; }
}

/* studio */
.studio { background: var(--surface); }
.studio-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.studio-grid .copy p { font-size: 1.15rem; max-width: 36rem; }
.facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
@media (max-width: 800px) { .studio-grid { grid-template-columns: 1fr; } }

/* contact band */
.contact { background: var(--sun); color: var(--deep); text-align: center; }
.contact h2 { margin-bottom: 14px; }
.contact p { max-width: 32rem; margin: 0 auto 28px; font-size: 1.125rem; }
.mail {
  font: 700 clamp(1.1rem, 3.4vw, 2rem)/1.2 var(--display);
  color: var(--deep);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
  word-break: break-word;
}

/* footer */
.site-footer { background: var(--deep); color: #A9C8D0; padding: 40px 0; font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer img { height: 34px; width: auto; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer a { color: var(--foam); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Text pages (privacy, support) ---------- */
.page-header { background: var(--sea); color: var(--foam); }
.page-header .site-header { padding-bottom: 0; }
.page-title { padding-top: clamp(40px, 7vw, 72px); padding-bottom: clamp(48px, 7vw, 80px); }
.page-title p { color: #C9E3E6; margin: 14px 0 0; max-width: 36rem; }
.prose { max-width: 44rem; padding: clamp(40px, 6vw, 72px) var(--gutter); margin: 0 auto; }
.prose h2 { font-size: 1.35rem; margin: 2.2em 0 .6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.note {
  background: var(--surface);
  border-left: 4px solid var(--sun);
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin: 0 0 2em;
}
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--display); color: var(--link); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 0; color: var(--muted); }

/* small screens: keep the sun clear of the text */
@media (max-width: 640px) {
  .sun { width: 190px; right: -36px; bottom: 92px; }
  .hero-body { padding-bottom: 300px; }
  .brand img { height: 40px; }
  .nav { font-size: .95rem; gap: 14px; }
}
