/* Shared styles for the static service pages (freelance-*.html, contact, consulting, /lab).
   Self-contained on purpose: these pages don't load the React app's tokens (src/index.scss),
   so the "Clean White + Blue" palette is repeated here with literal values. */
:root {
  --brand: #0a0a0a;   /* blue 600 */
  --brand-2: #262626; /* blue 700 */
  --ink: #0a0a0a;
  --ink-soft: #525252;
  --line: #e5e5e5;
  --tint: #fafafa;
  --card: #ffffff;
  --bg: #ffffff;
  --radius: 16px;
  --link: #262626;    /* blue 700: 7:1 on white */
  --night: #0a0a0a;
  --night-line: rgba(148, 163, 184, .18);
  /* hero: light by default, dark slate for visitors in dark mode */
  /* black hero on every page, like the homepage */
  --hero-bg: radial-gradient(900px 460px at 50% -25%, rgba(255, 255, 255, .1), transparent 62%), #0a0a0a;
  --hero-ink: #ffffff;
  --hero-soft: #a3a3a3;
  --hero-line: #262626;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e5e5e5;
    --ink-soft: #a3a3a3;
    --line: #171717;
    --tint: #0a0a0a;
    --card: #171717;
    --bg: #0a0a0a;
    --link: #e5e5e5;
    --hero-line: #262626;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--link); }
a:hover { color: var(--brand-2); }
@media (prefers-color-scheme: dark) { a:hover { color: #e5e5e5; } }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: .2px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.nav a { color: var(--ink-soft); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--link); }
@media (max-width: 640px) {
  .topbar { position: static; }
  .topbar .wrap { padding-top: 8px; padding-bottom: 8px; }
}

/* Hero */
.hero { background: var(--hero-bg); color: var(--hero-ink); padding: 64px 0 56px; border-bottom: 1px solid var(--hero-line); }
.crumbs { font-size: 14px; opacity: .85; margin: 0 0 14px; }
.crumbs { color: var(--hero-soft); }
.crumbs a { color: var(--link); }
.hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.12; letter-spacing: -.025em; font-weight: 800; color: var(--hero-ink); margin: 0 0 14px; }
.hero .lede { font-size: clamp(17px, 2.2vw, 20px); max-width: 760px; margin: 0 0 26px; color: var(--hero-soft); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 26px -12px rgba(0, 0, 0, .7); }
.btn-primary:hover { color: #fff; background: var(--brand-2); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); background: var(--card); }
/* on the black hero: white primary button, outlined secondary */
.hero .btn-primary { background: #fff; color: #0a0a0a; box-shadow: 0 10px 30px -12px rgba(255, 255, 255, .35); }
.hero .btn-primary:hover { background: #e5e5e5; color: #0a0a0a; }
.hero .btn-ghost { border-color: rgba(255, 255, 255, .28); color: #fff; background: rgba(255, 255, 255, .06); }
.hero .btn-ghost:hover { color: #fff; border-color: rgba(255, 255, 255, .6); }
.hero .crumbs a { color: #fff; }
.hero .facts li::before { color: #fff; }
.btn-ghost:hover { color: var(--link); border-color: var(--brand); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--hero-soft); }
.facts li::before { content: "✓ "; font-weight: 700; color: var(--brand); }

/* Sections */
section.block { padding: 48px 0; border-bottom: 1px solid var(--line); }
section.block.tint { background: var(--tint); }
h2 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.2; letter-spacing: -.02em; font-weight: 800; margin: 0 0 14px; }
h3 { font-size: 19px; margin: 0 0 8px; }
.intro { color: var(--ink-soft); max-width: 760px; margin: 0 0 24px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p { margin: 0; color: var(--ink-soft); }
.card .meta { margin-top: 10px; font-size: 14px; color: var(--ink-soft); }
.card .meta strong { color: var(--ink); }

.ticks { list-style: none; padding: 0; margin: 0; columns: 2 260px; column-gap: 28px; }
.ticks li { break-inside: avoid; padding-left: 26px; position: relative; margin-bottom: 10px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 16px 18px 16px 62px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: counter(step); position: absolute; left: 18px; top: 16px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 15px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.tags li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; font-size: 15px; }

table.prices { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.prices th, table.prices td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.prices th { font-size: 14px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-soft); }
table.prices tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }
.note { font-size: 15px; color: var(--ink-soft); margin-top: 12px; }

/* FAQ */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--brand); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--ink-soft); }

/* Closing CTA */
.closing { text-align: center; padding: 56px 0; }
.closing p { color: var(--ink-soft); max-width: 640px; margin: 0 auto 22px; }
.closing .btn-primary { background: var(--brand); color: #fff; }

/* Footer */
.site-footer { border-top: 1px solid var(--night-line); background: var(--night); padding: 32px 0; font-size: 15px; color: #a3a3a3; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.site-footer a { color: #d4d4d4; }
.site-footer a:hover { color: #fff; }

/* Article text */
.prose { max-width: 760px; }
.prose p { margin: 0 0 16px; }
.prose p:last-child { margin-bottom: 0; }

/* Linked cards (case studies, guides) */
a.link-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: transform .2s ease, box-shadow .2s ease; }
a.link-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0, 0, 0, .18); color: var(--ink); }
a.link-card .thumb { margin: -22px -22px 16px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--tint); aspect-ratio: 16 / 10; }
a.link-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
a.link-card .more { margin-top: auto; padding-top: 12px; color: var(--link); font-weight: 600; font-size: 15px; }

/* Screenshot galleries */
.shots { display: grid; gap: 14px; }
.shots img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.shots-mobile { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.shots-web { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }

.btn-outline { border: 2px solid var(--link); color: var(--link); }
.btn-outline:hover { background: var(--brand); color: #fff; }

/* "Email me" panel (landing.js) */
.email-sheet { position: fixed; inset: 0; z-index: 50; background: rgba(15, 17, 24, .45); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
@media (min-width: 640px) { .email-sheet { align-items: center; } }
.email-sheet__panel { position: relative; width: 100%; max-width: 420px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 24px 22px 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.email-sheet__close { position: absolute; top: 10px; right: 12px; border: 0; background: none; color: var(--ink-soft); font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 8px; }
.email-sheet__label { margin: 0; font-size: 14px; color: var(--ink-soft); }
.email-sheet__address { margin: 2px 0 6px; font-size: 19px; font-weight: 700; word-break: break-all; user-select: all; }
.email-sheet__status { margin: 0 0 16px; min-height: 20px; font-size: 14px; color: #2f9e66; }
.email-sheet__status.is-hint { color: var(--ink-soft); }
.email-sheet__actions { display: grid; gap: 8px; }
.email-sheet__actions a, .email-sheet__actions button { display: block; width: 100%; text-align: center; padding: 12px 14px; border-radius: 12px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid var(--line); background: var(--tint); color: var(--ink); }
.email-sheet__actions a:first-child { background: var(--brand); color: #fff; border: 0; }
.email-sheet__actions a:hover, .email-sheet__actions button:hover { border-color: var(--brand); color: var(--brand); }
.email-sheet__actions a:first-child:hover { color: #fff; opacity: .92; }
