/* Colours: the ChessboardLens "Glacier" theme (app/lib/theme.dart), light and dark. Font: Inter (OFL, fonts/OFL.txt). */
@font-face { font-family: Inter; src: url(/fonts/Inter-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/Inter-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/Inter-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface2: #eef2f7;
  --text: #0f172a;
  --muted: #556070;
  --accent: #2563eb;
  --accent-text: #2563eb;
  --border: #e2e8f0;
  --shadow: 0 1px 2px rgb(15 23 42 / .04), 0 12px 32px -12px rgb(15 23 42 / .12);
  /* the icon's colours */
  --navy: #0f172a;
  --sky: #38bdf8;
  --mint: #10b981;
  --rose: #f43f5e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #111a2e;
    --surface2: #18233b;
    --text: #e6edf7;
    --muted: #94a3b8;
    --accent-text: #8ab6ff;
    --border: #22304a;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 16px 40px -16px rgb(0 0 0 / .6);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-underline-offset: 3px; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- header (floats over the dark hero) ---------- */
header { position: absolute; inset: 0 0 auto; z-index: 10; }
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.brand svg { width: 34px; height: 34px; flex: none; }
nav { display: flex; align-items: center; gap: 6px; }
nav a { color: #b6c2d6; text-decoration: none; font-size: 0.93rem; font-weight: 500; padding: 7px 14px; border-radius: 999px; transition: color .2s, background .2s; }
nav a:hover { color: #fff; background: rgb(255 255 255 / .07); }
nav .lang { color: #fff; border: 1px solid rgb(255 255 255 / .18); margin-left: 8px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #e6edf7;
  background:
    radial-gradient(800px 420px at 85% 30%, rgb(37 99 235 / .35), transparent 70%),
    radial-gradient(600px 400px at 10% 110%, rgb(16 185 129 / .16), transparent 70%),
    var(--navy);
  padding: 168px 0 120px;
}
.hero::before { /* faint chessboard grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgb(255 255 255 / .045) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 500; color: #b6c2d6;
  border: 1px solid rgb(255 255 255 / .14); background: rgb(255 255 255 / .04); padding: 6px 14px; border-radius: 999px; margin-bottom: 28px; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgb(16 185 129 / .18); }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.2rem); color: #fff; margin-bottom: 24px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #8ab6ff, var(--sky) 55%, var(--mint)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.18rem; color: #b6c2d6; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.98rem; text-decoration: none;
  padding: 13px 24px; border-radius: 999px; transition: transform .2s, box-shadow .2s, background .2s; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 8px 24px -8px rgb(37 99 235 / .7); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgb(37 99 235 / .85); }
.btn.ghost { color: #fff; border: 1px solid rgb(255 255 255 / .2); }
.btn.ghost:hover { background: rgb(255 255 255 / .07); }

/* the visual: the icon with its squares drifting away */
.visual { position: relative; aspect-ratio: 1; max-width: 440px; justify-self: end; width: 100%; }
.visual .glow { position: absolute; inset: 12%; border-radius: 30%; background: conic-gradient(from 180deg, #2563eb, var(--sky), var(--mint), var(--rose), #2563eb); filter: blur(60px); opacity: .45; }
.visual img { position: absolute; inset: 14%; width: 72%; height: 72%; border-radius: 23%;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 40px 80px -20px rgb(0 0 0 / .7); }
.visual b { position: absolute; border-radius: 4px; animation: drift 7s ease-in-out infinite; }
.visual b:nth-of-type(1) { width: 18px; height: 18px; background: var(--sky);  top: 8%;  right: 6%; }
.visual b:nth-of-type(2) { width: 12px; height: 12px; background: var(--mint); top: 30%; right: 0;  animation-delay: -2s; }
.visual b:nth-of-type(3) { width: 10px; height: 10px; background: var(--rose); bottom: 18%; right: 3%; animation-delay: -4s; }
.visual b:nth-of-type(4) { width: 8px;  height: 8px;  background: #fff; opacity: .5; top: 4%; right: 26%; animation-delay: -1s; }
.visual b:nth-of-type(5) { width: 14px; height: 14px; background: var(--sky); opacity: .6; bottom: 4%; right: 22%; animation-delay: -3s; }
@keyframes drift { 50% { transform: translate(8px, -10px) rotate(8deg); } }

/* ---------- sections ---------- */
section { padding: 112px 0; }
.kicker { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 14px; }
section h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: 18px; }
.intro { color: var(--muted); font-size: 1.1rem; max-width: 40em; margin-bottom: 56px; }

/* featured app */
.app {
  display: grid; grid-template-columns: 1fr 1.1fr; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow);
}
.app .art { position: relative; display: grid; place-items: center; min-height: 380px;
  background: radial-gradient(420px 300px at 50% 45%, rgb(37 99 235 / .35), transparent 70%), var(--navy); }
.app .art img { width: 58%; max-width: 240px; height: auto; aspect-ratio: 1; border-radius: 23%; box-shadow: 0 30px 60px -20px rgb(0 0 0 / .7); }
.app .body { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.app h3 { font-size: 1.9rem; margin-bottom: 6px; }
.app .tagline { color: var(--accent-text); font-weight: 600; margin-bottom: 18px; }
.app p.desc { color: var(--muted); margin-bottom: 26px; }
.features { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 10px; }
.features li { display: flex; gap: 12px; align-items: baseline; }
.features li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--sky); transform: translateY(1px); }
.features li:nth-child(2)::before { background: var(--mint); }
.features li:nth-child(3)::before { background: var(--rose); }
.features li:nth-child(4)::before { background: var(--accent); }
.soon { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.store { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 600; padding: 9px 16px; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--border); color: var(--text); }
.store svg { width: 18px; height: 18px; fill: currentColor; }
.soon small { color: var(--muted); font-size: 0.88rem; margin-left: 4px; }

/* principles */
.alt { background: var(--surface2); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 32px; box-shadow: var(--shadow); }
.card .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 22px; color: #fff; }
.card .ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { color: var(--muted); }
.services { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 48px; padding: 0; list-style: none; }
.services li { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 18px; font-size: 0.93rem; font-weight: 500; }

/* contact */
.contact { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: stretch; }
.mailcard { border-radius: 28px; padding: 48px; color: #e6edf7; position: relative; overflow: hidden;
  background: radial-gradient(500px 300px at 100% 0%, rgb(37 99 235 / .45), transparent 70%), var(--navy); }
.mailcard h2 { color: #fff; }
.mailcard p { color: #b6c2d6; margin-bottom: 32px; max-width: 30em; }
.mailcard .btn { font-size: 1.02rem; max-width: 100%; overflow-wrap: anywhere; }
.details { background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 40px; box-shadow: var(--shadow); }
.details h3 { font-size: 1.05rem; margin-bottom: 22px; }
dl { margin: 0; display: grid; gap: 16px; }
dl div { display: grid; gap: 2px; }
dt { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
dd { margin: 0; }

footer { border-top: 1px solid var(--border); padding: 32px 0 44px; color: var(--muted); font-size: 0.9rem; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* scroll reveal (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .visual b { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 900px) {
  .hero { padding: 132px 0 88px; }
  .hero .wrap, .app, .contact { grid-template-columns: minmax(0, 1fr); }
  .visual { max-width: 300px; justify-self: center; order: -1; }
  .app .art { min-height: 280px; }
  .app .body, .mailcard { padding: 32px; }
  .cards { grid-template-columns: 1fr; }
  section { padding: 80px 0; }
}
@media (max-width: 620px) {
  nav a:not(.lang) { display: none; }
  .brand span { display: none; }
}
