/* GridMaster landing: colors and shapes follow the app's tactile theme */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/outfit-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;
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/outfit-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #161a33;
  --bg-deep: #10132a;
  --surface: #232848;
  --raised: #2c3258;
  --line: #363d68;
  --text: #ffffff;
  --text-2: #b4bad8;
  --text-3: #858bb0;

  --red: #ff6656;
  --red-edge: #c9473a;
  --blue: #3fa2f6;
  --blue-edge: #2a78bd;
  --green: #2fd28a;
  --green-edge: #1f9a63;
  --yellow: #fdc93a;
  --yellow-edge: #d39b17;
  --ink: #1d2140;

  --radius: 22px;
  --gutter: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 50% -200px, #1f7a5a55, transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--text-2);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--yellow); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

h1, h2, h3 { color: var(--text); line-height: 1.1; font-weight: 900; letter-spacing: -0.02em; }

/* Header */
.site-header { padding: 18px 0; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 900; font-size: 20px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--text); }

.lang { position: relative; }
.lang summary {
  list-style: none;
  cursor: pointer;
  color: var(--text);
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
}
.lang summary::-webkit-details-marker { display: none; }
.lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  min-width: 150px;
  z-index: 10;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.lang li a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--text-2); text-decoration: none; }
.lang li a:hover, .lang li a[aria-current="true"] { background: var(--raised); color: var(--text); }

/* Buttons: tactile, with a bottom edge like the app keys */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
  border: 0;
  border-radius: 18px;
  padding: 15px 24px;
  cursor: pointer;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 5px 0 var(--yellow-edge), 0 14px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--yellow-edge); }
.btn.dark { color: var(--text); background: var(--raised); box-shadow: 0 5px 0 #1a1e3d, 0 14px 30px rgba(0, 0, 0, 0.3); }
.btn.dark:active { box-shadow: 0 1px 0 #1a1e3d; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn small { display: block; font-size: 11px; font-weight: 600; opacity: 0.75; line-height: 1; }
.btn span { text-align: left; line-height: 1.15; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

.store-buttons { display: flex; flex-wrap: wrap; gap: 14px; }

/* Hero */
.hero { padding: 40px 0 72px; }
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; color: var(--green); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; font-size: 13px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.lead { font-size: 19px; max-width: 540px; margin-bottom: 30px; }
.hero-phone { justify-self: center; position: relative; }
.hero-phone img { width: min(320px, 78vw); border-radius: 34px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); border: 1px solid var(--line); }

/* Decorative tiles */
.tiles { position: absolute; inset: 0; pointer-events: none; }
.tile { position: absolute; width: 54px; height: 54px; border-radius: 14px; }
.tile.r { background: var(--red); box-shadow: 0 6px 0 var(--red-edge); top: 8%; left: -40px; transform: rotate(-12deg); }
.tile.b { background: var(--blue); box-shadow: 0 6px 0 var(--blue-edge); bottom: 14%; left: -54px; transform: rotate(9deg); }
.tile.g { background: var(--green); box-shadow: 0 6px 0 var(--green-edge); top: 18%; right: -46px; transform: rotate(14deg); }
.tile.y { background: var(--yellow); box-shadow: 0 6px 0 var(--yellow-edge); bottom: 6%; right: -30px; transform: rotate(-8deg); }

/* Sections */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 12px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.step .num { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; font-weight: 900; color: var(--ink); margin-bottom: 16px; }
.step:nth-child(1) .num { background: var(--red); box-shadow: 0 4px 0 var(--red-edge); }
.step:nth-child(2) .num { background: var(--blue); box-shadow: 0 4px 0 var(--blue-edge); }
.step:nth-child(3) .num { background: var(--green); box-shadow: 0 4px 0 var(--green-edge); }
.step h3 { font-size: 21px; margin-bottom: 8px; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 36px 0; }
.feature.flip .feature-text { order: 2; }
.feature h3 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 14px; }
.feature p { font-size: 18px; }
.feature img { width: min(300px, 74vw); margin: 0 auto; border-radius: 30px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }

.extras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.extra { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.extra h3 { font-size: 19px; margin-bottom: 8px; }

.cta { text-align: center; }
.cta .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 30px; padding: 48px 24px; }
.cta h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 12px; }
.cta p { margin-bottom: 28px; }
.cta .store-buttons { justify-content: center; }

/* Forms */
.form { display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: relative; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { color: var(--text); font-weight: 700; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--text-3); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  width: 100%;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--red); }
.field-error { color: var(--red); font-size: 14px; }
.field-error:empty { display: none; }
.consent { font-size: 14px; color: var(--text-3); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-radius: 14px; padding: 14px 16px; font-weight: 600; color: var(--text); }
.notice:empty { display: none; }
.notice.ok { background: #1f9a6333; border: 1px solid var(--green); }
.notice.bad { background: #c9473a33; border: 1px solid var(--red); }

.faq { margin-top: 44px; display: grid; gap: 12px; }
.faq h2 { font-size: 26px; margin-bottom: 6px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; }
.faq summary { color: var(--text); font-weight: 700; cursor: pointer; }
.faq details p { margin-top: 10px; }

/* Legal text */
.legal { padding: 24px 0 72px; }
.legal h1 { font-size: clamp(32px, 5vw, 46px); margin-bottom: 10px; }
.legal .updated { color: var(--text-3); margin-bottom: 36px; }
.legal h2 { font-size: 24px; margin: 40px 0 12px; }
.legal h3 { font-size: 18px; margin: 24px 0 8px; }
.legal p, .legal li { margin-bottom: 10px; }
.legal ul { padding-left: 22px; margin-bottom: 12px; }
.legal address { font-style: normal; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; margin: 12px 0 16px; color: var(--text); }
.legal .toc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin-bottom: 8px; }
.legal .toc ol { padding-left: 20px; }
.legal .toc a { color: var(--text-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 14px; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

@media (max-width: 860px) {
  .hero .container, .feature { grid-template-columns: 1fr; gap: 36px; }
  .hero { text-align: center; padding-top: 16px; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero .store-buttons { justify-content: center; }
  .feature, .feature.flip { text-align: center; }
  .feature.flip .feature-text { order: 0; }
  .steps, .extras { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .nav .hide-sm { display: none; }
  .tile { display: none; }
}
