/* Shared styles for sudoku.damurka.com. Colours follow the app: violet brand, coral accent,
   and one colour per game mode (Classic indigo, Irregular purple, Ice Breaker teal). */

@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --violet-900: #2a1f8f;
  --violet-700: #3a2bb8;
  --violet-600: #4834d0;
  --violet-500: #6a4fe6;
  --purple-500: #8e3fd1;
  --coral: #ff6b6b;
  --gold: #f6b93b;
  --classic: #4338ca;
  --irregular: #9333ea;
  --ice: #0f8b8d;

  --bg: #fbf8ff;
  --surface: #ffffff;
  --surface-2: #f1edff;
  --text: #1b1b21;
  --muted: #5d5a6b;
  --line: #e4e1ea;
  --link: #4834d0;
  --shadow: 0 24px 60px -24px rgba(42, 31, 143, .45);
  --radius: 22px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131220;
    --surface: #1d1b2e;
    --surface-2: #26233d;
    --text: #ece9f7;
    --muted: #a7a3bd;
    --line: #34304d;
    --link: #b3a6ff;
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 17px/1.6 "Nunito", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--link); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 900; }
h3 { font-size: 21px; font-weight: 800; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--violet-500); margin-bottom: 10px;
}
.lead { font-size: 19px; color: var(--muted); }

/* Top bar */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--violet-700) 88%, transparent);
  backdrop-filter: blur(12px);
}
.top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 900; font-size: 19px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.top nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.top nav a { color: rgba(255, 255, 255, .85); text-decoration: none; font-weight: 700; font-size: 15px; }
.top nav a:hover { color: #fff; }
.top nav a.btn-play, .top nav a.btn-play:hover { color: var(--violet-900); }
@media (max-width: 760px) { .top nav .hide-sm { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; font-weight: 800; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-play { background: #fff; color: var(--violet-900); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); }
.btn-play svg { width: 22px; height: 22px; }
.btn-play small { display: block; font-size: 11px; font-weight: 700; opacity: .7; line-height: 1; }
.btn-play span { line-height: 1.15; }
.btn-ghost { color: #fff; border: 2px solid rgba(255, 255, 255, .45); }
.btn-small { padding: 8px 16px; font-size: 14px; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, .07) 2px, transparent 2px) 0 0 / 132px 132px,
    linear-gradient(90deg, rgba(255, 255, 255, .07) 2px, transparent 2px) 0 0 / 132px 132px,
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(150deg, var(--violet-700) 0%, var(--violet-600) 45%, var(--purple-500) 100%);
}
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center;
  padding-top: 72px; padding-bottom: 72px;
}
.hero h1 { font-size: clamp(40px, 6vw, 66px); font-weight: 900; }
.hero h1 em { font-style: normal; color: #ffd166; }
.hero .lead { color: rgba(255, 255, 255, .85); max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chips li {
  font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); color: #fff;
}
.hero-phones { position: relative; height: 560px; }
.hero-phones .phone { position: absolute; width: 270px; }
.hero-phones .phone:first-child { right: 6%; top: 0; transform: rotate(6deg); }
.hero-phones .phone:last-child { left: 4%; top: 40px; transform: rotate(-5deg); }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 0; }
  .hero-phones { height: 420px; overflow: hidden; margin: 0 -20px; }
  .hero-phones .phone { width: 210px; }
  .hero-phones .phone:first-child { right: calc(50% - 215px); }
  .hero-phones .phone:last-child { left: calc(50% - 215px); }
}

/* Phone frame around real app screens */
.phone {
  border-radius: 34px; padding: 9px; background: #15131f;
  box-shadow: var(--shadow), inset 0 0 0 2px #2b2838;
}
.phone img { border-radius: 26px; width: 100%; height: auto; aspect-ratio: 540 / 1020; object-fit: cover; background: #fff; }

/* Sections */
section { padding: 88px 0; }
.center { text-align: center; max-width: 720px; margin: 0 auto 48px; }

/* Modes */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.mode {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 0; overflow: hidden; display: flex; flex-direction: column;
}
.mode .tag {
  align-self: flex-start; font-size: 13px; font-weight: 800; color: #fff;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 12px;
}
.mode p { color: var(--muted); font-size: 16px; }
.mode .phone { margin: auto 18px -60px; }
.mode.classic .tag { background: var(--classic); }
.mode.irregular .tag { background: var(--irregular); }
.mode.ice .tag { background: var(--ice); }
@media (max-width: 900px) {
  .modes { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(78%, 320px);
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
  .mode { scroll-snap-align: center; }
}

/* Feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature + .feature { margin-top: 100px; }
.feature .phone { width: min(300px, 80%); margin: 0 auto; }
.feature.flip .text { order: 2; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 36px; }
  .feature.flip .text { order: 0; }
}
.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
.ticks li { padding-left: 32px; position: relative; margin-bottom: 10px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--violet-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.awards { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.award {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-weight: 800; font-size: 15px;
}
.award i { width: 26px; height: 26px; border-radius: 50%; display: block; }
.award .bronze { background: linear-gradient(135deg, #e3a06b, #a85d2a); }
.award .silver { background: linear-gradient(135deg, #f2f2f6, #9ea3b0); }
.award .gold { background: linear-gradient(135deg, #ffe08a, #d79a1a); }
.award .diamond { background: linear-gradient(135deg, #c9f3ff, #5bb6e8); }

.ranks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; align-items: center; }
.ranks span {
  font-size: 14px; font-weight: 800; padding: 5px 11px; border-radius: 8px;
  background: var(--surface-2); color: var(--violet-600);
}
.ranks span:last-child { background: linear-gradient(135deg, var(--violet-600), var(--purple-500)); color: #fff; }
@media (prefers-color-scheme: dark) {
  .ranks span { color: #c9c0ff; }
  .swatches span { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
}

.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 24px; max-width: 420px; }
.swatches span {
  aspect-ratio: 1; border-radius: 12px; position: relative;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.swatches span::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background:
    linear-gradient(rgba(0, 0, 0, .14) 1px, transparent 1px) 0 0 / 33.4% 33.4%,
    linear-gradient(90deg, rgba(0, 0, 0, .14) 1px, transparent 1px) 0 0 / 33.4% 33.4%;
}
.swatches .neon::after, .swatches .chalk::after {
  background:
    linear-gradient(rgba(255, 255, 255, .25) 1px, transparent 1px) 0 0 / 33.4% 33.4%,
    linear-gradient(90deg, rgba(255, 255, 255, .25) 1px, transparent 1px) 0 0 / 33.4% 33.4%;
}

/* Hint callout */
.hint-card {
  display: flex; gap: 14px; align-items: center; margin-top: 22px; padding: 16px 20px;
  border-radius: 18px; background: var(--surface-2); font-weight: 700;
}
.hint-card svg { flex: none; width: 28px; height: 28px; color: var(--violet-500); }

/* Pro */
.pro {
  color: #fff; border-radius: 32px; padding: 56px; position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, #8e3fd1 0%, #4834d0 45%, #2a1f8f 100%);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
}
.pro h2 { color: #fff; }
.pro .eyebrow { color: #ffd166; }
.pro p { color: rgba(255, 255, 255, .85); }
.pro ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.pro li {
  display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 16px;
  background: rgba(255, 255, 255, .1); font-weight: 700;
}
.pro li b { font-size: 22px; width: 28px; text-align: center; }
@media (max-width: 860px) { .pro { grid-template-columns: 1fr; padding: 36px 24px; } }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 0 22px; margin-bottom: 12px;
}
.faq summary {
  cursor: pointer; font-weight: 800; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--violet-500); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); }

/* Final call to action */
.cta { text-align: center; padding-top: 0; }
.cta img { width: 96px; height: 96px; border-radius: 24px; margin: 0 auto 20px; box-shadow: var(--shadow); }
.cta .btn-play { background: var(--violet-600); color: #fff; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 15px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }
footer a { color: var(--muted); text-decoration: none; font-weight: 700; }
footer a:hover { color: var(--link); }

/* Document pages (privacy, data deletion) */
.doc { max-width: 760px; margin: 0 auto; padding: 48px 20px 72px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); font-weight: 900; }
.doc h2 { font-size: 22px; margin-top: 1.8em; }
.doc .box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 22px 8px; margin: 12px 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; }
.doc td, .doc th { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.doc .table-scroll { overflow-x: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
