/* Work Freelance website. Brand matches the app (app/lib/ui/theme.dart). */
:root {
  --indigo: #3b2fc9;
  --indigo-dark: #241c8a;
  --indigo-light: #6d5bff;
  --amber: #f5a524;
  --green: #16a34a;
  --red: #dc2626;

  --bg: #f6f5fb;
  --surface: #ffffff;
  --surface-2: #fafafe;
  --text: #17161f;
  --muted: #5d5b6e;
  --border: #e6e4f0;
  --primary: var(--indigo);
  --primary-soft: rgba(59, 47, 201, 0.08);
  --shadow: 0 1px 2px rgba(23, 22, 31, 0.04), 0 8px 24px rgba(36, 28, 138, 0.06);
  --radius: 14px;
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0d14;
    --surface: #14131c;
    --surface-2: #1b1a25;
    --text: #ecebf5;
    --muted: #a3a1b5;
    --border: #2b2a38;
    --primary: #a9a2ff;
    --primary-soft: rgba(169, 162, 255, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0d14;
  --surface: #14131c;
  --surface-2: #1b1a25;
  --text: #ecebf5;
  --muted: #a3a1b5;
  --border: #2b2a38;
  --primary: #a9a2ff;
  --primary-soft: rgba(169, 162, 255, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 750; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 24px; } }
.muted { color: var(--muted); }
.center { text-align: center; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 650; font-size: 1.2rem; margin-right: auto; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 550; font-size: 0.95rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--primary-soft); color: var(--primary); }
.nav a[aria-current="page"] { color: var(--primary); }
.nav .btn { margin-left: 6px; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; }
.nav a.btn-primary:hover { background: var(--indigo-dark); }
.menu-btn { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; width: 42px; height: 42px; color: var(--text); cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }
@media (max-width: 820px) {
  .menu-btn { display: inline-grid; place-items: center; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 16px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav .btn { margin: 8px 0 0; text-align: center; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 650; font-size: 0.98rem; line-height: 1;
  padding: 14px 22px; border-radius: 10px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-dark); }
.btn-amber { background: var(--amber); color: #17161f; }
.btn-amber:hover { background: #ffb43d; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-outline { background: var(--surface); color: var(--primary); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); }
.btn-sm { padding: 10px 16px; font-size: 0.92rem; }
.btn-block { width: 100%; }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

/* Microsoft Store badge-style button */
.store-btn { background: #000; color: #fff; padding: 10px 18px; border-radius: 10px; gap: 12px; border: 1px solid rgba(255,255,255,0.25); }
.store-btn:hover { background: #1a1a1a; }
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.store-btn small { font-size: 0.72rem; font-weight: 500; opacity: 0.85; }
.store-btn strong { font-size: 1.05rem; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--indigo-dark), var(--indigo) 55%, var(--indigo-light));
  color: #fff; overflow: hidden; position: relative;
}
.hero::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -200px;
  background: radial-gradient(circle, rgba(245, 165, 36, 0.35), transparent 65%); pointer-events: none;
}
.hero .wrap { display: grid; gap: 40px; padding-top: 64px; padding-bottom: 64px; position: relative; z-index: 1; }
@media (min-width: 980px) { .hero .wrap { grid-template-columns: 1.05fr 1fr; align-items: center; padding-top: 88px; padding-bottom: 88px; } }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero .lead { color: rgba(255, 255, 255, 0.85); font-size: 1.12rem; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.7rem; font-weight: 900; line-height: 1.1; }
.hero-stats span { color: rgba(255, 255, 255, 0.75); font-size: 0.92rem; }
.hero-shot {
  border-radius: 14px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 30px 60px rgba(10, 6, 60, 0.45); transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  background: #fff;
}
@media (max-width: 979px) { .hero-shot { transform: none; } }

/* Sections */
section { padding: 72px 0; }
.section-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); background: var(--primary-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }
.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.alt .card { background: var(--bg); box-shadow: none; }

.icon-dot { width: 42px; height: 42px; border-radius: 50%; background: var(--amber); color: var(--indigo-dark); display: grid; place-items: center; flex: none; }
.icon-dot svg { width: 22px; height: 22px; }
.card-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-title h3 { margin: 0; font-size: 1.35rem; }

.checks { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.checks li::before {
  content: ""; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--green);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.4 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.4 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.checks strong { display: block; }
.checks span { color: var(--muted); font-size: 0.95rem; }
.checks.compact { gap: 10px; }
.checks.compact li { font-size: 0.97rem; }

.step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--amber); color: #17161f; font-weight: 800; display: grid; place-items: center; margin-bottom: 14px; }
.step p { color: var(--muted); margin: 0; }

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.cat { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; font-weight: 600; }
.cat svg { width: 22px; height: 22px; color: var(--primary); flex: none; }

/* Screenshot gallery */
.shots { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.shot { margin: 0; }
.shot img { border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); background: #fff; }
.shot figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 10px; text-align: center; }

/* Comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 520px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }
th { font-size: 0.9rem; color: var(--muted); font-weight: 650; background: var(--surface-2); }
td.good { color: var(--green); font-weight: 700; }
.fine { font-size: 0.85rem; color: var(--muted); margin-top: 12px; }

/* Pricing */
.plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan.featured { border: 2px solid var(--primary); }
.plan .badge { position: absolute; top: 20px; right: 20px; background: rgba(245, 165, 36, 0.16); color: #b26b00; font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
:root[data-theme="dark"] .plan .badge { color: var(--amber); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .plan .badge { color: var(--amber); } }
.plan h3 { font-size: 1.3rem; margin-bottom: 6px; }
.price { font-size: 2.4rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 4px; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .for { color: var(--muted); font-size: 0.95rem; margin-bottom: 20px; }
.plan .checks { flex: 1; }
.plan-actions { display: grid; gap: 10px; }

.upgrades { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.upgrade { display: flex; flex-direction: column; }
.upgrade-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.upgrade-top h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.upgrade-top h3 svg { width: 20px; height: 20px; }
.upgrade .amount { font-weight: 800; font-size: 1.2rem; }
.upgrade p { color: var(--muted); font-size: 0.95rem; flex: 1; }

.notice { display: flex; gap: 14px; align-items: flex-start; background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); border-radius: 12px; padding: 16px 18px; margin-bottom: 32px; }
.notice svg { width: 22px; height: 22px; flex: none; color: var(--primary); margin-top: 2px; }
.notice p { margin: 0; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 20px; }
.alt .faq details { background: var(--bg); }
.faq summary { cursor: pointer; font-weight: 650; padding: 18px 28px 18px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 1.5rem; color: var(--primary); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 6px; }

/* CTA band */
.cta { background: linear-gradient(135deg, var(--indigo-dark), var(--indigo)); color: #fff; border-radius: 20px; padding: 48px 28px; text-align: center; position: relative; overflow: hidden; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.85); max-width: 560px; margin: 0 auto 26px; }
.cta .hero-actions { justify-content: center; margin: 0; }

/* Legal / text pages */
.page-head { background: var(--surface); border-bottom: 1px solid var(--border); padding: 56px 0 40px; }
.page-head p { color: var(--muted); margin: 0; }
.prose { max-width: 760px; padding: 48px 16px 72px; margin: 0 auto; }
.prose h2 { font-size: 1.4rem; margin-top: 2em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.5em; }

/* Contact */
.contact-card { display: flex; gap: 16px; align-items: flex-start; }
.contact-card h3 { margin-bottom: 4px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 48px 0 32px; margin-top: 0; font-size: 0.95rem; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); margin-bottom: 32px; }
.site-footer h4 { margin: 0 0 12px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--primary); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 24px; color: var(--muted); }
.theme-toggle { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 0.88rem; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn:hover { transition: none; transform: none; }
}

/* Explainer video (click-to-play: YouTube loads only when the visitor presses play) */
.video-frame { max-width: 960px; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: #07061a; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-facade { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: none; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; transform: translate(-50%, -50%); transition: transform .15s ease; filter: drop-shadow(0 4px 14px rgba(0,0,0,.45)); }
.video-play svg { width: 100%; height: 100%; display: block; }
.video-facade:hover .video-play, .video-facade:focus-visible .video-play { transform: translate(-50%, -50%) scale(1.1); }
.video-facade:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.video-note { text-align: center; margin: 16px 0 0; font-size: .95rem; }

/* Contact form */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; max-width: 1000px; margin: 0 auto; align-items: start; }
.contact-side { display: grid; gap: 16px; }
@media (max-width: 820px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-form h2 { margin: 0 0 6px; font-size: 1.5rem; }
.contact-form > p.muted { margin: 0 0 20px; }
.contact-form label { display: block; font-weight: 600; font-size: .95rem; margin: 14px 0 6px; }
.contact-form input, .contact-form textarea { width: 100%; box-sizing: border-box; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s; }
.contact-form textarea { resize: vertical; min-height: 150px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.contact-form [aria-invalid="true"] { border-color: #d93a4b; }
.cf-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cf-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.cf-count { font-size: .85rem; }
.contact-form button[disabled] { opacity: .65; cursor: progress; }
.cf-status { margin: 14px 0 0; min-height: 1.4em; font-weight: 500; }
.cf-status.ok { color: #13915a; }
.cf-status.err { color: #d93a4b; }
:root[data-theme="dark"] .cf-status.ok { color: #45d483; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cf-status.ok { color: #45d483; } }
