/* Square Streak — landing page */

:root {
  --bg: #050807;
  --bg-raised: #0f1512;
  --bg-card: #141b17;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f2f5f3;
  --muted: rgba(242, 245, 243, 0.64);
  --green: #34c759;
  --green-deep: #1f9e45;
  --red: #ff453a;
  --orange: #ff9f0a;
  --radius: 28px;
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap { width: min(var(--max), 100% - 48px); margin-inline: auto; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: rgba(5, 8, 7, 0.72);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  text-decoration: none;
}

.brand img { width: 30px; height: 30px; }

.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 600;
}

.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--text); }

@media (max-width: 720px) {
  .nav-links a:not(.keep) { display: none; }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--bg-card);
  transition: transform 0.15s ease, background 0.15s ease;
}

.button:hover { transform: translateY(-1px); }

.button.primary {
  background: var(--green);
  border-color: transparent;
  color: #04120a;
}

.button.primary:hover { background: #3ed864; }

.button svg { width: 20px; height: 20px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 40px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 900px;
  background: radial-gradient(closest-side, rgba(52, 199, 89, 0.28), transparent);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .actions { justify-content: center; }
  .hero .squares { margin-inline: auto; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

h1 {
  margin: 20px 0 18px;
  font-size: clamp(48px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
}

h1 .yes { color: var(--green); }
h1 .no { color: var(--red); }

.lede {
  font-size: clamp(18px, 2vw, 21px);
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 30px;
}

@media (max-width: 880px) { .lede { margin-inline: auto; } }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.fineprint { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* The little "streak" of squares under the hero copy */
.squares {
  display: flex;
  gap: 8px;
  margin-top: 36px;
  width: max-content;
}

.squares span {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--green);
  opacity: 0;
  animation: pop 0.4s ease forwards;
}

.squares span.miss { background: var(--red); }
.squares span.rest { background: transparent; border: 2px dashed rgba(255, 255, 255, 0.3); }

@keyframes pop {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- Phone frame ---------- */

.phone {
  position: relative;
  width: min(340px, 100%);
  margin-inline: auto;
  padding: 10px;
  border-radius: 54px;
  background: #1a1f1c;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.6) inset;
}

.phone video,
.phone img {
  width: 100%;
  aspect-ratio: 1320 / 2868;
  object-fit: cover;
  border-radius: 44px;
  background: #000;
}

/* ---------- Sections ---------- */

section { padding: 96px 0; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }

h2 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.section-head p { margin: 0; color: var(--muted); font-size: 19px; }

/* Split: text + phone */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split.flip > :first-child { order: 2; }

@media (max-width: 880px) {
  .split, .split.flip { grid-template-columns: 1fr; gap: 40px; }
  .split.flip > :first-child { order: 0; }
}

.split h2 { text-align: left; }

.checklist { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }

.checklist li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  color: var(--muted);
}

.checklist li::before {
  content: "";
  width: 22px;
  height: 22px;
  margin-top: 3px;
  border-radius: 7px;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304120a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 15px no-repeat;
}

.checklist strong { color: var(--text); }

/* ---------- Finishes ---------- */

.finishes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 32px;
}

@media (max-width: 560px) { .finishes { grid-template-columns: repeat(3, 1fr); } }

.finish { text-align: center; font-size: 14px; font-weight: 700; }

.finish .swatch {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  margin-bottom: 10px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.finish small { display: block; color: var(--muted); font-weight: 600; }

.swatch.wood {
  background:
    repeating-linear-gradient(176deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 9px),
    linear-gradient(#8c5a2e, #b37843 45%, #7f4f26);
}

.swatch.bronze { background: linear-gradient(135deg, #f2ad61, #b3662a 35%, #ffc880 55%, #9a541f 78%, #e09a52); }
.swatch.emerald {
  background:
    conic-gradient(from 20deg, rgba(255,255,255,.3), transparent 12%, rgba(0,0,0,.18) 25%, transparent 37%, rgba(255,255,255,.25) 50%, transparent 62%, rgba(0,0,0,.15) 75%, transparent 87%, rgba(255,255,255,.3)),
    linear-gradient(135deg, #33d98c, #057347 30%, #1ab873 55%, #005c38 78%, #26a86b);
}

.swatch.bronze::after,
.swatch.emerald::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.65) 50%, transparent 60%);
  animation: glint 4s ease-in-out infinite;
}

@keyframes glint {
  from { transform: translateX(-60%); }
  to { transform: translateX(60%); }
}

.swatch.rgb {
  background: linear-gradient(135deg, #ff375f, #ff9f0a, #ffd60a, #30d158, #64d2ff, #5e5ce6, #bf5af2);
  animation: hue 8s linear infinite;
}

@keyframes hue { to { filter: hue-rotate(360deg); } }

.swatch.crystal {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(210, 230, 255, 0.5), rgba(255, 255, 255, 0.75), rgba(255, 225, 245, 0.5));
}

.swatch.crystal::before,
.swatch.crystal::after {
  content: "✦";
  position: absolute;
  color: #fff;
  font-size: 22px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
  animation: twinkle 2.2s ease-in-out infinite;
}

.swatch.crystal::before { top: 18%; left: 22%; }
.swatch.crystal::after { bottom: 16%; right: 20%; font-size: 15px; animation-delay: 1.1s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.1; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .squares span { opacity: 1; }
}

/* ---------- Gallery ---------- */

.gallery {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 24px 28px;
  margin-inline: calc((100vw - min(var(--max), 100vw - 48px)) / -2);
  padding-inline: max(24px, calc((100vw - var(--max)) / 2));
  scrollbar-width: thin;
}

.gallery figure {
  flex: 0 0 250px;
  margin: 0;
  scroll-snap-align: center;
}

.gallery img {
  width: 100%;
  border-radius: 32px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.gallery figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- Feature grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 880px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.card {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
}

.card .icon { font-size: 30px; line-height: 1; }

.card h3 { margin: 14px 0 6px; font-size: 20px; }

.card p { margin: 0; color: var(--muted); font-size: 16px; }

.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  vertical-align: 3px;
}

/* ---------- Pricing ---------- */

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 820px;
  margin-inline: auto;
}

@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }

.plan {
  padding: 34px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
}

.plan.pro {
  border-color: rgba(52, 199, 89, 0.55);
  background: linear-gradient(160deg, rgba(52, 199, 89, 0.14), var(--bg-card) 55%);
}

.plan h3 { margin: 0; font-size: 22px; }

.price { margin: 10px 0 4px; font-size: 46px; font-weight: 800; letter-spacing: -0.02em; }
.price small { font-size: 17px; color: var(--muted); font-weight: 600; letter-spacing: 0; }

.plan .checklist { margin-top: 22px; }

/* ---------- Privacy band ---------- */

.band {
  border-radius: 36px;
  padding: 56px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(52, 199, 89, 0.22), transparent 70%), var(--bg-raised);
  border: 1px solid var(--line);
}

.band p { color: var(--muted); max-width: 40em; margin: 0 auto; font-size: 19px; }

/* ---------- Footer ---------- */

footer {
  padding: 48px 0 64px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; }

footer nav { display: flex; gap: 24px; margin-left: auto; }

footer a { text-decoration: none; }
footer a:hover { color: var(--text); }

/* ---------- Text pages (privacy, support, press) ---------- */

.doc { padding: 72px 0 96px; }

.doc .wrap { max-width: 760px; }

.doc h1 { font-size: clamp(40px, 6vw, 60px); }

.doc h2 { font-size: 26px; margin-top: 44px; }

.doc p, .doc li { color: var(--muted); }

.doc strong { color: var(--text); }

.doc .updated { color: var(--muted); font-size: 15px; }

.doc details {
  margin: 12px 0;
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
}

.doc summary { cursor: pointer; font-weight: 700; color: var(--text); }

.doc details p { margin: 12px 0 0; }

.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 20px; }

.downloads a {
  display: block;
  padding: 18px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 700;
}

.downloads a span { display: block; font-weight: 500; font-size: 14px; color: var(--muted); }

.swatches { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; }

.swatches div { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }

.swatches i { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); }
