/* ==========================================================================
   TECHnatin — Thoughtful Games. Peaceful Moments.
   Design system: calm mist blues, warm cream, soft blush, deep lake teal.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Color */
  --ink: #26343f;
  --ink-soft: #55676f;
  --ink-faint: #7d8d95;
  --cream: #faf7f0;
  --card: #fffdf8;
  --line: #e9e2d3;
  --blush: #f7ece4;
  --mist: #dce6ea;
  --deep: #3d5f72;
  --deep-dark: #32505f;
  --gold: #e7c78c;
  --link: #38708b;
  --focus: #2f6f8f;

  /* Type */
  --font-display: "Sora", "Segoe UI", sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;

  /* Rhythm */
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --container: 1080px;
  --shadow-card: 0 2px 6px rgba(48, 66, 78, 0.05), 0 14px 34px rgba(48, 66, 78, 0.08);
  --shadow-lift: 0 4px 10px rgba(48, 66, 78, 0.08), 0 22px 44px rgba(48, 66, 78, 0.13);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
  color: var(--ink);
}

p { margin: 0 0 1em; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--deep);
  color: #f4f9fb;
  box-shadow: 0 6px 16px rgba(61, 95, 114, 0.28);
}
.btn-primary:hover { background: var(--deep-dark); }

.btn-ghost {
  background: transparent;
  color: var(--deep);
  border-color: rgba(61, 95, 114, 0.45);
}
.btn-ghost:hover { background: rgba(61, 95, 114, 0.08); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 240, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(233, 226, 211, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.site-nav a {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.site-nav a:hover {
  color: var(--ink);
  background: rgba(61, 95, 114, 0.07);
  text-decoration: none;
}
.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: rgba(61, 95, 114, 0.1);
}

.header-cta { flex: none; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  isolation: isolate;
}
.hero-art {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-art svg {
  width: 100%;
  height: 100%;
}

.hero-inner {
  padding: clamp(64px, 10vw, 130px) 24px clamp(80px, 12vw, 150px);
  max-width: var(--container);
  margin-inline: auto;
}
.hero-copy { max-width: 30rem; }

.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.6rem);
  font-weight: 700;
  margin-bottom: 0.55em;
}
.hero-tagline {
  font-size: 1.15rem;
  color: #3d505c;
  max-width: 24rem;
  margin-bottom: 2em;
}

/* Store badges */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: #1b242b;
  color: #fff;
  border-radius: 12px;
  padding: 9px 18px 9px 14px;
  line-height: 1.15;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 14px rgba(27, 36, 43, 0.25);
}
.store-badge:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(27, 36, 43, 0.32);
}
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge .badge-text { display: flex; flex-direction: column; }
.store-badge .badge-small {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}
.store-badge .badge-big {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 38px;
}
.section-head h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.section-link {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}
.section-link::after { content: " \2192"; }

.section-title-center {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 48px;
}

/* ---------- Game cards ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 26px;
}

.game-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.game-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lift);
}

.game-art {
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 1;
  margin-bottom: 18px;
}
.game-art img { width: 100%; height: 100%; object-fit: cover; }

.game-card h3 { font-size: 1.22rem; margin-bottom: 6px; }
.game-desc {
  font-size: 0.95rem;
  color: var(--ink-soft);
  flex-grow: 1;
  margin-bottom: 18px;
}

.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.game-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}
.game-platforms { display: flex; gap: 12px; }
.game-platforms svg { width: 18px; height: 18px; }
.game-platforms .apple { color: #303b43; }

/* Featured (games page) rows */
.game-feature {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 42px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-card);
}
.game-feature + .game-feature { margin-top: 30px; }
.game-feature .game-art { margin: 0; }
.game-feature h3 { font-size: 1.5rem; }
.game-feature .store-badges { margin-top: 18px; }
.game-feature .store-badge { padding: 7px 15px 7px 12px; }
.game-feature .store-badge svg { width: 21px; height: 21px; }
.game-feature .store-badge .badge-big { font-size: 0.95rem; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.feature-tags li {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--deep);
  background: rgba(61, 95, 114, 0.09);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
}

/* ---------- Why / value props ---------- */
.band-blush { background: var(--blush); }

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}
.value-item {
  text-align: center;
  padding: 12px 22px;
  position: relative;
}
@media (min-width: 900px) {
  .value-item + .value-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18%;
    height: 64%;
    width: 1px;
    background: rgba(61, 95, 114, 0.18);
  }
}
.value-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 253, 248, 0.85);
  border: 1px solid rgba(61, 95, 114, 0.16);
  color: var(--deep);
}
.value-icon svg { width: 26px; height: 26px; }
.value-item h3 { font-size: 1.05rem; margin-bottom: 8px; }
.value-item p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }

/* ---------- Newsletter band ---------- */
.band-deep {
  position: relative;
  background: linear-gradient(175deg, #46687c 0%, var(--deep) 45%, #35586c 100%);
  color: #eef4f6;
  overflow: hidden;
}
.band-deep h2 { color: #fff; }
.band-deep .trees {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 100%;
  width: auto;
  opacity: 0.35;
  pointer-events: none;
}

.newsletter-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
}
.newsletter-copy p { color: #cfdde4; margin: 0; }

.newsletter-form { position: relative; }
.newsletter-field {
  display: flex;
  background: #fdfbf6;
  border-radius: var(--radius-pill);
  padding: 5px;
  box-shadow: 0 10px 26px rgba(20, 38, 48, 0.28);
}
.newsletter-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
}
.newsletter-field input:focus { outline: none; }
.newsletter-field input::placeholder { color: var(--ink-faint); }
.newsletter-field .btn { flex: none; }
.newsletter-note {
  font-size: 0.85rem;
  color: #b9ccd5;
  margin: 12px 0 0 18px;
}
.newsletter-status {
  margin: 12px 0 0 18px;
  font-size: 0.95rem;
  font-weight: 600;
}
.newsletter-status[data-state="ok"] { color: #cdeed3; }
.newsletter-status[data-state="error"] { color: #ffd9c9; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--cream);
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand p { color: var(--ink-soft); max-width: 17rem; }
.footer-social { display: flex; gap: 16px; margin-top: 6px; }
.footer-social a {
  color: var(--ink-soft);
  transition: color 0.15s ease, transform 0.15s ease;
}
.footer-social a:hover { color: var(--deep); transform: translateY(-2px); }
.footer-social svg { width: 20px; height: 20px; }

.footer-col h3 {
  font-size: 0.98rem;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li + li { margin-top: 10px; }
.footer-col a { color: var(--ink-soft); }
.footer-col a:hover { color: var(--ink); }

.footer-price p { margin: 0 0 4px; color: var(--ink-soft); }
.footer-price .big-price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}
.footer-price .platform-icons { display: flex; gap: 14px; margin-top: 8px; }
.footer-price .platform-icons svg { width: 22px; height: 22px; color: var(--ink-soft); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.88rem;
}
.footer-bottom p { margin: 0; }

/* ---------- Page header (inner pages) ---------- */
.page-header {
  background:
    radial-gradient(120% 160% at 85% -30%, rgba(231, 199, 140, 0.35) 0%, rgba(231, 199, 140, 0) 45%),
    linear-gradient(180deg, #cfdde4 0%, #e6edf0 60%, var(--cream) 100%);
  padding: clamp(52px, 8vw, 90px) 0 clamp(40px, 6vw, 64px);
}
.page-header h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); margin-bottom: 0.35em; }
.page-header .lede {
  font-size: 1.13rem;
  color: #455964;
  max-width: 34rem;
  margin: 0;
}

/* ---------- Prose (blog posts, legal) ---------- */
.prose {
  max-width: 42rem;
  margin-inline: auto;
}
.prose h2 { font-size: 1.45rem; margin-top: 2em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 1em; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--gold);
  color: var(--ink-soft);
  font-style: italic;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.post-meta {
  font-size: 0.9rem;
  color: var(--ink-faint);
  margin-bottom: 2em;
}

/* ---------- Blog cards ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
}
.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.post-card .post-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--deep);
  margin-bottom: 12px;
}
.post-card h2 { font-size: 1.25rem; margin-bottom: 10px; }
.post-card h2 a { color: var(--ink); }
.post-card p { font-size: 0.95rem; color: var(--ink-soft); flex-grow: 1; }
.post-card .post-meta { margin: 0; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 46rem; margin-inline: auto; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.faq-item summary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  padding: 18px 52px 18px 22px;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--deep);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-body { padding: 0 22px 20px; color: var(--ink-soft); }
.faq-body p:last-child { margin-bottom: 0; }

/* ---------- Contact cards ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 46rem;
  margin-inline: auto;
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.contact-card .value-icon { margin-bottom: 16px; }
.contact-card h3 { font-size: 1.1rem; }
.contact-card p { font-size: 0.93rem; color: var(--ink-soft); }

/* ---------- About page ---------- */
.about-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.about-art {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}
.stat .num {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--deep);
}
.stat .label { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- CTA strip ---------- */
.cta-strip { text-align: center; }
.cta-strip h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.cta-strip p { color: var(--ink-soft); max-width: 30rem; margin: 0 auto 28px; }

/* ---------- 404 ---------- */
.error-page {
  text-align: center;
  padding: clamp(70px, 12vw, 140px) 24px;
}
.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 700;
  color: var(--mist);
  text-shadow: 0 2px 0 rgba(61, 95, 114, 0.15);
  line-height: 1;
  margin-bottom: 0.2em;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .game-card, .post-card, .store-badge { transition: none; }
}
/* If JS never runs, never hide content */
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .newsletter-inner { grid-template-columns: 1fr; gap: 26px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .game-feature { grid-template-columns: 1fr; gap: 26px; padding: 26px; }
  .game-feature .game-art { max-width: 320px; }
  .about-split { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 720px) {
  .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
    gap: 2px;
    box-shadow: 0 18px 30px rgba(48, 66, 78, 0.12);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 14px; font-size: 1rem; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .newsletter-field { flex-direction: column; background: transparent; box-shadow: none; padding: 0; gap: 10px; }
  .newsletter-field input {
    background: #fdfbf6;
    border-radius: var(--radius-pill);
    padding: 13px 20px;
    box-shadow: 0 10px 26px rgba(20, 38, 48, 0.28);
  }
  .newsletter-field .btn { justify-content: center; }
  .stat-row { grid-template-columns: 1fr; }
}
