/* =========================================================
   Site Sorted Team – main site styles
   Mobile-first: the base rules are for phones; the
   @media (min-width) blocks add layout for bigger screens.
   ========================================================= */

/* Design tokens – change colours here and the whole site follows */
:root {
  --ink: #10192b;
  --ink-2: #3a4558;
  --muted: #566174;
  --bg: #ffffff;
  --bg-soft: #f4f6fb;
  --line: #e2e6ef;
  --brand: #1f4fd8;
  --brand-dark: #173ba3;
  --brand-soft: #e8eefc;
  --accent: #ffb020;
  --ok: #0a7a43;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 25, 43, .08);
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 6vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2rem; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--ink); color: #fff; padding: .75rem 1rem; border-radius: 8px; }
.skip-link:focus { left: 1rem; top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header + navigation ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.logo { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.logo svg { flex: none; }
.nav-toggle { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; font: inherit; font-weight: 700; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; }
.site-nav { display: none; position: absolute; top: 100%; left: -1.25rem; right: -1.25rem; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: .5rem 1.25rem 1.25rem; }
.site-nav a { display: block; padding: .8rem 0; color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.site-nav a[aria-current="page"] { color: var(--brand); }
.site-nav a.btn { margin-top: 1rem; color: #fff; text-align: center; border-bottom: 0; }

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; position: static; background: none; border: 0; box-shadow: none; }
  .site-nav ul { display: flex; align-items: center; gap: 1.5rem; padding: 0; }
  .site-nav a { padding: .25rem 0; border: 0; font-size: .97rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--brand); }
  .site-nav a.btn { margin: 0; padding: .6rem 1.15rem; box-shadow: none; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: .85rem 1.4rem; font: inherit; font-weight: 700; line-height: 1.2; color: #fff; text-decoration: none; background: var(--brand); border: 2px solid var(--brand); border-radius: 999px; cursor: pointer; transition: transform .15s, background .15s; }
.btn:hover { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-1px); }
.btn-outline { color: var(--brand); background: transparent; }
.btn-outline:hover { color: var(--brand-dark); background: var(--brand-soft); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 680px; margin-bottom: 2.25rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow { display: inline-block; margin-bottom: .6rem; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.lead { font-size: 1.2rem; color: var(--ink-2); }
.muted { color: var(--muted); }
.center { text-align: center; }

.hero { padding: 3.5rem 0; background: linear-gradient(180deg, var(--brand-soft), #fff 85%); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .hero { padding: 5rem 0 4rem; } .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.hero-points { display: grid; gap: .4rem; margin: 1.5rem 0 0; padding: 0; list-style: none; color: var(--ink-2); }
.hero-points li::before { content: "✓"; margin-right: .55rem; font-weight: 800; color: var(--ok); }

.page-hero { padding: 3.25rem 0 2.5rem; background: linear-gradient(180deg, var(--brand-soft), #fff); }
.page-hero p { max-width: 680px; }

/* ---------- Grids + cards ---------- */
.grid { display: grid; gap: 1.5rem; }
@media (min-width: 700px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card { padding: 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 1rem; font-size: 1.4rem; background: var(--brand-soft); border-radius: 12px; }
.step-num { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 1rem; font-weight: 800; color: #fff; background: var(--brand); border-radius: 50%; }

/* Browser frame used around live previews */
.browser { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.browser-bar { display: flex; gap: 6px; padding: .6rem .8rem; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.browser-bar span { width: 10px; height: 10px; background: #cfd5e1; border-radius: 50%; }

/* Live preview: a real demo page loaded in an iframe and scaled down.
   main.js sets --s (the scale) to fit the card width. */
.preview { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); }
.preview iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform: scale(var(--s, .3)); transform-origin: 0 0; pointer-events: none; }

/* Example cards */
.example-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: box-shadow .2s, transform .2s; }
.example-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.example-card .preview { border-bottom: 1px solid var(--line); }
.example-body { display: flex; flex: 1; flex-direction: column; gap: .55rem; padding: 1.25rem 1.4rem 1.5rem; }
.example-body h3 { margin: 0; }
.example-body p { margin: 0; }
.demo-name { font-size: .9rem; font-weight: 700; color: var(--muted); }
.who { font-size: .94rem; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: .25rem 0 .5rem; padding: 0; list-style: none; }
.tag { padding: .2rem .65rem; font-size: .78rem; font-weight: 700; color: var(--brand-dark); background: var(--brand-soft); border-radius: 999px; }
.example-body .btn { align-self: flex-start; margin-top: auto; }

/* ---------- Pricing ---------- */
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.badge { position: absolute; top: -13px; left: 1.5rem; padding: .25rem .7rem; font-size: .75rem; font-weight: 800; color: #fff; background: var(--brand); border-radius: 999px; }
.price { margin: .4rem 0 .25rem; font-size: 2.1rem; font-weight: 800; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.ticks { display: grid; gap: .5rem; margin: 1rem 0 1.5rem; padding: 0; list-style: none; }
.ticks li { position: relative; padding-left: 1.7rem; }
.ticks li::before { content: "✓"; position: absolute; left: 0; font-weight: 800; color: var(--ok); }
.crosses li::before { content: "✕"; color: #b42318; }
.price-card .btn { margin-top: auto; text-align: center; }

/* ---------- How it works timeline ---------- */
.timeline { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.timeline > li { position: relative; padding: 1.5rem 1.5rem 1.5rem 4.6rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.timeline > li::before { counter-increment: step; content: counter(step); position: absolute; top: 1.4rem; left: 1.3rem; display: grid; place-items: center; width: 42px; height: 42px; font-weight: 800; color: #fff; background: var(--brand); border-radius: 50%; }
.timeline h2 { font-size: 1.35rem; }
.who-does { display: grid; gap: .75rem; margin-top: 1rem; }
@media (min-width: 760px) { .who-does { grid-template-columns: 1fr 1fr 1fr; } }
.who-does div { padding: .85rem 1rem; font-size: .95rem; background: var(--bg-soft); border-radius: 10px; }
.who-does strong { display: block; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-dark); }

/* ---------- FAQ (native <details>, works without JS) ---------- */
.faq { max-width: 820px; }
.faq h2 { margin-top: 2.5rem; font-size: 1.4rem; }
.faq details { margin-bottom: .75rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.faq summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; font-weight: 700; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.4rem; line-height: 1; color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 1.25rem 1.1rem; color: var(--ink-2); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.15rem; }
.form-row { display: grid; gap: 1.15rem; }
@media (min-width: 700px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; margin-bottom: .35rem; font-weight: 700; }
.field .hint { font-size: .9rem; font-weight: 400; color: var(--muted); }
input, select, textarea { width: 100%; padding: .8rem .9rem; font: inherit; color: var(--ink); background: #fff; border: 2px solid #c5ccda; border-radius: 10px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
textarea { min-height: 140px; resize: vertical; }
.form-small { font-size: .9rem; color: var(--muted); }
.form-status { padding: 1rem 1.2rem; font-weight: 600; border-radius: 10px; }
.form-status.ok { color: #0b5e36; background: #e7f6ee; }
.form-status.err { color: #8a1c12; background: #fdecea; }
.hp { position: absolute; left: -5000px; } /* honeypot field – hidden from people, bots fill it in */

/* Clearly-marked placeholder boxes (things for you to replace) */
.placeholder { padding: 1.25rem; color: #5e4500; background: #fff8e6; border: 2px dashed #d99a00; border-radius: 12px; }
.placeholder strong { display: block; margin-bottom: .25rem; }

/* ---------- Misc layouts ---------- */
.two-col { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1.25fr .75fr; align-items: start; } }
.prose { max-width: 720px; }
.prose h2 { margin-top: 2rem; font-size: 1.5rem; }
.side-box { padding: 1.5rem; background: var(--bg-soft); border-radius: var(--radius); }
.side-box h2 { font-size: 1.2rem; }
.photo-ph { display: grid; place-items: center; aspect-ratio: 4 / 5; padding: 1rem; text-align: center; color: var(--muted); background: repeating-linear-gradient(45deg, #eef1f7 0 12px, #e6eaf2 12px 24px); border-radius: var(--radius); }

/* ---------- CTA band + footer ---------- */
.cta-band { display: grid; gap: 1.25rem; padding: 2.5rem; color: #fff; background: var(--ink); border-radius: 22px; }
.cta-band h2 { margin: 0; }
.cta-band p { margin: 0; color: #c9d2e3; }
.cta-band .btn { color: var(--ink); background: var(--accent); border-color: var(--accent); }
.cta-band .btn:hover { background: #ffc24d; border-color: #ffc24d; }
@media (min-width: 800px) { .cta-band { grid-template-columns: 1fr auto; align-items: center; padding: 3rem; } }

.site-footer { padding: 3rem 0 2rem; font-size: .95rem; color: #b9c3d6; background: #0b1220; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-logo { font-size: 1.15rem; font-weight: 800; color: #fff; }
.footer-h { margin-bottom: .75rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: #8d99b0; }
.site-footer ul { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.footer-bottom { margin-top: 2rem; padding-top: 1.5rem; font-size: .85rem; border-top: 1px solid #1f2a40; }
