/* =========================================================================
   Cat Tower Rescue — landing site
   Warm, candy-bright casual-game look. Palette mirrors the in-game Palette.
   ========================================================================= */

:root {
  /* Brand (from lib/theme/palette.dart) */
  --accent: #ff7a59;
  --accent-dark: #e85c3a;
  --star: #ffc22e;
  --star-deep: #ff9e1b;
  --sky-top: #bfe8fb;
  --sky-bottom: #8ed0f0;
  --night-top: #2b2d54;
  --night-bottom: #4a4e86;
  --panel: #fff6e9;
  --ink: #3a2e25;
  --ink-soft: #6b5a4c;
  --success: #4caf7d;
  --basket: #d79a55;
  --basket-dark: #9c6326;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 18px 40px -18px rgba(58, 46, 37, 0.45);
  --shadow-sm: 0 8px 20px -10px rgba(58, 46, 37, 0.4);
  --maxw: 1120px;

  --font-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--panel);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .display { font-family: var(--font-display); line-height: 1.1; }

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

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

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  font-size: 0.78rem; color: var(--accent-dark);
  background: #fff; border: 2px solid #ffd9c9;
  padding: 6px 14px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

/* ---------- Buttons ---------------------------------------------------- */
.btn {
  --b: var(--accent);
  --bd: var(--accent-dark);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  color: #fff; background: var(--b);
  padding: 14px 26px; border: none; border-radius: 999px; cursor: pointer;
  box-shadow: 0 6px 0 var(--bd), var(--shadow-sm);
  transition: transform .08s ease, box-shadow .08s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--bd), var(--shadow); text-decoration: none; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--bd); }
.btn.ghost { --b: #fff; color: var(--accent-dark); box-shadow: 0 6px 0 #f0dcc9, var(--shadow-sm); }

/* App store badges */
.stores { display: flex; flex-wrap: wrap; gap: 14px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff;
  padding: 11px 20px 11px 18px; border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .1s ease, box-shadow .1s ease;
  text-decoration: none;
}
.store-badge:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.store-badge svg { width: 30px; height: 30px; flex: none; }
.store-badge .label { text-align: left; line-height: 1.15; }
.store-badge .label small { display: block; font-size: 0.66rem; opacity: 0.82; letter-spacing: 0.03em; }
.store-badge .label strong { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; }

/* ---------- Top nav ---------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(8px);
  background: rgba(255, 246, 233, 0.82);
  border-bottom: 1px solid #f1e2d0;
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--ink); }
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--ink-soft); font-weight: 700; }
.nav-links a:hover { color: var(--accent-dark); text-decoration: none; }
.nav .btn { padding: 9px 18px; font-size: 0.95rem; box-shadow: 0 4px 0 var(--accent-dark); }

/* Language switcher (TR | EN) */
.lang {
  display: inline-flex; border: 2px solid #ffd9c9; border-radius: 999px;
  overflow: hidden; font-family: var(--font-display); font-weight: 600; font-size: 0.88rem;
}
.lang a { padding: 5px 12px; color: var(--ink-soft); text-decoration: none; line-height: 1.4; }
.lang a:hover { text-decoration: none; background: #fff3e6; }
.lang a.on { background: var(--accent); color: #fff; }

@media (max-width: 720px) { .nav-links > a:not(.btn) { display: none; } }

/* ---------- Hero ------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, #ffd7a1 0%, transparent 60%),
    linear-gradient(170deg, #ffb27a 0%, var(--accent) 48%, var(--accent-dark) 100%);
  color: #fff;
  padding: 70px 0 96px;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 70px;
  background: var(--panel);
  clip-path: polygon(0 100%, 100% 100%, 100% 35%, 0 100%);
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.2rem); margin: 18px 0 12px; text-shadow: 0 3px 0 rgba(0,0,0,0.08); }
.hero h1 .pop { color: var(--star); text-shadow: 0 3px 0 var(--star-deep); }
.hero p.lead { font-size: 1.18rem; max-width: 30ch; opacity: 0.97; font-weight: 600; }
.hero .cta { margin-top: 26px; }
.hero .cta small { display: block; margin-top: 12px; font-weight: 700; opacity: 0.9; font-size: 0.9rem; }

/* Floating phone / icon art */
.hero-art { position: relative; display: flex; justify-content: center; }
.device {
  width: min(330px, 78%); aspect-ratio: 1/1;
  background: #fff; border-radius: 44px;
  box-shadow: 0 40px 70px -30px rgba(0,0,0,0.5), inset 0 0 0 6px rgba(255,255,255,0.6);
  padding: 16px; position: relative;
  transform: rotate(-3deg);
  animation: bob 5s ease-in-out infinite;
}
.device img { width: 100%; border-radius: 30px; }
@keyframes bob { 0%,100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-3deg) translateY(-14px); } }

/* swinging rope + mini cat above the device */
.swing { position: absolute; top: -38px; left: 16%; transform-origin: top center; animation: swing 3.4s ease-in-out infinite; }
.swing .rope { width: 4px; height: 64px; margin: 0 auto; background: repeating-linear-gradient(180deg, var(--rope, #ead296), var(--rope, #ead296) 6px, #c2a35f 6px, #c2a35f 10px); border-radius: 4px; }
.swing .knot { width: 46px; height: 46px; margin: -4px auto 0; background: #fff; border-radius: 50%; display: grid; place-items: center; box-shadow: var(--shadow-sm); font-size: 26px; }
@keyframes swing { 0%,100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }

/* sprinkled stars */
.star-deco { position: absolute; color: var(--star); filter: drop-shadow(0 2px 0 var(--star-deep)); opacity: 0.95; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.25); opacity: 1; } }

/* ---------- Section scaffolding --------------------------------------- */
section.block { padding: 78px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 14px 0 10px; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; font-weight: 600; margin: 0; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: #fff; border: 2px solid #f4e6d6; border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.feature .ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; margin-bottom: 14px; background: #fff3e6; }
.feature h3 { font-size: 1.28rem; margin: 0 0 8px; }
.feature p { margin: 0; color: var(--ink-soft); font-weight: 600; }

/* ---------- Cats ------------------------------------------------------- */
.cats-block { background: linear-gradient(180deg, #fff 0%, #fff6e9 100%); }
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.cat-card {
  background: #fff; border: 2px solid #f4e6d6; border-radius: var(--radius);
  padding: 20px 14px; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .12s ease;
}
.cat-card:hover { transform: translateY(-6px) rotate(-1.5deg); }
.cat-card svg { width: 86px; height: 86px; margin: 0 auto 10px; }
.cat-card h3 { margin: 0 0 4px; font-size: 1.12rem; }
.cat-card p { margin: 0; font-size: 0.86rem; color: var(--ink-soft); font-weight: 600; }

/* ---------- How to play ------------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { text-align: center; padding: 10px; position: relative; }
.step .num {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display);
  font-size: 1.7rem; color: #fff; background: var(--accent);
  box-shadow: 0 6px 0 var(--accent-dark);
}
.step h3 { margin: 0 0 8px; font-size: 1.3rem; }
.step p { margin: 0; color: var(--ink-soft); font-weight: 600; }

/* ---------- CTA band --------------------------------------------------- */
.cta-band {
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff; text-align: center; border-radius: 0;
}
.cta-band h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0 0 12px; }
.cta-band p { font-size: 1.12rem; opacity: 0.95; font-weight: 600; margin: 0 0 26px; }
.cta-band .stores { justify-content: center; }

/* ---------- Footer ----------------------------------------------------- */
footer {
  background: var(--night-top); color: #c9cbe6; padding: 50px 0 34px;
}
footer .grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; align-items: flex-start; }
footer .brand { color: #fff; }
footer .brand img { border-radius: 9px; }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
footer nav a { color: #c9cbe6; font-weight: 700; }
footer nav a:hover { color: #fff; }
footer .copy { margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.88rem; color: #9aa0c8; }

/* ---------- Legal / content pages ------------------------------------- */
.legal { max-width: 820px; margin: 0 auto; padding: 54px 22px 80px; }
.legal .back { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; margin-bottom: 8px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 10px 0 6px; }
.legal .updated { color: var(--ink-soft); font-weight: 700; margin: 0 0 30px; }
.legal h2 { font-size: 1.4rem; margin: 34px 0 10px; color: var(--accent-dark); }
.legal h3 { font-size: 1.12rem; margin: 22px 0 6px; }
.legal p, .legal li { color: #4a3d33; font-weight: 500; }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal a { font-weight: 700; }
.legal .card {
  background: #fff; border: 2px solid #f4e6d6; border-radius: var(--radius-sm);
  padding: 18px 22px; margin: 18px 0; box-shadow: var(--shadow-sm);
}

/* ---------- FAQ (support page) ---------------------------------------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  background: #fff; border: 2px solid #f4e6d6; border-radius: var(--radius-sm);
  margin: 12px 0; box-shadow: var(--shadow-sm); overflow: hidden;
}
.faq details[open] { border-color: #ffd9c9; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 22px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem;
  color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.5rem; color: var(--accent); flex: none;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 22px 20px; color: #4a3d33; font-weight: 500; }
.faq .answer p { margin: 0 0 8px; }
.faq .answer a { font-weight: 700; }

.support-cta {
  max-width: 760px; margin: 40px auto 0; text-align: center;
  background: linear-gradient(160deg, #fff 0%, #fff6e9 100%);
  border: 2px solid #f4e6d6; border-radius: var(--radius);
  padding: 34px 26px; box-shadow: var(--shadow-sm);
}
.support-cta h3 { font-size: 1.5rem; margin: 0 0 8px; }
.support-cta p { color: var(--ink-soft); font-weight: 600; margin: 0 0 18px; }
.support-cta .mail { font-family: var(--font-display); font-size: 1.2rem; }

/* ---------- Responsive ------------------------------------------------- */
@media (max-width: 940px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 820px) {
  .hero { padding: 50px 0 80px; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero .stores { justify-content: center; }
  .hero-art { order: -1; margin-bottom: 18px; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .cats { grid-template-columns: 1fr 1fr; }
  section.block { padding: 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
}
