/* Wasamio — ana sayfa. Aynı "Sakin su" tasarım dili (bkz. wasamio-sudoku
   DESIGN.md): kobalt + limon, optik dalga, Manrope, üç tema. Tek stil dosyası. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #eef1fb;
  --surface: #ffffff;
  --surface-2: #f4f6fc;
  --ink: #16204a;
  --ink-2: #3a4674;
  --muted: #56608a;
  --border: #dfe5f4;
  --primary: #2f55c8;
  --primary-hover: #2446a8;
  --on-primary: #ffffff;
  --citron: #e7ee9f;
  --on-citron: #1b2248;
  --link: #2446a8;
  --focus: #c2410c;
  --shadow-soft: 0 1px 2px #1b2e6e12, 0 6px 18px #1b2e6e0f;
  --shadow-card: 0 2px 6px #1b2e6e0f, 0 18px 44px #1b2e6e17;
  --lift: 0 2px 4px #1b2e6e14, 0 10px 24px #1b2e6e1a;
  --wave: #2f55c8;
  --wave-alpha: 0.06;
  --mark: #2f55c8;
  --mark-dot: #b83a62;
  --body: "Manrope", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 0.9, 0.3, 1);
  --dur-in: 520ms;
  --step: 40ms;
  --fs-display: 32px;
  --fs-title: 22px;
  --fs-lead: 17px;
  --fs-body: 15px;
  --fs-label: 14px;
  --fs-small: 13px;
  --fs-caption: 12px;
  --r-pill: 999px;
  --r-card: 24px;
  --r-ctl: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0b1230;
    --surface: #131c40;
    --surface-2: #18224b;
    --ink: #eef1ff;
    --ink-2: #c8cff0;
    --muted: #9aa4cc;
    --border: #2a3566;
    --primary: #e5ec9e;
    --primary-hover: #eef3b8;
    --on-primary: #111a3c;
    --citron: #e5ec9e;
    --on-citron: #111a3c;
    --link: #a9bcff;
    --focus: #ffb86b;
    --shadow-soft: 0 8px 22px #00000033;
    --shadow-card: 0 18px 44px #00000059;
    --lift: 0 10px 24px #00000047;
    --wave: #2446a8;
    --wave-alpha: 0.26;
    --mark: #ffffff;
    --mark-dot: #e5ec9e;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1230;
  --surface: #131c40;
  --surface-2: #18224b;
  --ink: #eef1ff;
  --ink-2: #c8cff0;
  --muted: #9aa4cc;
  --border: #2a3566;
  --primary: #e5ec9e;
  --primary-hover: #eef3b8;
  --on-primary: #111a3c;
  --citron: #e5ec9e;
  --on-citron: #111a3c;
  --link: #a9bcff;
  --focus: #ffb86b;
  --shadow-soft: 0 8px 22px #00000033;
  --shadow-card: 0 18px 44px #00000059;
  --lift: 0 10px 24px #00000047;
  --wave: #2446a8;
  --wave-alpha: 0.26;
  --mark: #ffffff;
  --mark-dot: #e5ec9e;
}
:root[data-theme="rose"] {
  color-scheme: light;
  --bg: #fbf1f4;
  --surface: #ffffff;
  --surface-2: #fdf6f8;
  --ink: #3a1624;
  --ink-2: #5e3446;
  --muted: #84596a;
  --border: #f0dbe2;
  --primary: #b83a62;
  --primary-hover: #9e2f53;
  --on-primary: #ffffff;
  --citron: #ffdcc8;
  --on-citron: #5a2a10;
  --link: #a3304f;
  --focus: #7a3cc2;
  --shadow-soft: 0 1px 2px #6e1b3a12, 0 6px 18px #6e1b3a0f;
  --shadow-card: 0 2px 6px #6e1b3a0f, 0 18px 44px #6e1b3a17;
  --lift: 0 2px 4px #6e1b3a14, 0 10px 24px #6e1b3a1a;
  --wave: #c2456b;
  --wave-alpha: 0.06;
  --mark: #b83a62;
  --mark-dot: #2f55c8;
}

* {
  box-sizing: border-box;
}
html {
  touch-action: manipulation;
  overscroll-behavior: none;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: var(--fs-body) / 1.45 var(--body);
  -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
a {
  color: var(--link);
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Dalga süsü: arka plan, marka ve diyalog başlığında; ızgaraya girmez ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  color: var(--wave);
  opacity: var(--wave-alpha);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 52%, #0000004d 0%, #000 90%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 52%, #0000004d 0%, #000 90%);
}
.backdrop .layer {
  position: absolute;
  inset: -8%;
  will-change: transform;
  animation: drift-a 47s var(--ease-out) infinite alternate;
}
.backdrop svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
@keyframes drift-a {
  to {
    transform: translate3d(-2.5%, 1.5%, 0) scale(1.05);
  }
}

/* ---------- Yerleşim ---------- */
.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100%;
  min-height: 100dvh;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark,
.game-mark {
  width: 40px;
  height: 40px;
  flex: none;
  overflow: visible;
}
.bm-ring,
.bm-w {
  fill: none;
  stroke: var(--mark);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bm-ring {
  stroke-width: 15;
}
.bm-w {
  stroke-width: 7.5;
}
.bm-grid {
  fill: none;
  stroke: var(--mark);
  stroke-linecap: round;
  stroke-width: 7;
}
.bm-dot {
  fill: var(--mark-dot);
}
.brand-text {
  font: 800 var(--fs-title) / 1 var(--body);
  letter-spacing: -0.01em;
}

/* Açılış: Wasamio işareti bir kez çizilir (html.brand-intro). Hareket
   azaltmada genel kural (aşağıda) animasyonu anında bitirir, işaret son
   halinde görünür. */
.brand-intro .brand .bm-grow {
  transform-box: view-box;
  transform-origin: 60px 60px;
  animation: bm-grow 0.9s 0.15s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.brand-intro .brand .bm-ring {
  stroke-dasharray: 1;
  animation: bm-draw 0.9s 0.15s cubic-bezier(0.65, 0, 0.35, 1) both;
}
.brand-intro .brand .bm-w {
  stroke-dasharray: 1;
  animation: bm-draw 0.6s 0.85s cubic-bezier(0.65, 0, 0.35, 1) both;
}
.brand-intro .brand .bm-dot {
  animation: bm-dot-in 0.5s 1.1s var(--ease-out) both;
}
@keyframes bm-draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes bm-grow {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
}
@keyframes bm-dot-in {
  from {
    transform: scale(0);
  }
  70% {
    transform: scale(1.15);
  }
  to {
    transform: scale(1);
  }
}

.theme-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  border: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.theme-btn .icon {
  width: 22px;
  height: 22px;
}
@media (hover: hover) {
  .theme-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: var(--lift);
  }
}
.theme-btn:active {
  transform: translateY(1px) scale(0.95);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  padding: 4px 0;
}
.hero h1 {
  font: 800 var(--fs-display) / 1.15 var(--body);
  letter-spacing: -0.02em;
  margin: 0;
}
.hero p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-lead);
}

.games {
  display: grid;
  gap: 16px;
}
.game-card {
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
@media (hover: hover) {
  .game-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--lift);
  }
}
.game-card:active {
  transform: translateY(1px) scale(0.99);
}
.game-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.game-card h2 {
  margin: 0;
  font: 800 var(--fs-title) / 1.2 var(--body);
}
.game-card p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-body);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  background: var(--primary);
  color: var(--on-primary);
  font: 700 var(--fs-label) / 1 var(--body);
  flex: none;
}

footer.site-footer {
  margin-top: auto;
  display: flex;
  justify-content: center;
  gap: 16px;
  padding-top: 16px;
  font-size: var(--fs-small);
  color: var(--muted);
}
footer.site-footer a {
  color: var(--muted);
  text-decoration: underline;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.notice {
  background: var(--surface-2);
  border-radius: var(--r-ctl);
  padding: 12px 16px;
  color: var(--ink-2);
  font-size: var(--fs-small);
  font-weight: 700;
}

/* ---------- Gizlilik sayfası ---------- */
.doc {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.doc h1 {
  font: 800 var(--fs-display) / 1.15 var(--body);
  letter-spacing: -0.02em;
  margin: 8px 0 0;
}
.doc h2 {
  font: 800 var(--fs-title) / 1.3 var(--body);
  margin: 16px 0 0;
}
.doc p,
.doc li {
  font-size: var(--fs-body);
  line-height: 1.6;
}
.doc a.back {
  align-self: flex-start;
}

/* ---------- Hareketi azalt: bütün animasyon ve geçişler kapanır ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ---------- 360px'e kadar yatay kaydırma yok ---------- */
@media (max-width: 380px) {
  .hero h1 {
    font-size: 30px;
  }
}
