/* Sorthings by EdNinja: shared styles for every page of the site. */

:root {
  --green-900: #0b4022;
  --green-800: #0e5a2d;
  --green-700: #13733a;
  --green-500: #2bb35d; /* the app's primary green: decoration only, not text */
  --mint: #8fdca6;
  --mint-50: #eaf7ee;
  --sun-50: #fff6dc;
  --orange: #ff8c00;
  --orange-ink: #a34f00; /* orange dark enough for text on white and cream (>= 4.5:1) */
  --yellow: #ffc905;
  --ink: #1d3326;
  --ink-soft: #4c6355;
  --paper: #ffffff;
  --cream: #fffaf2;
  --line: #dcebe0;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(11, 64, 34, 0.12);
  --shadow-sm: 0 4px 14px rgba(11, 64, 34, 0.10);
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Arial Rounded MT Bold", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); }
a:hover { color: var(--green-900); }
/* Orange ring with a dark halo: visible (>= 3:1) on both the light and the dark sections. */
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; box-shadow: 0 0 0 6px var(--green-900); border-radius: 8px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--paper); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 16px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 250, 242, 0.9);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green-900); font-family: var(--font-display); font-size: 19px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.top nav a { text-decoration: none; color: var(--ink-soft); font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.top nav a:hover { background: var(--mint-50); color: var(--ink); }
.lang {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--line); color: var(--ink); font: inherit; font-weight: 800; font-size: 14px;
  padding: 6px 30px 6px 12px; border-radius: 999px; cursor: pointer; margin-left: 6px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%234c6355'/%3E%3C/svg%3E") right 8px center / 18px no-repeat;
}
.lang:hover { background-color: var(--mint-50); }
@media (max-width: 820px) { .top nav a.hide-sm { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--yellow); color: var(--ink); text-decoration: none; font-weight: 800;
  padding: 12px 22px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s ease;
}
.btn:hover { color: var(--ink); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 201, 5, 0.22), transparent 45%),
    radial-gradient(circle at 10% 110%, rgba(255, 140, 0, 0.22), transparent 40%),
    linear-gradient(160deg, var(--green-700), var(--green-800) 70%);
}
.hero::after { /* soft dotted texture */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.12;
  background-image: radial-gradient(#fff 1.4px, transparent 1.6px); background-size: 26px 26px;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 72px 0 96px; }
.eyebrow { display: inline-block; font-weight: 800; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; background: rgba(255, 255, 255, 0.14); padding: 6px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(38px, 5.6vw, 64px); line-height: 1.05; margin: 18px 0 16px; letter-spacing: -1px; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero p.lead { font-size: clamp(18px, 2vw, 21px); max-width: 38ch; opacity: 0.94; margin: 0 0 28px; }
.hero .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.hero .cta .note { font-size: 14px; opacity: 0.9; }

.hero-art { position: relative; justify-self: center; width: min(480px, 100%); aspect-ratio: 1 / 0.9; }
.hero-art .card { position: absolute; width: 62%; background: #fff; padding: 7px; border-radius: 24px; box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28); }
.hero-art .card img { border-radius: 18px; }
.hero-art .c1 { left: 0; top: 4%; transform: rotate(-5deg); }
.hero-art .c2 { right: 0; top: 40%; transform: rotate(4deg); z-index: 2; }
.hero-art .thing { position: absolute; width: 24%; background: #fff; border-radius: 50%; padding: 6px; box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25); z-index: 3; animation: hop 5s ease-in-out infinite; }
.hero-art .t1 { left: 4%; bottom: 0; }
.hero-art .t2 { right: 6%; top: 0; animation-delay: 1.2s; }
@keyframes hop { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .hero-art .thing { animation: none; } }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; padding: 48px 0 80px; }
  .hero p.lead { margin-inline: auto; }
  .hero .cta { justify-content: center; }
  .hero-art { width: min(400px, 92%); }
}

/* Numbered circle used across the site. */
.num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--orange); color: var(--ink); font-family: var(--font-display); font-size: 19px; /* dark digits: >= 4.5:1 on orange */
  border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

/* ---------- Sections ---------- */
main, section { scroll-margin-top: 64px; }
section { padding: 88px 0; }
section.alt { background: var(--paper); }
.kicker { color: var(--orange-ink); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; font-size: 13px; margin: 0 0 8px; }
h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.12; letter-spacing: -0.5px; margin: 0 0 14px; color: var(--green-900); }
.sub { color: var(--ink-soft); font-size: 19px; max-width: 62ch; margin: 0 0 40px; }
.sub.tight { margin-bottom: 24px; }
.center { text-align: center; }
.center .sub { margin-inline: auto; }
@media (max-width: 720px) { section { padding: 64px 0; } }

/* ---------- Try it (mini sorting game) ---------- */
.try-card {
  background: linear-gradient(160deg, #e6f6ea, #fdf3d8);
  border: 1px solid #cfe8d6; border-radius: 32px; padding: 32px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 0.8fr 1.45fr; gap: 32px; align-items: center;
}
.try-card h2 { font-size: 28px; margin: 0 0 8px; line-height: 1.15; }
.try-card p { margin: 0 0 14px; color: var(--ink-soft); }
.try-status { font-weight: 800; min-height: 3.2em; color: var(--green-800); }
.try-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  font: inherit; font-weight: 800; font-size: 15px; background: var(--paper); color: var(--green-800);
  border: 1px solid #b9dcc3; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.pill:hover { background: var(--mint-50); }
.pill svg { width: 18px; height: 18px; fill: currentColor; }

.board { display: grid; gap: 18px; }
.zones { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.zone {
  position: relative; padding: 6px; border: 3px dashed #9fd0ae; border-radius: 22px; background: rgba(255, 255, 255, 0.7);
  font: inherit; color: inherit; cursor: pointer; text-align: center;
}
.zone > img { width: 100%; aspect-ratio: 600 / 464; object-fit: cover; border-radius: 16px; }
.zone .label { position: absolute; top: 12px; left: 12px; background: var(--paper); color: var(--green-900); font-weight: 800; font-size: 15px; padding: 3px 12px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.zone .placed { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; justify-content: center; gap: 6px; min-height: 0; }
.zone .placed img { width: 26%; max-width: 70px; background: #fff; border-radius: 50%; padding: 3px; box-shadow: var(--shadow-sm); animation: snap 0.45s ease; }
.zone.target { border-color: var(--orange); background: #fff4e6; }
.zone.full { border-style: solid; border-color: var(--green-700); }
.zone.nope { animation: nope 0.45s ease; }
.tray { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; min-height: 60px; }
.piece {
  aspect-ratio: 1; padding: 4px; border: 3px solid #fff; border-radius: 50%; background: #fff; cursor: grab;
  box-shadow: var(--shadow-sm); touch-action: none; transition: transform 0.15s ease, opacity 0.2s ease;
}
.piece img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.piece:hover { transform: translateY(-3px); }
.piece[aria-pressed="true"] { border-color: var(--orange); transform: translateY(-4px) scale(1.06); }
.piece.dragging { cursor: grabbing; position: relative; z-index: 10; box-shadow: 0 18px 30px rgba(11, 64, 34, 0.28); transition: none; }
.piece.used { visibility: hidden; }
.piece.nope { animation: nope 0.45s ease; }
@keyframes nope { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes snap { 50% { transform: scale(1.12); } }
.stars { display: flex; gap: 6px; justify-content: center; min-height: 34px; }
.stars svg { width: 34px; height: 34px; fill: var(--yellow); stroke: #c79300; stroke-width: 1; animation: pop 0.5s ease backwards; }
.stars svg:nth-child(2) { animation-delay: 0.15s; }
.stars svg:nth-child(3) { animation-delay: 0.3s; }
@keyframes pop { from { transform: scale(0); } 70% { transform: scale(1.2); } }
@media (prefers-reduced-motion: reduce) {
  .piece, .piece:hover, .piece[aria-pressed="true"] { transition: none; transform: none; }
  .piece.nope, .zone.nope, .zone .placed img, .stars svg { animation: none; }
}
@media (max-width: 860px) { .try-card { grid-template-columns: 1fr; text-align: center; padding: 24px 18px; } .try-actions { justify-content: center; } }
@media (max-width: 520px) { .tray { grid-template-columns: repeat(3, 1fr); width: min(300px, 100%); margin-inline: auto; } .zones { gap: 8px; } .zone .label { font-size: 13px; top: 8px; left: 8px; } }

/* ---------- How it works ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 26px 26px; position: relative; text-align: left; }
.steps li .num { position: absolute; top: -20px; left: 24px; }
.steps h3 { margin: 4px 0 6px; font-size: 21px; color: var(--green-900); }
.steps p { margin: 0; color: var(--ink-soft); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Scenes ---------- */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: left; }
.cat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); margin: 0; }
.cat img { width: 100%; aspect-ratio: 600 / 464; object-fit: cover; }
.cat figcaption { padding: 10px 14px 12px; font-family: var(--font-display); color: var(--green-900); font-size: 17px; }
.more { margin: 28px auto 0; color: var(--ink-soft); max-width: 70ch; }
.free-note { margin: 12px auto 0; font-size: 15px; color: var(--ink-soft); }
@media (max-width: 860px) { .cats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .cats { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* ---------- Make your own ---------- */
.create { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { border-radius: 28px; padding: 32px; position: relative; overflow: hidden; }
.panel h3 { margin: 14px 0 8px; font-size: 24px; line-height: 1.2; }
.panel p { margin: 0 0 12px; }
.panel .icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; }
.panel .icon svg { width: 30px; height: 30px; }
.panel.own { background: var(--paper); border: 1px solid var(--line); }
.panel.own h3 { color: var(--green-900); }
.panel.own p { color: var(--ink-soft); }
.panel.own .icon { background: #fff1de; }
.panel.own .icon svg { fill: var(--orange-ink); }
.panel.dark { background: linear-gradient(150deg, var(--green-800), var(--green-900)); color: #fff; }
.panel.dark .icon { background: rgba(255, 255, 255, 0.15); }
.panel.dark .icon svg { fill: var(--yellow); }
.panel .small { font-size: 14px; }
.panel ul { margin: 0 0 12px; padding-left: 20px; }
@media (max-width: 860px) { .create { grid-template-columns: 1fr; } }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--cream); border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); }
.feature .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--mint-50); }
.feature .ic svg { width: 26px; height: 26px; fill: var(--green-700); }
.feature h3 { margin: 14px 0 6px; font-size: 19px; color: var(--green-900); }
.feature p { margin: 0; color: var(--ink-soft); font-size: 16px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ---------- Parents & trust ---------- */
.parents { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.checks li::before { content: ""; flex: none; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%; background: var(--green-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6 11-11-1.4-1.4z' fill='%23fff'/%3E%3C/svg%3E") center / 18px no-repeat; }
.trust { background: var(--green-800); color: #fff; border-radius: 28px; padding: 32px; position: relative; overflow: hidden; }
.trust h3 { margin: 0 0 12px; font-size: 24px; }
.trust p { margin: 0 0 10px; }
.trust a { color: var(--yellow); font-weight: 800; }
.trust a:hover { color: #fff; }
.trust .kid { position: absolute; width: 110px; right: 12px; bottom: 12px; }
.trust .pad { padding-right: 110px; }
@media (max-width: 860px) { .parents { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .trust .kid { display: none; } .trust .pad { padding-right: 0; } }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 900px; margin: 0 auto; text-align: left; }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: 30px; box-shadow: var(--shadow-sm); }
.plan.premium { border: 2px solid var(--orange); }
.plan .tag { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--mint-50); color: var(--green-800); }
.plan.premium .tag { background: #fff1de; color: var(--orange-ink); }
.plan h3 { margin: 12px 0 4px; font-size: 26px; color: var(--green-900); }
.plan .price { margin: 0 0 16px; color: var(--ink-soft); font-weight: 700; }
.plan .checks li { font-weight: 500; }
.plan.premium .checks li::before { background-color: var(--orange-ink); }
.fine { font-size: 14px; color: var(--ink-soft); max-width: 70ch; margin: 24px auto 0; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* ---------- Help / FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 0 22px; }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font-weight: 800; position: relative; color: var(--green-900); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 400; color: var(--orange-ink); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 18px; color: var(--ink-soft); }
.faq details > div p { margin: 0 0 10px; }
.faq details > div ol, .faq details > div ul { margin: 0 0 10px; padding-left: 22px; }
.contact-card { max-width: 820px; margin: 28px auto 0; background: var(--mint-50); border-radius: 20px; padding: 22px 26px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.contact-card p { margin: 0; }
.contact-card a { font-weight: 800; }

/* ---------- Get it ---------- */
.get { text-align: center; background: linear-gradient(180deg, var(--cream), #fdeedd); }
.get img.title { width: min(420px, 90%); margin: 0 auto 12px; }
.get .soon { display: inline-flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 10px 18px 10px 10px; box-shadow: var(--shadow-sm); font-weight: 800; color: var(--green-900); }
.get .soon img { width: 48px; height: 48px; border-radius: 12px; }

/* ---------- Footer ---------- */
footer { background: var(--green-900); color: rgba(255, 255, 255, 0.88); padding: 56px 0 40px; font-size: 15px; }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
footer img.logo { width: 170px; margin-bottom: 12px; }
footer .fh { color: #fff; font-weight: 800; margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.8px; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
footer a { color: rgba(255, 255, 255, 0.88); text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: 20px; font-size: 13px; color: rgba(255, 255, 255, 0.8); margin: 0; }
@media (max-width: 720px) { footer .wrap { grid-template-columns: 1fr 1fr; } footer .wrap > div:first-child { grid-column: 1 / -1; } }

/* ---------- Legal pages ---------- */
.doc-hero { background: linear-gradient(160deg, var(--green-800), var(--green-900)); color: #fff; padding: 56px 0 48px; }
.doc-hero h1 { margin: 0 0 6px; font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.5px; }
.doc-hero p { margin: 0; color: rgba(255, 255, 255, 0.92); }
.doc-hero .wrap { max-width: 760px; }
.doc { padding: 48px 0 80px; }
.doc .wrap { max-width: 760px; }
.doc h2 { font-size: 24px; margin: 40px 0 10px; letter-spacing: -0.2px; }
.doc h3 { font-size: 18px; margin: 24px 0 6px; color: var(--green-900); }
.doc p, .doc li { color: #233a2c; }
.doc .tldr { background: var(--mint-50); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 8px; }
.doc .tldr h2 { margin-top: 0; }
.doc .note { font-size: 15px; color: var(--ink-soft); border-left: 4px solid var(--mint); padding-left: 14px; }

/* ---------- 404 ---------- */
.lost { min-height: 100vh; display: grid; place-items: center; text-align: center; background: linear-gradient(160deg, var(--green-800), var(--green-900)); color: #fff; padding: 40px 0; }
.lost img { margin: 0 auto 24px; width: 160px; }
.lost h1 { font-size: clamp(28px, 5vw, 44px); margin: 0 0 10px; }
.lost a { color: var(--yellow); font-weight: 800; }

/* Language switching: elements marked for the other language are hidden.
   The page defaults to English (html lang="en"), so it reads fine without JavaScript. */
html:not([lang="en"]) [data-only="en"],
html:not([lang="es"]) [data-only="es"] { display: none !important; }
