/* ─────────────────────────────────────────────────────────────
   SKAB Tech — Portfolio
   Tokens mirror skabtech.com (src/styles.scss): cool slate neutrals,
   logo gradient gold → flame → ember reserved for accents.
   :root = light, html.dark = dark
   ───────────────────────────────────────────────────────────── */
:root {
  --bg:      248 250 252;
  --surface: 255 255 255;
  --raised:  241 245 249;
  --ink:     15 23 42;
  --muted:   71 85 105;
  --line:    15 23 42;
  --gold:    245 180 40;
  --flame:   234 88 12;
  --brand:   194 65 12;

  --grad:        linear-gradient(135deg, #F5B428 0%, #EA580C 60%, #C80000 110%);
  --grad-text:   linear-gradient(120deg, #E8900C 0%, #EA580C 45%, #C81E0A 100%);
  --glow:        rgba(234, 88, 12, .14);
  --card-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 12px 32px -12px rgba(15, 23, 42, .14);
  --on-grad:     #fff;
  color-scheme: light;
}
html.dark {
  --bg:      9 11 15;
  --surface: 17 20 26;
  --raised:  26 30 38;
  --ink:     241 244 248;
  --muted:   148 157 172;
  --line:    226 232 240;
  --gold:    250 217 97;
  --flame:   247 107 28;
  --brand:   253 160 72;

  --grad:        linear-gradient(135deg, #FAD961 0%, #F76B1C 70%, #C80000 120%);
  --grad-text:   linear-gradient(120deg, #FAD961 0%, #F7A23A 45%, #F76B1C 100%);
  --glow:        rgba(247, 107, 28, .18);
  --card-shadow: 0 1px 0 rgba(226, 232, 240, .04) inset, 0 20px 40px -20px rgba(0, 0, 0, .7);
  --on-grad:     #12100e;
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: rgb(var(--bg));
  color: rgb(var(--ink));
  font: 400 16px/1.6 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color .4s ease, color .4s ease;
}
h1, h2, h3 { font-family: Sora, Inter, system-ui, sans-serif; letter-spacing: -.02em; margin: 0; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
::selection { background: rgb(var(--flame) / .25); }
:focus-visible { outline: 2px solid rgb(var(--flame)); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 11px/1 "JetBrains Mono", ui-monospace, monospace;
  text-transform: uppercase; letter-spacing: .22em; color: rgb(var(--brand));
  margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 24px; height: 1px; background: currentColor; opacity: .6; }
.lead { font-size: 1.075rem; color: rgb(var(--muted)); line-height: 1.7; max-width: 40rem; }

/* ── Buttons & bits ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 13px 26px;
  font-weight: 600; font-size: .95rem; cursor: pointer; border: 0;
  transition: transform .25s, box-shadow .25s, border-color .25s, color .25s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: var(--on-grad); box-shadow: 0 10px 30px -10px rgb(var(--flame) / .7); }
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgb(var(--flame) / .9); }
.btn-ghost { background: rgb(var(--surface) / .6); color: rgb(var(--ink)); border: 1px solid rgb(var(--line) / .15); }
.btn-ghost:hover { border-color: rgb(var(--flame) / .5); color: rgb(var(--brand)); }
.btn-sm { padding: 9px 18px; font-size: .85rem; }
.btn-block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; border-radius: 999px;
  border: 1px solid rgb(var(--line) / .1); background: rgb(var(--raised) / .7);
  padding: 3px 11px; font-size: .75rem; font-weight: 500; color: rgb(var(--muted));
}
.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; color: rgb(var(--brand)); }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }
.icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: rgb(var(--brand));
  background: linear-gradient(135deg, rgb(var(--gold) / .18), rgb(var(--flame) / .12));
  border: 1px solid rgb(var(--flame) / .2);
}
.icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ── Header ───────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgb(var(--bg) / .75);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: rgb(var(--line) / .08); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 36px; height: 36px; border-radius: 50%; }
.wordmark {
  display: block; width: 70px; height: 17px;
  background: var(--grad-text);
  -webkit-mask: url(assets/logo/skab-wordmark.png) center / contain no-repeat;
  mask: url(assets/logo/skab-wordmark.png) center / contain no-repeat;
}
.nav-links { display: none; gap: 32px; font-size: .9rem; font-weight: 500; color: rgb(var(--muted)); }
.nav-links a:hover { color: rgb(var(--ink)); }
@media (min-width: 820px) { .nav-links { display: flex; } }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  background: transparent; color: rgb(var(--ink)); border: 1px solid rgb(var(--line) / .12);
  transition: border-color .25s, color .25s;
}
.icon-btn:hover { border-color: rgb(var(--flame) / .5); color: rgb(var(--brand)); }
.icon-btn svg { width: 18px; height: 18px; }
.i-moon { display: none; }
html.dark .i-sun { display: none; }
html.dark .i-moon { display: block; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero { position: relative; padding: 72px 0 64px; overflow: hidden; }
@media (min-width: 768px) { .hero { padding: 120px 0 96px; } }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 85% 10%, rgb(var(--flame) / .14), transparent 40%),
    radial-gradient(circle at 5% 90%, rgb(var(--gold) / .12), transparent 40%),
    linear-gradient(rgb(var(--line) / .05) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--line) / .05) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}
.hero .wrap { position: relative; }
.hero-title { font-size: clamp(2.4rem, 6.4vw, 4.6rem); font-weight: 700; line-height: 1.04; max-width: 15ch; margin-bottom: 24px; }
.hero-title .grad-text { white-space: nowrap; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 56px 0 0;
  background: rgb(var(--line) / .08); border: 1px solid rgb(var(--line) / .08); border-radius: 20px; overflow: hidden;
}
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats > div { background: rgb(var(--surface)); padding: 22px 24px; display: flex; flex-direction: column-reverse; gap: 4px; }
.stats dt { font-size: .85rem; color: rgb(var(--muted)); }
.stats dd { margin: 0; font: 700 2.1rem/1 Sora, sans-serif; }
.stats dd { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

/* ── Sections ─────────────────────────────────────────────── */
.section { padding: 72px 0; }
@media (min-width: 768px) { .section { padding: 104px 0; } }
.section.alt { background: rgb(var(--surface)); border-block: 1px solid rgb(var(--line) / .06); }
.sec-head { margin-bottom: 44px; }
.sec-head h2, .cta h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 700; margin-bottom: 14px; }

/* cards */
.work, .svc, .prod, .quote {
  background: rgb(var(--surface)); border: 1px solid rgb(var(--line) / .1);
  border-radius: 24px; box-shadow: var(--card-shadow);
  transition: transform .4s, border-color .4s, box-shadow .4s;
}
.section.alt .svc { background: rgb(var(--bg)); }
.work:hover, .svc:hover, .prod:hover {
  transform: translateY(-4px); border-color: rgb(var(--flame) / .4);
  box-shadow: var(--card-shadow), 0 20px 50px -20px var(--glow);
}

/* ── Work ─────────────────────────────────────────────────── */
.work-grid { display: grid; gap: 24px; }
@media (min-width: 720px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .work-grid { grid-template-columns: repeat(3, 1fr); } }
.work { overflow: hidden; display: flex; flex-direction: column; }
.work-shot { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: rgb(var(--raised)); border-bottom: 1px solid rgb(var(--line) / .08); }
.work-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.work:hover .work-shot img { transform: scale(1.04); }
.work-shot.app { background: radial-gradient(circle at 50% 120%, rgb(var(--flame) / .35), transparent 60%), #10141b; padding-top: 20px; }
.work-shot.app img { width: auto; height: 100%; margin: 0 auto; object-fit: cover; border-radius: 18px 18px 0 0; box-shadow: 0 0 0 6px #232833; }
.work-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.work-body .link { margin-top: auto; padding-top: 6px; }
.meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kind { font: 500 10.5px/1 "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .14em; color: rgb(var(--muted)); }
.work h3 { font-size: 1.2rem; font-weight: 700; }
.work p { font-size: .93rem; color: rgb(var(--muted)); }

/* ── Services ─────────────────────────────────────────────── */
.svc-grid { display: grid; gap: 18px; }
@media (min-width: 600px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .svc-grid { grid-template-columns: repeat(4, 1fr); } }
.svc { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.svc h3 { font-size: 1.05rem; font-weight: 600; margin-top: 6px; }
.svc p { font-size: .9rem; color: rgb(var(--muted)); }
.svc-cta { background: var(--grad) !important; border-color: transparent; color: var(--on-grad); justify-content: center; }
.svc-cta p { color: inherit; opacity: .85; }
.svc-cta .link { color: inherit; margin-top: 4px; }

/* ── Products ─────────────────────────────────────────────── */
.prod-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .prod-grid { grid-template-columns: repeat(3, 1fr); } }
.prod { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.prod-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prod h3 { font-size: 1.35rem; font-weight: 700; }
.tagline { font-weight: 600; color: rgb(var(--brand)); font-size: .92rem; }
.prod > p:not(.tagline) { font-size: .93rem; color: rgb(var(--muted)); }
.prod .link { margin-top: auto; padding-top: 8px; }
.badge {
  font: 500 10.5px/1 "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .12em;
  padding: 6px 10px; border-radius: 999px; background: var(--grad); color: var(--on-grad); white-space: nowrap;
}
.badge.muted { background: rgb(var(--raised)); color: rgb(var(--muted)); border: 1px solid rgb(var(--line) / .1); }
.ticks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks li::before {
  content: ''; flex-shrink: 0; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%;
  background: rgb(var(--flame) / .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EA580C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* ── Process ──────────────────────────────────────────────── */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.steps li { position: relative; padding: 22px 20px; border-radius: 20px; border: 1px solid rgb(var(--line) / .1); background: rgb(var(--bg)); }
.steps .num { font: 700 1.6rem/1 Sora, sans-serif; display: inline-block; margin-bottom: 14px; }
.steps .num { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.steps h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.steps p { font-size: .88rem; color: rgb(var(--muted)); }

.tech { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.tech span {
  padding: 7px 14px; border-radius: 999px; font-size: .82rem; font-weight: 500; color: rgb(var(--muted));
  border: 1px solid rgb(var(--line) / .1); background: rgb(var(--bg));
}

/* ── Testimonials ─────────────────────────────────────────── */
.quote-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .quote-grid { grid-template-columns: repeat(3, 1fr); } }
.quote { margin: 0; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.quote blockquote { margin: 0; font-size: .98rem; line-height: 1.7; }
.quote figcaption { display: flex; align-items: center; gap: 12px; }
.quote b { display: block; font-weight: 600; font-size: .95rem; }
.quote small { display: block; color: rgb(var(--muted)); font-size: .8rem; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: var(--on-grad); font: 700 .9rem Sora, sans-serif; flex-shrink: 0; }

/* ── Contact ──────────────────────────────────────────────── */
.cta {
  position: relative; overflow: hidden; display: grid; gap: 36px; align-items: center;
  padding: 36px 22px; border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgb(var(--flame) / .16), transparent 45%),
    radial-gradient(circle at 0% 100%, rgb(var(--gold) / .12), transparent 45%),
    rgb(var(--surface));
  border: 1px solid rgb(var(--flame) / .2); box-shadow: var(--card-shadow);
}
@media (min-width: 640px) { .cta { padding: 48px; } }
@media (min-width: 900px) { .cta { grid-template-columns: 1.3fr 1fr; padding: 56px; } }
.cta-actions { display: grid; gap: 12px; }
.contact-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px;
  background: rgb(var(--bg) / .7); border: 1px solid rgb(var(--line) / .1); font-weight: 600;
  transition: border-color .25s; overflow-wrap: anywhere;
}
.contact-row:hover { border-color: rgb(var(--flame) / .5); }
.contact-row small { display: block; font-weight: 500; font-size: .75rem; color: rgb(var(--muted)); }

/* ── Footer ───────────────────────────────────────────────── */
.footer { border-top: 1px solid rgb(var(--line) / .08); padding: 28px 0; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.footer .brand img { width: 28px; height: 28px; }
.footer p { font-size: .85rem; color: rgb(var(--muted)); }

/* ── Reveal on scroll (only when JS is on) ────────────────── */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
