/* =========================================================
   MIO Software — style.css
   Tasarım sistemi: design/DESIGN.md
   ========================================================= */

:root {
  --bg: #E2E2DF;
  --bg-2: #D4D4D0;
  --surface: #FFFFFF;
  --silver: #C8C9CC;
  --silver-d: #9A9CA1;
  --ink: #0D0D0F;
  --ink-2: #1B1B1F;
  --ink-3: #2A2A30;
  --muted: #55575D;
  --line: #C5C5C1;
  --yellow: #FFC83D;
  --yellow-d: #E8A900;
  --error: #B3261E;

  --f-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-in: cubic-bezier(.6, 0, .8, .2);
  --radius: 20px;
  --header-h: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.dark :focus-visible, .mobile-menu :focus-visible { outline-color: var(--yellow); }
::selection { background: var(--yellow); color: var(--ink); }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 300; background: var(--yellow); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.mono { font-family: var(--f-mono); font-size: .76rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Page curtain (transition) ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 250;
  background: var(--ink);
  display: grid; place-items: center;
  transform-origin: top;
  animation: curtainOut .7s var(--ease) .1s both;
  pointer-events: none;
}
.curtain-logo { display: block; animation: fadeOut .25s ease both; }
.curtain-logo img { height: 48px; width: auto; }
.is-leaving .curtain { transform-origin: bottom; animation: curtainIn .45s var(--ease-in) both; }
.is-leaving .curtain-logo { animation: none; opacity: 0; }
@keyframes curtainOut { from { transform: scaleY(1); } to { transform: scaleY(0); } }
@keyframes curtainIn { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes fadeOut { to { opacity: 0; } }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  transition: background .3s, box-shadow .3s, transform .4s var(--ease);
}
.header.is-scrolled {
  background: rgba(226, 226, 223, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.header.is-hidden { transform: translateY(-100%); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-head); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.logo small { font-family: var(--f-body); font-weight: 500; font-size: .98rem; color: var(--muted); letter-spacing: 0; }
.logo-img { height: 40px; width: auto; transition: transform .5s var(--ease); }
.logo:hover .logo-img { transform: translateY(-2px) rotate(-2deg); }
.logo-img--light { display: none; }
.menu-open .header .logo-img--dark { display: none; }
.menu-open .header .logo-img--light { display: block; }
.logo small { padding-left: 10px; border-left: 1px solid var(--line); line-height: 1.2; }
.menu-open .header .logo small { border-color: var(--ink-3); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a { position: relative; padding: 10px 16px; border-radius: 999px; font-weight: 500; transition: background .2s; }
.nav a:hover { background: var(--bg-2); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 3px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--yellow-d); transform: translateX(-50%);
}

.menu-btn { display: none; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); position: relative; z-index: 120; }
.menu-btn span { position: absolute; left: 15px; right: 15px; height: 2px; background: #fff; border-radius: 2px; transition: transform .35s var(--ease), top .35s var(--ease); }
.menu-btn span:first-child { top: 19px; }
.menu-btn span:last-child { top: 27px; }
.menu-open .menu-btn { background: var(--yellow); }
.menu-open .menu-btn span { background: var(--ink); top: 23px; }
.menu-open .menu-btn span:first-child { transform: rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 110;
  background: var(--ink); color: #fff;
  padding: calc(var(--header-h) + 32px) clamp(16px, 6vw, 40px) 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: circle(0 at calc(100% - 44px) 36px);
  transition: clip-path .6s var(--ease);
  visibility: hidden;
}
.menu-open .mobile-menu { clip-path: circle(150% at calc(100% - 44px) 36px); visibility: visible; }
.menu-open .header .logo { color: #fff; }
.menu-open .header .logo small { color: var(--silver-d); }
.menu-open .header { z-index: 115; transform: none; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  font-family: var(--f-head); font-weight: 800; font-size: clamp(2.2rem, 11vw, 3.6rem); letter-spacing: -.03em; line-height: 1.15;
  padding: 6px 0; border-bottom: 1px solid var(--ink-3);
  display: flex; justify-content: space-between; align-items: center;
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), color .2s;
}
.mobile-menu nav a span { font-family: var(--f-mono); font-size: .8rem; color: var(--silver-d); font-weight: 500; }
.mobile-menu nav a:hover, .mobile-menu nav a[aria-current="page"] { color: var(--yellow); }
.menu-open .mobile-menu nav a { opacity: 1; transform: none; }
.menu-open .mobile-menu nav a:nth-child(1) { transition-delay: .15s; }
.menu-open .mobile-menu nav a:nth-child(2) { transition-delay: .2s; }
.menu-open .mobile-menu nav a:nth-child(3) { transition-delay: .25s; }
.menu-open .mobile-menu nav a:nth-child(4) { transition-delay: .3s; }
.mobile-menu-foot { color: var(--silver-d); }
.mobile-menu-foot a { color: #fff; text-transform: none; letter-spacing: 0; }
.menu-open body { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; white-space: nowrap;
  border: 1.5px solid transparent;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .2s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: scale(.97); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: .95rem; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--yellow); border-radius: inherit;
  transform: translateY(101%); transition: transform .4s var(--ease);
}
.btn--dark:hover { color: var(--ink); }
.btn--dark:hover::before { transform: none; }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--yellow:hover { background: #fff; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- Reveal ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js [data-reveal="left"] { transform: translateX(-30px); }
.js [data-reveal="scale"] { transform: scale(.94); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Paused animations (offscreen / hidden tab) */
.is-paused, .is-paused *, .tab-hidden * { animation-play-state: paused !important; }

/* ---------- Typography blocks ---------- */
.display {
  font-family: var(--f-head); font-weight: 800;
  font-size: clamp(2.7rem, 6.6vw, 5.8rem);
  line-height: .98; letter-spacing: -.04em;
}
.line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.line > span { display: inline-block; }
.js .line > span { transform: translateY(108%); transition: transform 1s var(--ease); }
.js.is-loaded .line > span { transform: none; }
.line:nth-child(2) > span { transition-delay: .1s; }
.line:nth-child(3) > span { transition-delay: .2s; }
.outline { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.hl { position: relative; z-index: 0; white-space: nowrap; }
.hl::after {
  content: ""; position: absolute; z-index: -1;
  left: -.05em; right: -.05em; bottom: .1em; height: .3em;
  background: var(--yellow);
  transform-origin: left; transition: transform .9s var(--ease) .9s;
}
.js .hl::after { transform: scaleX(0); }
.js.is-loaded .hl::after, .js .is-in .hl::after { transform: scaleX(1); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow-d); position: relative; }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--yellow-d); animation: ping 2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(3); opacity: 0; } }

.title {
  font-family: var(--f-head); font-weight: 800;
  font-size: clamp(2.1rem, 4.8vw, 3.8rem);
  line-height: 1.02; letter-spacing: -.035em;
}
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--muted); max-width: 54ch; }
.dark .lead, .dark .muted { color: var(--silver-d); }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 12vw, 140px) 0; position: relative; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head .mono { color: var(--muted); display: block; margin-bottom: 14px; }
.dark .section-head .mono { color: var(--silver-d); }
.dark { background: var(--ink); color: #EDEDEB; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: calc(var(--header-h) + 56px) 0 72px; min-height: min(100svh, 1000px); display: flex; align-items: center; overflow: hidden; }
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 72% 45%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 72% 45%, #000 0%, transparent 75%);
  opacity: .7;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.12fr .88fr; gap: 40px; align-items: center; width: 100%; }
.hero .display { margin: 26px 0 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 20px 48px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.stat b { display: block; font-family: var(--f-head); font-weight: 800; font-size: 2.2rem; line-height: 1; letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: .92rem; }

/* Hero visual */
.hero-visual { position: relative; height: 580px; display: grid; place-items: center; }
.orbit { position: absolute; width: 470px; aspect-ratio: 1; border-radius: 50%; border: 1px dashed var(--silver-d); animation: spin 48s linear infinite; }
.orbit::before { content: ""; position: absolute; top: -7px; left: calc(50% - 7px); width: 14px; height: 14px; background: var(--yellow); border-radius: 3px; }
.orbit--2 { width: 330px; border-style: solid; border-color: var(--line); animation-duration: 30s; animation-direction: reverse; }
.orbit--2::before { background: var(--ink); width: 10px; height: 10px; top: -5px; left: calc(50% - 5px); border-radius: 50%; }
@keyframes spin { to { transform: rotate(360deg); } }

.phone {
  position: absolute; width: 250px; height: 512px; border-radius: 42px; padding: 10px;
  background: var(--ink);
  box-shadow: 0 50px 90px -40px rgba(13, 13, 15, .55), inset 0 0 0 2px #2E2E34;
}
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; width: 78px; height: 22px; border-radius: 999px; background: var(--ink); transform: translateX(-50%); z-index: 5; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 33px; overflow: hidden; }
.phone--front { translate: 46px 18px; rotate: 5deg; z-index: 2; animation: floatA 7s ease-in-out infinite; }
.phone--back {
  translate: -92px -24px; rotate: -9deg; z-index: 1;
  background: linear-gradient(150deg, #E6E7E9, #A7A9AE);
  box-shadow: 0 40px 70px -40px rgba(13, 13, 15, .4), inset 0 0 0 2px #F2F2F3;
  animation: floatB 8.5s ease-in-out infinite;
}
.phone--back::before { background: #1B1B1F; }
@keyframes floatA { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes floatB { 0%, 100% { transform: translateY(-6px); } 50% { transform: translateY(10px); } }

/* Mini game (front phone) */
.game { position: absolute; inset: 0; background: linear-gradient(#F7F7F5 0%, #E2E2DF 62%); }
.game-hud { position: absolute; top: 54px; left: 18px; right: 18px; display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 11px; font-weight: 600; color: var(--ink); z-index: 2; }
.game-hud .lives { display: flex; gap: 4px; align-items: center; }
.game-hud .lives i { width: 8px; height: 8px; background: var(--ink); border-radius: 2px; }
.game-hud .lives i:last-child { background: var(--yellow-d); }
.game-sun { position: absolute; top: 96px; right: 30px; width: 38px; height: 38px; border-radius: 50%; background: var(--yellow); }
.game-hills {
  position: absolute; left: 0; bottom: 172px; width: 200%; height: 70px;
  background:
    radial-gradient(60px 50px at 60px 70px, var(--silver) 98%, transparent 100%) 0 0 / 230px 70px repeat-x,
    radial-gradient(44px 34px at 170px 70px, #D6D7D9 98%, transparent 100%) 0 0 / 230px 70px repeat-x;
  animation: hills 9s linear infinite;
}
@keyframes hills { to { transform: translateX(-230px); } }
.game-cloud { position: absolute; top: 150px; left: 0; width: 46px; height: 12px; border-radius: 999px; background: #fff; animation: cloud 11s linear infinite; }
.game-cloud::after { content: ""; position: absolute; left: 10px; top: -8px; width: 22px; height: 16px; border-radius: 50%; background: #fff; }
@keyframes cloud { from { transform: translateX(240px); } to { transform: translateX(-60px); } }
.game-world { position: absolute; left: 0; right: 0; bottom: 172px; height: 0; }
.game-player {
  position: absolute; bottom: 0; left: 40px; width: 22px; height: 22px;
  background: var(--yellow); border-radius: 5px;
  box-shadow: inset 0 0 0 2px var(--ink);
  animation: jump 1s infinite;
}
.game-player::after { content: ""; position: absolute; top: 6px; right: 4px; width: 4px; height: 5px; background: var(--ink); border-radius: 1px; }
@keyframes jump {
  0%, 12% { transform: translateY(0) scaleY(1); animation-timing-function: cubic-bezier(.2, .6, .35, 1); }
  14% { transform: translateY(0) scaleY(.85); }
  40% { transform: translateY(-60px) rotate(90deg); animation-timing-function: cubic-bezier(.6, 0, .8, .4); }
  64% { transform: translateY(0) rotate(180deg); }
  70% { transform: translateY(0) rotate(180deg) scaleY(.88); }
  76%, 100% { transform: translateY(0) rotate(180deg); }
}
.game-obs { position: absolute; bottom: 0; left: 0; width: 16px; height: 26px; background: var(--ink); border-radius: 4px 4px 0 0; animation: obs 2s linear infinite; }
.game-obs--2 { height: 20px; animation-delay: -1s; }
@keyframes obs { from { transform: translateX(236px); } to { transform: translateX(-40px); } }
.game-coin { position: absolute; bottom: 78px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); box-shadow: inset 0 0 0 2px var(--yellow-d); animation: obs 4s linear infinite, coinSpin .6s ease-in-out infinite alternate; animation-delay: -.6s, 0s; }
@keyframes coinSpin { to { scale: .3 1; } }
.game-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 172px; background: var(--ink); }
.game-ground::before {
  content: ""; position: absolute; top: 0; left: 0; width: calc(100% + 28px); height: 3px;
  background: repeating-linear-gradient(90deg, var(--silver) 0 14px, transparent 14px 28px);
  animation: ground .203s linear infinite;
}
@keyframes ground { to { transform: translateX(-28px); } }
.game-pad { position: absolute; left: 0; right: 0; bottom: 34px; display: flex; justify-content: space-between; align-items: center; padding: 0 26px; }
.dpad { position: relative; width: 66px; height: 66px; }
.dpad::before, .dpad::after { content: ""; position: absolute; background: var(--ink-3); border-radius: 5px; }
.dpad::before { left: 22px; top: 0; width: 22px; height: 66px; }
.dpad::after { top: 22px; left: 0; width: 66px; height: 22px; }
.ab { display: flex; gap: 12px; align-items: center; }
.ab span { width: 34px; height: 34px; border-radius: 50%; background: var(--ink-3); display: grid; place-items: center; font-family: var(--f-mono); font-size: 11px; color: var(--silver-d); }
.ab span:last-child { background: var(--yellow); color: var(--ink); translate: 0 -10px; animation: press 1s infinite; }
@keyframes press { 0%, 10%, 22%, 100% { transform: scale(1); } 14% { transform: scale(.82); } }

/* App UI (back phone) */
.app { position: absolute; inset: 0; background: #FAFAF9; padding: 54px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.app-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.app-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); }
.bar { height: 7px; border-radius: 4px; background: var(--line); }
.app-card { background: var(--ink); border-radius: 16px; padding: 14px; display: grid; gap: 10px; }
.app-card .bar { background: var(--ink-3); }
.app-card .big { font-family: var(--f-head); font-weight: 800; color: #fff; font-size: 26px; line-height: 1; }
.app-progress { height: 8px; border-radius: 4px; background: var(--ink-3); overflow: hidden; }
.app-progress i { display: block; height: 100%; background: var(--yellow); transform-origin: left; animation: progress 4s var(--ease) infinite; }
@keyframes progress { 0% { transform: scaleX(.1); } 60%, 85% { transform: scaleX(.78); } 100% { transform: scaleX(.1); } }
.app-row { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; position: relative; overflow: hidden; }
.app-row b { width: 26px; height: 26px; border-radius: 8px; background: var(--bg-2); flex: none; }
.app-row:nth-of-type(3) b { background: var(--silver); }
.app-row div { flex: 1; display: grid; gap: 6px; }
.app-row::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 200, 61, .18) 50%, transparent 70%); transform: translateX(-100%); animation: shimmer 3.2s ease-in-out infinite; }
.app-row:nth-of-type(4)::after { animation-delay: .3s; }
.app-row:nth-of-type(5)::after { animation-delay: .6s; }
@keyframes shimmer { 0%, 40% { transform: translateX(-100%); } 80%, 100% { transform: translateX(100%); } }
.toggle { width: 30px; height: 18px; border-radius: 999px; background: var(--line); position: relative; flex: none; animation: toggleBg 3s steps(1) infinite; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); animation: toggleKnob 3s var(--ease) infinite; }
@keyframes toggleBg { 0% { background: var(--line); } 50% { background: var(--ink); } }
@keyframes toggleKnob { 0%, 45% { transform: none; } 50%, 95% { transform: translateX(12px); } 100% { transform: none; } }
.app-tabbar { margin-top: auto; display: flex; justify-content: space-around; padding: 12px 0 4px; border-top: 1px solid var(--line); }
.app-tabbar i { width: 18px; height: 18px; border-radius: 6px; background: var(--line); }
.app-tabbar i:first-child { background: var(--ink); }

/* Floating chips */
.chip-float {
  position: absolute; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 14px 30px -18px rgba(13, 13, 15, .35);
  animation: floatA 6s ease-in-out infinite;
}
.chip-float svg { width: 16px; height: 16px; }
.chip-float--a { top: 8%; right: 2%; }
.chip-float--b { bottom: 14%; left: -2%; animation-delay: -2s; }
.chip-float--c { bottom: 4%; right: 8%; background: var(--yellow); border-color: var(--yellow); animation-delay: -4s; }
.pixel { position: absolute; width: 10px; height: 10px; background: var(--ink); border-radius: 2px; animation: drift 9s ease-in-out infinite; }
.pixel--1 { top: 18%; left: 10%; }
.pixel--2 { top: 70%; right: 0; background: var(--yellow-d); animation-delay: -3s; }
.pixel--3 { top: 4%; left: 42%; width: 6px; height: 6px; background: var(--silver-d); animation-delay: -6s; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) rotate(0); } 33% { transform: translate(10px, -16px) rotate(45deg); } 66% { transform: translate(-8px, 8px) rotate(90deg); } }

/* ---------- Marquee ---------- */
.marquee { background: var(--ink); color: var(--silver); overflow: hidden; padding: 22px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  display: inline-flex; align-items: center; gap: 44px; padding-right: 44px;
  font-family: var(--f-head); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.4rem, 3vw, 2.2rem); letter-spacing: -.01em; white-space: nowrap;
}
.marquee-track span::after { content: ""; width: 12px; height: 12px; background: var(--yellow); border-radius: 3px; transform: rotate(45deg); }
.marquee-track span:nth-child(even) { color: transparent; -webkit-text-stroke: 1px var(--silver); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Filters ---------- */
.filters { position: relative; display: inline-flex; padding: 5px; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.filters button { position: relative; z-index: 1; min-height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: .95rem; transition: color .3s; }
.filters button[aria-pressed="true"] { color: #fff; }
.filters button span { font-family: var(--f-mono); font-size: .72rem; opacity: .6; margin-left: 4px; }
.filters-indicator { position: absolute; top: 5px; bottom: 5px; left: 0; border-radius: 999px; background: var(--ink); transition: transform .45s var(--ease), width .45s var(--ease); }

/* ---------- Project cards ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .4s, opacity .35s;
}
.card:hover { box-shadow: 0 34px 60px -34px rgba(13, 13, 15, .38); }
.card.is-tilting { transition: box-shadow .4s; }
.projects-grid.is-switching .card { opacity: 0; transform: scale(.96); }
.card-cover { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c1); color: var(--c2); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.cover-art { position: absolute; inset: -10%; transition: transform .9s var(--ease); }
.card:hover .cover-art, .card:hover .card-cover img { transform: scale(1.06); }
.art-pixel { background: repeating-conic-gradient(currentColor 0 25%, transparent 0 50%) 0 0 / 34px 34px; opacity: .14; }
.art-dots { background: radial-gradient(currentColor 1.6px, transparent 1.8px) 0 0 / 18px 18px; opacity: .3; }
.art-stripes { background: repeating-linear-gradient(-45deg, currentColor 0 2px, transparent 2px 18px); opacity: .22; }
.art-rings { background: repeating-radial-gradient(circle at 85% 15%, currentColor 0 1.5px, transparent 2px 22px); opacity: .3; }
.card:hover .art-pixel, .card:hover .art-dots { animation: artDrift 6s linear infinite; }
@keyframes artDrift { to { background-position: 68px 68px; } }
.cover-shape { position: absolute; right: 22px; top: 50%; width: 92px; height: 92px; margin-top: -46px; border-radius: 26px; background: var(--c3, var(--yellow)); transition: transform .8s var(--ease); }
.cover-shape--circle { border-radius: 50%; }
.card:hover .cover-shape { transform: rotate(45deg) scale(.9); }
.card:hover .cover-shape--circle { transform: translateY(-10px) scale(1.05); }
.cover-glyph { position: absolute; left: 20px; bottom: -4px; font-family: var(--f-head); font-weight: 900; font-size: 6.4rem; line-height: 1; letter-spacing: -.06em; color: var(--c2); transition: transform .8s var(--ease); }
.card:hover .cover-glyph { transform: translateY(-6px); }
.card-tag { position: absolute; top: 14px; left: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: var(--surface); color: var(--ink); }
.card-tag svg { width: 14px; height: 14px; }
.card-status { position: absolute; top: 14px; right: 14px; z-index: 2; padding: 6px 11px; border-radius: 999px; background: var(--ink); color: #fff; }
.card-status.is-live { background: var(--yellow); color: var(--ink); }
.card-body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 22px 22px 24px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card h3 { font-family: var(--f-head); font-weight: 800; font-size: 1.45rem; letter-spacing: -.025em; line-height: 1.15; }
.card-year { color: var(--muted); }
.card p { color: var(--muted); }
.platforms { display: flex; flex-wrap: wrap; gap: 6px; }
.platforms li { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.card-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; font-size: .9rem;
  transition: background .25s, color .25s, transform .2s var(--ease);
}
.store-btn svg { width: 16px; height: 16px; }
.store-btn:hover { background: var(--yellow); color: var(--ink); }
.store-btn:active { transform: scale(.96); }
.store-btn.is-soon { background: var(--bg-2); color: var(--muted); cursor: default; }
.projects-empty { grid-column: 1 / -1; padding: 72px 24px; text-align: center; color: var(--muted); border: 1.5px dashed var(--silver-d); border-radius: var(--radius); }
.projects-empty strong { color: var(--ink); }
.store-btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.store-btn--ghost:hover { background: var(--ink); color: #fff; }

/* Featured card (2 columns, cover left) */
.card--featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.25fr 1fr; }
.card--featured .card-cover { aspect-ratio: auto; min-height: 460px; height: 100%; }
.card--featured .card-body { max-width: 560px; }
.card--featured .card-body { padding: 32px 30px; gap: 14px; justify-content: center; }
.card--featured h3 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.card--featured p { font-size: 1.04rem; }

/* Screenshot cover */
.card--screens .card-cover { background: radial-gradient(120% 85% at 50% 108%, color-mix(in srgb, var(--c3) 38%, var(--c1)) 0%, var(--c1) 62%); }
.card--screens .art-dots { color: var(--c3); opacity: .14; }
.card--screens .card-tag, .card--screens .card-status { z-index: 4; }
.cover-screens { position: absolute; inset: 0; width: 100%; cursor: zoom-in; }
.cover-screens:focus-visible { outline: 3px solid var(--yellow); outline-offset: -6px; border-radius: inherit; }
.card-cover .sc {
  position: absolute; left: 50%; bottom: -12%;
  height: 84%; width: auto; max-width: none;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, .45));
  transition: transform .9s var(--ease);
}
.card-cover .sc--c { z-index: 3; transform: translateX(-50%); }
.card-cover .sc--l { z-index: 2; transform: translateX(-112%) rotate(-9deg) scale(.86); }
.card-cover .sc--r { z-index: 2; transform: translateX(12%) rotate(9deg) scale(.86); }
.card:hover .card-cover .sc--c, .cover-screens:focus-visible .sc--c { transform: translateX(-50%) translateY(-14px); }
.card:hover .card-cover .sc--l, .cover-screens:focus-visible .sc--l { transform: translateX(-124%) rotate(-13deg) scale(.86); }
.card:hover .card-cover .sc--r, .cover-screens:focus-visible .sc--r { transform: translateX(24%) rotate(13deg) scale(.86); }
.cover-hint {
  position: absolute; left: 14px; bottom: 14px; z-index: 4;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .92); color: var(--ink);
  transition: background .25s, color .25s;
}
.cover-hint svg { width: 14px; height: 14px; }
.cover-screens:hover .cover-hint { background: var(--yellow); }

/* ---------- Gallery dialog ---------- */
.has-dialog, .has-dialog body { overflow: hidden; }
.gallery {
  width: min(1120px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: 28px; overflow: hidden;
  background: var(--ink); color: #fff;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .6);
}
.gallery[open] { display: flex; flex-direction: column; animation: galleryIn .5s var(--ease); }
.gallery::backdrop { background: rgba(13, 13, 15, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes galleryIn { from { opacity: 0; transform: translateY(28px) scale(.97); } }
.gallery-head { display: flex; align-items: center; gap: 16px; padding: 18px 18px 0 28px; }
.gallery-head h2 { margin-right: auto; font-family: var(--f-head); font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; }
.gallery-count { color: var(--silver-d); }
.icon-btn { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ink-3); color: #fff; transition: background .2s, color .2s, transform .2s var(--ease), opacity .2s; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--yellow); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
.icon-btn:disabled { opacity: .3; pointer-events: none; }
.gallery-track {
  display: flex; gap: 22px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 22px 28px; min-height: 0;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:focus { outline: none; }
.gallery-track::before, .gallery-track::after { content: ""; flex: 0 0 max(0px, calc(50% - 190px)); }
.gallery-track figure { margin: 0; flex: 0 0 auto; scroll-snap-align: center; opacity: .4; transform: scale(.9); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.gallery-track figure.is-current { opacity: 1; transform: none; }
.gallery-track img { height: min(64dvh, 640px); width: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .5)); }
.gallery-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 18px 18px 28px; }
.gallery-dots { display: flex; gap: 6px; }
.gallery-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--ink-3); transition: width .35s var(--ease), background .35s; }
.gallery-dots i.is-active { width: 26px; background: var(--yellow); }
.gallery-nav { display: flex; gap: 10px; }

/* ---------- Steps (dark) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink-3); }
.step { position: relative; padding: 40px 32px 8px 0; }
.step + .step { padding-left: 32px; border-left: 1px solid var(--ink-3); }
.step-num { font-family: var(--f-head); font-weight: 900; font-size: clamp(3.6rem, 7vw, 5.6rem); line-height: 1; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1px var(--silver-d); transition: color .4s, -webkit-text-stroke-color .4s; }
.step:hover .step-num { color: var(--yellow); -webkit-text-stroke-color: var(--yellow); }
.step-icon { width: 44px; height: 44px; margin: 28px 0 18px; color: var(--yellow); }
.step-icon path, .step-icon rect, .step-icon circle, .step-icon polyline { stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset 1.6s var(--ease) .3s; }
.no-js .step-icon *, .step.is-in .step-icon * { stroke-dashoffset: 0; }
.step h3 { font-family: var(--f-head); font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; margin-bottom: 10px; color: #fff; }
.step p { color: var(--silver-d); max-width: 34ch; }
.step::before { content: ""; position: absolute; top: -1px; left: 0; width: 100%; height: 2px; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease) .2s; }
.step + .step::before { left: -1px; }
.step.is-in::before { transform: scaleX(1); }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; background: var(--yellow); border-radius: 32px; padding: clamp(40px, 7vw, 92px); display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 32px; }
.cta .title { font-size: clamp(2.2rem, 5.6vw, 4.6rem); max-width: 14ch; }
.cta p { margin-top: 18px; max-width: 46ch; font-size: 1.1rem; }
.cta-deco { position: absolute; right: -60px; top: -60px; width: 260px; aspect-ratio: 1; border: 2px solid var(--ink); border-radius: 50%; opacity: .14; animation: spin 30s linear infinite; }
.cta-deco::before { content: ""; position: absolute; inset: 40px; border: 2px dashed var(--ink); border-radius: 50%; }
.cta-deco::after { content: ""; position: absolute; top: 20px; left: 50%; width: 22px; height: 22px; background: var(--ink); border-radius: 5px; }
.cta > *:not(.cta-deco) { position: relative; }

/* ---------- Footer ---------- */
.footer { padding: 72px 0 32px; }
.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--ink-3); }
.footer-logo { display: inline-block; }
.footer-logo img { width: 230px; height: auto; transition: transform .5s var(--ease); }
.footer-logo:hover img { transform: translateY(-3px); }
.footer-about { margin-top: 18px; color: var(--silver-d); max-width: 36ch; }
.footer h4 { margin: 0 0 16px; color: var(--silver-d); font-family: var(--f-mono); font-weight: 500; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; }
.footer li + li { margin-top: 6px; }
.footer-link { display: inline-flex; align-items: center; min-height: 32px; position: relative; color: #EDEDEB; }
.footer-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: var(--yellow); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.footer-link:hover::after { transform: scaleX(1); transform-origin: left; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 28px; color: var(--silver-d); font-size: .9rem; }
.footer-word { font-family: var(--f-head); font-weight: 900; font-size: clamp(5rem, 22vw, 18rem); line-height: .8; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px var(--ink-3); margin-top: 40px; user-select: none; white-space: nowrap; }

/* ---------- Page hero (sub pages) ---------- */
.page-hero { position: relative; overflow: hidden; padding: calc(var(--header-h) + 88px) 0 clamp(64px, 9vw, 110px); }
.page-hero .display { font-size: clamp(2.8rem, 8vw, 6.6rem); margin-top: 24px; }
.page-hero .lead { margin-top: 28px; }
.bg-word {
  position: absolute; right: -3vw; bottom: -4vw; pointer-events: none; user-select: none;
  font-family: var(--f-head); font-weight: 900; font-size: 24vw; line-height: .8; letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 1px var(--silver-d); opacity: .55;
}
.breadcrumb { display: flex; gap: 8px; color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- About ---------- */
.story { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.story-text p + p { margin-top: 18px; }
.story-text p { font-size: 1.1rem; color: var(--muted); }
.story-text p:first-child { font-size: clamp(1.3rem, 2.2vw, 1.65rem); color: var(--ink); line-height: 1.4; font-weight: 500; }
.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.value { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; transition: transform .4s var(--ease), border-color .3s; }
.value:hover { transform: translateY(-6px); border-color: var(--ink); }
.value-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--ink); color: var(--yellow); display: grid; place-items: center; margin-bottom: 22px; transition: transform .5s var(--ease); }
.value:hover .value-icon { transform: rotate(-8deg) scale(1.06); }
.value-icon svg { width: 24px; height: 24px; }
.value h3 { font-family: var(--f-head); font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; margin-bottom: 8px; }
.value p { color: var(--muted); }

.tools { display: flex; flex-wrap: wrap; gap: 10px; }
.tool { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border: 1px solid var(--ink-3); border-radius: 999px; font-weight: 600; transition: background .25s, color .25s, transform .3s var(--ease), border-color .25s; }
.tool::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--yellow); transition: transform .4s var(--ease); }
.tool:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); transform: translateY(-3px); }
.tool:hover::before { background: var(--ink); transform: rotate(45deg); }

.timeline { position: relative; display: grid; gap: 0; padding-left: 40px; }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline::after { background: var(--ink); transform-origin: top; transform: scaleY(var(--p, 0)); }
.tl-item { position: relative; padding: 0 0 48px; display: grid; grid-template-columns: 180px 1fr; gap: 24px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -39px; top: 4px; width: 16px; height: 16px; border-radius: 4px; background: var(--bg); border: 2px solid var(--ink); z-index: 1; transition: background .3s, transform .4s var(--ease); }
.tl-item.is-in::before { background: var(--yellow); transform: rotate(45deg); }
.tl-item .mono { color: var(--muted); padding-top: 3px; }
.tl-item h3 { font-family: var(--f-head); font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em; margin-bottom: 6px; }
.tl-item p { color: var(--muted); max-width: 56ch; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.info-list { border-top: 1px solid var(--line); }
.info-item { display: flex; gap: 18px; align-items: flex-start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.info-icon { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--ink); color: var(--yellow); display: grid; place-items: center; transition: transform .4s var(--ease); }
.info-item:hover .info-icon { transform: rotate(-8deg); }
.info-icon svg { width: 20px; height: 20px; }
.info-item .mono { color: var(--muted); display: block; margin-bottom: 4px; }
.info-item a, .info-item strong { font-size: 1.15rem; font-weight: 600; }
.info-item a:hover { text-decoration: underline; text-decoration-color: var(--yellow-d); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.socials a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; transition: background .25s, color .25s, border-color .25s; }
.socials a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.form { position: relative; display: grid; gap: 20px; padding: clamp(24px, 4vw, 44px); background: var(--surface); border: 1px solid var(--line); border-radius: 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field label, .field legend { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 8px; padding: 0; }
.field .req { color: var(--error); }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: 14px 16px;
  font: inherit; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--silver-d); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(255, 200, 61, .5); }
.field.has-error input, .field.has-error textarea { border-color: var(--error); }
.field-error { display: none; margin-top: 6px; color: var(--error); font-size: .88rem; font-weight: 500; }
.field.has-error .field-error { display: block; }
.field-hint { margin-top: 6px; color: var(--muted); font-size: .85rem; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topics label { margin: 0; font-weight: 500; }
.topics input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.topics span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.topics span:hover { border-color: var(--ink); }
.topics input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.topics input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-foot small { color: var(--muted); }
.form-status { color: var(--error); font-weight: 500; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: none; }
.is-sending .spinner { display: block; }
.is-sending .btn-arrow { display: none; }
.form-success { position: absolute; inset: 0; z-index: 2; border-radius: inherit; background: var(--ink); color: #fff; display: grid; place-content: center; justify-items: center; text-align: center; gap: 14px; padding: 32px; opacity: 0; visibility: hidden; transform: scale(.97); transition: opacity .5s var(--ease), transform .5s var(--ease), visibility .5s; }
.form.is-sent .form-success { opacity: 1; visibility: visible; transform: none; }
.success-mark { width: 72px; height: 72px; border-radius: 20px; background: var(--yellow); color: var(--ink); display: grid; place-items: center; }
.success-mark svg { width: 34px; height: 34px; }
.success-mark path { stroke-dasharray: 40; stroke-dashoffset: 40; transition: stroke-dashoffset .8s var(--ease) .3s; }
.form.is-sent .success-mark path { stroke-dashoffset: 0; }
.form-success h3 { font-family: var(--f-head); font-weight: 800; font-size: 1.8rem; letter-spacing: -.02em; }
.form-success p { color: var(--silver-d); max-width: 36ch; }
.form-success .btn { margin-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-visual { height: 560px; margin-top: 8px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .story { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav, .header-cta { display: none; }
  .menu-btn { display: block; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 32px 0; border-left: 0; }
  .step + .step { border-top: 1px solid var(--ink-3); }
  .step + .step::before { left: 0; }
  .cta { grid-template-columns: 1fr; align-items: start; }
  .contact-grid { grid-template-columns: 1fr; }
  .tl-item { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 860px) {
  .card--featured { grid-template-columns: 1fr; }
  .card--featured .card-cover { min-height: 0; height: auto; aspect-ratio: 4 / 3; }
  .card--featured .card-body { padding: 22px 22px 24px; }
}
@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; }
  .card--featured { grid-column: auto; }
  .gallery { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 22px; }
  .gallery-head { padding: 14px 12px 0 20px; }
  .gallery-track { padding: 18px 20px; gap: 14px; }
  .gallery-track img { height: min(60dvh, 560px); }
  .gallery-foot { padding: 0 12px 14px 20px; }
  .values { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { height: 470px; }
  .hero-visual-scale { transform: scale(.82); }
  .orbit { width: 380px; }
  .orbit--2 { width: 270px; }
  .chip-float--a { right: 0; top: 2%; }
  .chip-float--b { left: 0; }
  .filters { width: 100%; }
  .filters button { flex: 1; padding: 0 10px; }
  .section-head { align-items: flex-start; }
  .btn { width: 100%; }
  .hero-actions .btn { width: auto; flex: 1 1 auto; }
  .card-links .store-btn { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 400px) {
  .hero-visual-scale { transform: scale(.72); }
  .hero-visual { height: 420px; }
}
.hero-visual-scale { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   Gizlilik politikası (carwash-tycoon/gizlilik.html ve sonrakiler)
   ========================================================= */
.policy-hero .display { margin-top: 18px; }
.policy-app { display: inline-flex; align-items: center; gap: 14px; margin-top: 28px; padding: 10px 18px 10px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; }
.policy-app img { width: 56px; height: 56px; border-radius: 14px; }
.policy-app b { display: block; font-family: var(--f-head); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; line-height: 1.2; }
.policy-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); }
.lang-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.lang-switch button { min-height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--muted); transition: background .25s, color .25s; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.policy-section { padding-top: 0; }
.policy-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: clamp(48px, 7vw, 88px); }
.policy-facts li { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 24px 22px; display: grid; gap: 6px; }
.policy-facts b { font-family: var(--f-head); font-weight: 900; font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1; letter-spacing: -.04em; color: var(--yellow); }
.policy-facts span { color: var(--silver); font-size: .95rem; line-height: 1.4; }

.policy { display: grid; grid-template-columns: 260px 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.policy-toc { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 14px; }
.policy-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.policy-toc li { counter-increment: toc; }
.policy-toc a { display: flex; gap: 10px; align-items: baseline; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); font-weight: 500; transition: color .2s, border-color .2s; }
.policy-toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--f-mono); font-size: .72rem; color: var(--silver-d); }
.policy-toc a:hover { color: var(--ink); border-left-color: var(--yellow-d); }

.policy-body { max-width: 720px; }
.policy-intro { font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.45; font-weight: 500; margin-bottom: 48px; }
.policy-intro .mono { font-size: .8em; text-transform: none; letter-spacing: 0; background: var(--bg-2); padding: 2px 8px; border-radius: 6px; }
.policy-body section { padding: 36px 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 24px); }
.policy-body h2 { display: flex; align-items: baseline; gap: 14px; font-family: var(--f-head); font-weight: 800; font-size: clamp(1.4rem, 2.4vw, 1.8rem); letter-spacing: -.025em; line-height: 1.2; margin-bottom: 16px; }
.policy-body h2 .mono { color: var(--muted); }
.policy-body p { color: var(--muted); font-size: 1.05rem; }
.policy-body p + p, .policy-body .policy-list + p { margin-top: 14px; }
.policy-body strong { color: var(--ink); font-weight: 600; }
.policy-body a:not(.btn) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--yellow-d); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: background .2s; }
.policy-body a:not(.btn):hover { background: var(--yellow); }
.policy-list { margin: 16px 0 0; display: grid; gap: 8px; }
.policy-list li { position: relative; padding-left: 22px; color: var(--muted); }
.policy-list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--yellow-d); }
.policy-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 20px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.policy-contact > div { display: grid; gap: 4px; }
.policy-contact .btn { margin-left: auto; }

@media (max-width: 1080px) { .policy-facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .policy { grid-template-columns: 1fr; }
  .policy-toc { position: static; }
  .policy-contact .btn { margin-left: 0; }
}
@media (max-width: 400px) { .policy-facts { grid-template-columns: 1fr; } }


/* Yatay (landscape) ekran görüntüleri — oyunlar */
.card--landscape .card-cover .sc { left: 50%; bottom: auto; top: 50%; height: auto; width: 74%; border-radius: 12px; transform-origin: 50% 50%; }
.card--landscape .card-cover .sc--c { transform: translate(-50%, -42%); }
.card--landscape .card-cover .sc--l { transform: translate(-82%, -78%) rotate(-5deg) scale(.82); }
.card--landscape .card-cover .sc--r { transform: translate(-18%, -6%) rotate(5deg) scale(.82); }
.card--landscape:hover .card-cover .sc--c, .card--landscape .cover-screens:focus-visible .sc--c { transform: translate(-50%, -46%) scale(1.03); }
.card--landscape:hover .card-cover .sc--l, .card--landscape .cover-screens:focus-visible .sc--l { transform: translate(-88%, -84%) rotate(-7deg) scale(.82); }
.card--landscape:hover .card-cover .sc--r, .card--landscape .cover-screens:focus-visible .sc--r { transform: translate(-12%, 0%) rotate(7deg) scale(.82); }
.gallery--landscape .gallery-track::before, .gallery--landscape .gallery-track::after { flex-basis: max(0px, calc(50% - min(40vw, 540px))); }
.gallery--landscape .gallery-track img { height: auto; width: min(80vw, 1080px); max-height: 64dvh; object-fit: contain; border-radius: 14px; }
@media (max-width: 640px) {
  .card--landscape .card-cover .sc { width: 82%; }
  .gallery--landscape .gallery-track img { width: calc(100vw - 72px); }
  .gallery--landscape .gallery-track::before, .gallery--landscape .gallery-track::after { flex-basis: 0; }
}
