/* Chill Tiles — Tide Pools palette + Fraunces / Sora */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces_72pt-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

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

@font-face {
  font-family: "Sora";
  src: url("/fonts/Sora-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --lake-top: #0a2a3f;
  --lake-bottom: #134e5e;
  --tile: #2a7a7a;
  --accent: #5eead4;
  --accent-ink: #0a2a3f;
  --text: #e8f6f3;
  --muted: #8fbfb8;
  --panel: rgba(8, 32, 41, 0.86);
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Sora", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  background: var(--lake-top);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #fff;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: var(--accent-ink);
}

/* —— Shared chrome —— */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem);
  max-width: calc(var(--max) + 5rem);
  margin: 0 auto;
  width: 100%;
}

.brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  font-size: 0.9rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
}

.site-footer {
  padding: 2.5rem clamp(1.25rem, 4vw, 2.5rem) 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #071820;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: baseline;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

/* —— Buttons —— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.35rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.25s ease, color 0.25s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: #fff;
  color: var(--accent-ink);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.btn svg {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

/* —— Landing hero —— */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 70% 35%, rgba(94, 234, 212, 0.22), transparent 60%),
    linear-gradient(180deg, var(--lake-top) 0%, var(--lake-bottom) 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 72%, rgba(255, 255, 255, 0.07) 0 1px, transparent 2px),
    radial-gradient(circle at 42% 28%, rgba(255, 255, 255, 0.05) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 64%, rgba(255, 255, 255, 0.06) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.04) 0 1px, transparent 2px);
  background-size: 180px 180px, 220px 220px, 160px 160px, 240px 240px;
  opacity: 0.9;
  pointer-events: none;
  animation: drift 28s linear infinite;
}

@keyframes drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 80px 120px, -60px 40px, 40px -90px, -30px 70px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
  .phone-stage { animation: none; }
}

.hero-grid {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: 7.5rem 0 3.5rem;
  display: grid;
  gap: 2.5rem;
  align-items: end;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
    gap: 3rem;
    padding: 8rem 0 4rem;
    align-items: center;
    min-height: calc(100svh - 1rem);
  }
}

.hero-copy {
  max-width: 34rem;
}

.hero-brand {
  margin: 0 0 1rem;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.8rem, 7vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.hero-line {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  max-width: 28rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.phone-stage {
  justify-self: center;
  width: min(100%, 320px);
  filter: drop-shadow(0 28px 48px rgba(0, 0, 0, 0.45));
  animation: float 5.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(-2deg); }
}

@media (min-width: 900px) {
  .phone-stage {
    width: min(100%, 380px);
    justify-self: end;
  }
}

.phone {
  position: relative;
  border-radius: 2.1rem;
  padding: 0.55rem;
  background: linear-gradient(150deg, #6b7480, #2a2f36 30%, #1c2026 70%, #59616c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.phone-screen {
  border-radius: 1.65rem;
  overflow: hidden;
  background: #000;
  aspect-ratio: 720 / 1564;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* —— Sections —— */

.section {
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 4vw, 2.5rem);
  position: relative;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section h2 {
  margin: 0 0 0.75rem;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.section .lede {
  margin: 0 0 2rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.flow {
  background:
    radial-gradient(ellipse 60% 50% at 20% 0%, rgba(94, 234, 212, 0.12), transparent 55%),
    linear-gradient(180deg, #0c3348 0%, #0a2436 100%);
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 220px);
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.rail::-webkit-scrollbar {
  height: 6px;
}

.rail::-webkit-scrollbar-thumb {
  background: rgba(94, 234, 212, 0.35);
  border-radius: 999px;
}

.rail figure {
  margin: 0;
  scroll-snap-align: start;
}

.rail .phone {
  border-radius: 1.5rem;
  padding: 0.4rem;
}

.rail .phone-screen {
  border-radius: 1.2rem;
}

.rail figcaption {
  margin-top: 0.7rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.moments {
  background: linear-gradient(180deg, #0a2436 0%, var(--lake-top) 100%);
}

.moment-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .moment-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.5rem;
    align-items: center;
  }
}

.moment-copy h2 {
  margin-bottom: 0.85rem;
}

.moment-copy p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.moment-visual {
  justify-self: center;
  width: min(100%, 280px);
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.4));
}

.cta-band {
  padding: clamp(3rem, 7vw, 5rem) clamp(1.25rem, 4vw, 2.5rem) clamp(4rem, 9vw, 6rem);
  background:
    radial-gradient(ellipse 70% 80% at 50% 100%, rgba(94, 234, 212, 0.18), transparent 55%),
    linear-gradient(180deg, var(--lake-top), #071820);
  text-align: center;
}

.cta-band h2 {
  margin: 0 0 0.75rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
}

.cta-band p {
  margin: 0 auto 1.75rem;
  max-width: 28rem;
  color: var(--muted);
}

/* —— Legal pages —— */

.legal-page {
  background:
    radial-gradient(ellipse 70% 40% at 50% -10%, rgba(94, 234, 212, 0.14), transparent 55%),
    linear-gradient(180deg, var(--lake-top), var(--lake-bottom) 40%, #071820);
}

.legal-header {
  position: relative;
  padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: calc(var(--max) + 5rem);
  margin: 0 auto;
}

.legal {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem clamp(1.25rem, 4vw, 2.5rem) 4rem;
}

.legal h1 {
  margin: 0 0 0.5rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: -0.02em;
}

.legal .updated {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.legal h2 {
  margin: 2rem 0 0.65rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
}

.legal p,
.legal li {
  color: #c5ddd8;
  font-size: 0.98rem;
}

.legal ul {
  padding-left: 1.2rem;
}

.legal li {
  margin-bottom: 0.4rem;
}

.legal strong {
  color: var(--text);
  font-weight: 600;
}

/* —— 404 —— */

.not-found {
  min-height: 100svh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(180deg, var(--lake-top), var(--lake-bottom));
}

.not-found h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2.5rem;
  margin: 0 0 0.75rem;
}

.not-found p {
  color: var(--muted);
  margin: 0 0 1.5rem;
}
