/* aamupolku.com — sea glass calm */
:root {
  --sea: #E4F2EF;
  --teal: #0F3D3E;
  --apricot: #F2A65A;
  --ink: #14221F;
  --white: #FFFFFF;
  --radius: 32px;
  --radius-sm: 18px;
  --shadow: 0 18px 48px rgba(15, 61, 62, 0.12);
  --font-display: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --font-ui: "Outfit", system-ui, sans-serif;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 400;
  color: var(--ink);
  background: var(--sea);
  line-height: 1.65;
  overflow-x: hidden;
}

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

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--apricot);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--teal);
  margin: 0 0 0.6em;
}

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

h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(228, 242, 239, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(15, 61, 62, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--teal);
}

.brand img {
  width: 44px;
  height: 44px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  border: 0;
  background: var(--white);
  color: var(--teal);
  width: 48px;
  height: 48px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 1.35rem;
  box-shadow: var(--shadow);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

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

.auth-cluster {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: 0.5rem;
}

[data-auth="guest"] {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

[data-auth="user"] {
  display: none;
}

body.is-authed [data-auth="guest"] {
  display: none !important;
}

body.is-authed [data-auth="user"] {
  display: inline-flex !important;
  align-items: center;
  gap: 0.65rem;
}

.player-chip {
  font-size: 0.9rem;
  color: var(--teal);
  background: var(--white);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.85rem 1.45rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: var(--apricot);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(242, 166, 90, 0.35);
}

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

.btn-ghost {
  background: var(--white);
  color: var(--teal);
  box-shadow: var(--shadow);
}

.btn-ghost:hover {
  color: var(--teal);
}

.btn-teal {
  background: var(--teal);
  color: var(--white);
}

.btn-teal:hover {
  color: var(--white);
  background: #164849;
}

.btn-text {
  background: transparent;
  color: var(--teal);
  padding: 0.4rem 0.6rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-band {
  position: relative;
  min-height: min(78vh, 720px);
  display: grid;
  align-items: end;
  overflow: hidden;
  border-radius: 0 0 var(--radius) var(--radius);
}

.hero-band img,
.closing-band img,
.story-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.hero-band img {
  position: absolute;
}

.band-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 34, 31, 0.15) 0%,
    rgba(15, 61, 62, 0.72) 100%
  );
}

.hero-copy,
.closing-copy,
.story-copy {
  position: relative;
  z-index: 1;
  color: var(--white);
  padding: clamp(2.5rem, 6vw, 5rem) 0;
  max-width: 34rem;
}

.hero-copy h1,
.closing-copy h2,
.story-copy h2 {
  color: var(--white);
}

.hero-copy p,
.closing-copy p,
.story-copy p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.08rem;
}

.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section-quiet {
  background: var(--sea);
}

.section-soft {
  background: var(--white);
  border-radius: var(--radius);
  margin: 0 1.25rem;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.lead {
  font-size: 1.12rem;
  max-width: 40rem;
  color: rgba(20, 34, 31, 0.86);
}

.game-band {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
  min-height: 280px;
}

.game-band:nth-child(even of .game-band),
.game-band.reverse {
  grid-template-columns: 0.85fr 1.15fr;
}

.game-band.reverse .game-media {
  order: 2;
}

.game-band.reverse .game-body {
  order: 1;
}

.game-media {
  min-height: 260px;
}

.game-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 260px;
}

.game-body {
  padding: clamp(1.6rem, 3vw, 2.6rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.game-body p {
  margin: 0;
  color: rgba(20, 34, 31, 0.82);
}

.reasons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.reason {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 1.5rem 1.35rem;
  box-shadow: var(--shadow);
}

.reason h3 {
  margin-bottom: 0.45rem;
}

.reason p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(20, 34, 31, 0.8);
}

.story-band,
.closing-band {
  position: relative;
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  align-items: end;
  margin: 0 1.25rem;
}

.prose {
  max-width: 42rem;
}

.prose h2 {
  margin-top: 2rem;
}

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

.prose li {
  margin-bottom: 0.45rem;
}

.contact-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: var(--shadow);
  max-width: 34rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--teal);
}

.form-field input,
.form-field textarea {
  font-family: var(--font-ui);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 61, 62, 0.18);
  background: var(--sea);
  color: var(--ink);
  width: 100%;
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
}

.form-check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0.75rem 0 1.1rem;
  font-size: 0.92rem;
}

.form-error {
  color: #8a2f2f;
  font-size: 0.9rem;
  min-height: 1.2em;
  margin-bottom: 0.6rem;
}

#contact-ok {
  display: none;
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--sea);
  color: var(--teal);
}

.site-footer {
  margin-top: 3rem;
  background: var(--teal);
  color: rgba(255, 255, 255, 0.88);
  padding: 3rem 0 2rem;
  border-radius: var(--radius) var(--radius) 0 0;
}

.site-footer a {
  color: var(--white);
}

.site-footer a:hover {
  color: var(--apricot);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand img {
  width: 40px;
  height: 40px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-note {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.92rem;
  max-width: 48rem;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 61, 62, 0.55);
}

.overlay.is-open {
  display: flex;
}

.modal-card {
  width: min(100%, 420px);
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
}

.modal-card h2 {
  margin-bottom: 0.35rem;
}

.modal-card .modal-lead {
  color: rgba(20, 34, 31, 0.75);
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
}

.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  border: 0;
  background: var(--sea);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--teal);
  font-size: 1.2rem;
  line-height: 1;
}

.modal-switch {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.92rem;
}

#age-gate .modal-card {
  text-align: center;
  max-width: 460px;
}

#age-gate .age-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

#cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: none;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.25rem;
  max-width: 520px;
  margin-inline: auto;
}

#cookie-banner.is-open {
  display: block;
}

#cookie-banner p {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

@media (max-width: 960px) {
  .reasons {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .game-band,
  .game-band.reverse {
    grid-template-columns: 1fr;
  }

  .game-band.reverse .game-media,
  .game-band.reverse .game-body {
    order: initial;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: fixed;
    inset: 72px 1rem auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 1rem;
    box-shadow: var(--shadow);
    gap: 0.35rem;
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .auth-cluster {
    margin-left: 0;
    flex-wrap: wrap;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(15, 61, 62, 0.1);
  }

  .reasons {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-soft,
  .story-band,
  .closing-band {
    margin-inline: 0.85rem;
  }

  .wrap {
    width: min(100% - 1.7rem, var(--max));
  }
}
