/* WordFlip website — the game's own look: paper background, chunky
   rounded Baloo 2 headings, Nunito body text, glossy letter tiles with a
   darker drop edge, sticker cards and confetti dots. */
@font-face { font-family: "Baloo2"; src: url("/fonts/Baloo2-Variable.ttf") format("truetype"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/Nunito-Variable.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }

:root {
  --sky: #1E8FF0; --deep: #0F6FD1; --navy: #0A3F7A;
  --sun: #FFD21F; --sun-edge: #D9AE00;
  --tomato: #FE5A4F; --tomato-edge: #D23C33;
  --mint: #5ED5B7; --mint-edge: #2FA88A;
  --grape: #A77BEA;
  --paper: #FEFEFC; --cloud: #F4F6FB; --ink: #1F1B3A; --slate: #55536B; --line: #E6E6EF; --tint: #EAF4FE;
  --radius: 22px;
  --shadow: 0 6px 0 rgba(31, 27, 58, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.65 "Nunito", system-ui, sans-serif; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--deep); font-weight: 800; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: "Baloo2", "Nunito", sans-serif; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .4em; }
h1 { font-size: clamp(38px, 7.5vw, 68px); font-weight: 800; }
h2 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; }
h3 { font-size: 23px; font-weight: 800; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(19px, 2.4vw, 22px); color: var(--slate); }
.eyebrow { display: inline-block; font: 800 14px "Nunito", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--deep); background: var(--tint); padding: 6px 12px; border-radius: 999px; margin-bottom: 14px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(254, 254, 252, .92); backdrop-filter: blur(8px); border-bottom: 2px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 40px; width: auto; display: block; }
.brand .by { font: 700 13px "Nunito", sans-serif; color: var(--slate); }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 800; padding: 6px 0; border-bottom: 3px solid transparent; }
.nav a[aria-current="page"], .nav a:hover { border-bottom-color: var(--sun); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; font: 800 20px "Baloo2", sans-serif; text-decoration: none; padding: 12px 26px; border-radius: 18px; border: 0; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.btn-primary { background: var(--sun); color: var(--ink); box-shadow: 0 6px 0 var(--sun-edge); }
.btn-secondary { background: #fff; color: var(--deep); box-shadow: 0 6px 0 var(--line), inset 0 0 0 2px var(--line); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--sun-edge); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.soon { font: 700 15px "Nunito", sans-serif; color: var(--slate); margin-top: 10px; }

/* Sections */
section { padding: clamp(48px, 8vw, 88px) 0; position: relative; }
.band { background: var(--cloud); }
.band-blue { background: var(--deep); color: #fff; }
.band-blue .lead, .band-blue p { color: #DCEBFF; }
.band-blue .eyebrow { background: rgba(255, 255, 255, .14); color: #fff; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; max-width: 720px; }

/* Hero */
.hero { padding-top: clamp(28px, 6vw, 64px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center; }
.hero h1 .flip { color: var(--sky); }
.hero h1 .flip2 { color: var(--tomato); }
.hero-art { position: relative; display: grid; place-items: center; min-height: 360px; }
.hero-art .owl { width: min(340px, 80%); position: relative; z-index: 1; animation: bob 4s ease-in-out infinite; }
.blob { position: absolute; inset: 8% 6%; background: radial-gradient(circle at 40% 35%, #FFF3B8, #FFE47A 60%, transparent 61%); border-radius: 50%; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-1deg); } }

/* Letter tiles */
.tiles { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 22px 0 8px; perspective: 600px; }
.tile { width: 62px; height: 70px; border-radius: 16px; display: grid; place-items: center; font: 800 36px/1 "Baloo2", sans-serif; color: #fff; background: var(--sky); box-shadow: 0 6px 0 var(--deep); }
.tile.sun { background: var(--sun); color: var(--ink); box-shadow: 0 6px 0 var(--sun-edge); }
.tile.tom { background: var(--tomato); box-shadow: 0 6px 0 var(--tomato-edge); }
.tile.mint { background: var(--mint); color: var(--ink); box-shadow: 0 6px 0 var(--mint-edge); }
.tile.sm { width: 40px; height: 46px; font-size: 24px; border-radius: 11px; box-shadow: 0 4px 0 var(--deep); }
.tile.sm.sun { box-shadow: 0 4px 0 var(--sun-edge); }
.tile.sm.tom { box-shadow: 0 4px 0 var(--tomato-edge); }
.tile.sm.mint { box-shadow: 0 4px 0 var(--mint-edge); }
.flipper { animation: flip 6s ease-in-out infinite; transform-style: preserve-3d; }
@keyframes flip { 0%, 40% { transform: rotateX(0); } 48% { transform: rotateX(90deg); } 56%, 100% { transform: rotateX(0); } }
.arrow { font: 800 28px "Baloo2", sans-serif; color: var(--slate); }
.chain { display: flex; flex-wrap: wrap; gap: 10px 8px; align-items: center; }
.chain .word { display: flex; gap: 4px; }

/* Cards */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font: 800 26px "Baloo2", sans-serif; color: #fff; margin-bottom: 14px; }
.i-sky { background: var(--sky); } .i-sun { background: var(--sun); color: var(--ink) !important; } .i-tom { background: var(--tomato); } .i-mint { background: var(--mint); color: var(--ink) !important; } .i-grape { background: var(--grape); }
.mode { border-top: 8px solid var(--sky); }
.mode.sun { border-top-color: var(--sun); } .mode.tom { border-top-color: var(--tomato); } .mode.mint { border-top-color: var(--mint); }
.tag { display: inline-block; font: 800 13px "Nunito", sans-serif; padding: 4px 10px; border-radius: 999px; background: var(--cloud); color: var(--slate); margin-bottom: 10px; }

/* Bots */
.bot { text-align: center; }
.bot img { width: 170px; height: 170px; object-fit: contain; margin: 0 auto 8px; display: block; }
.level { display: inline-flex; gap: 4px; margin-bottom: 8px; }
.level i { width: 14px; height: 14px; border-radius: 4px; background: var(--line); display: block; }
.level i.on { background: var(--tomato); }

/* Steps */
.steps { counter-reset: s; display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.step { counter-increment: s; position: relative; padding-top: 64px; }
.step::before { content: counter(s); position: absolute; top: 18px; left: 24px; width: 40px; height: 40px; border-radius: 12px; background: var(--sun); box-shadow: 0 4px 0 var(--sun-edge); display: grid; place-items: center; font: 800 22px "Baloo2", sans-serif; }

/* Compare / difference */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 17px; }
.compare th, .compare td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare thead th { background: var(--ink); color: #fff; font: 800 18px "Baloo2", sans-serif; }
.compare tr:last-child td { border-bottom: 0; }
.compare td:first-child { font-weight: 800; }
.yes { color: #157A5E; font-weight: 800; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fact { background: rgba(255, 255, 255, .1); border-radius: 18px; padding: 18px; }
.fact b { display: block; font: 800 36px "Baloo2", sans-serif; color: var(--sun); }

/* FAQ */
details { background: #fff; border: 2px solid var(--line); border-radius: 18px; margin: 12px 0; box-shadow: var(--shadow); }
summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; font: 800 20px "Baloo2", sans-serif; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 9px; background: var(--sun); display: grid; place-items: center; font-size: 22px; }
details[open] summary::after { content: "–"; }
details > div { padding: 0 22px 18px; }

/* Article (legal, about) */
.article h2 { font-size: clamp(26px, 4vw, 34px); margin-top: 1.6em; }
.article h3 { margin-top: 1.4em; }
.article ul, .article ol { padding-left: 24px; }
.article li { margin: 6px 0; }
.note { background: var(--tint); border-radius: 18px; padding: 18px 22px; margin: 18px 0; }
.note.sun { background: #FFF6CC; }
.table { width: 100%; border-collapse: collapse; font-size: 16px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.table th { font: 800 17px "Baloo2", sans-serif; }
.page-hero { padding: clamp(36px, 7vw, 70px) 0 10px; }
.updated { color: var(--slate); font-size: 15px; }

/* CTA + footer */
.cta { background: var(--sun); border-radius: 32px; padding: clamp(28px, 5vw, 48px); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; box-shadow: 0 8px 0 var(--sun-edge); }
.cta img { width: 180px; }
.cta .btn-primary { background: var(--ink); color: #fff; box-shadow: 0 6px 0 #000; }
.site-footer { background: var(--ink); color: #CFCDE6; padding: 48px 0 32px; margin-top: 64px; font-size: 16px; }
.site-footer a { color: #fff; font-weight: 700; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; }
.foot-grid h3 { color: #fff; font-size: 19px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin: 6px 0; }
.legal { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 32px; padding-top: 18px; font-size: 14px; }

/* Confetti dots (decorative) */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.confetti i { position: absolute; width: 12px; height: 12px; border-radius: 50%; opacity: .8; }
.confetti i:nth-child(1) { left: 6%; top: 18%; background: var(--grape); }
.confetti i:nth-child(2) { left: 46%; top: 8%; background: var(--mint); width: 18px; height: 6px; border-radius: 4px; transform: rotate(-30deg); }
.confetti i:nth-child(3) { right: 8%; top: 22%; background: var(--tomato); }
.confetti i:nth-child(4) { left: 12%; bottom: 14%; background: var(--sky); width: 18px; height: 6px; border-radius: 4px; transform: rotate(40deg); }
.confetti i:nth-child(5) { right: 18%; bottom: 10%; background: var(--sun); width: 16px; height: 16px; }
.wrap { position: relative; z-index: 1; }

@media (max-width: 900px) {
  .g4, .facts { grid-template-columns: repeat(2, 1fr); }
  .g3, .steps { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  body { font-size: 17px; }
  .hero-grid, .g2, .g3, .steps, .cta { grid-template-columns: 1fr; }
  .hero-art { min-height: 260px; order: -1; }
  .hero-art .owl { width: 220px; }
  .cta img { width: 130px; justify-self: center; }
  .tile { width: 52px; height: 60px; font-size: 30px; }
  .brand .by { display: none; }
  .site-header .wrap { flex-wrap: nowrap; gap: 14px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 14px; font-size: 16px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
  .brand img { height: 32px; }
}
@media (max-width: 420px) {
  .g4, .facts, .foot-grid { grid-template-columns: 1fr; }
}
