/* ===================== Tokens & themes ===================== */
:root {
  --bg: #FBFBFD;
  --surface: #FFFFFF;
  --surface-2: #F5F5F9;
  --line: #E7E7EE;
  --ink: #1A1B20;
  --ink-2: #61636E;
  --accent: #5B5BD6;
  --accent-2: #8B5CF6;
  --accent-soft: #ECECFB;
  --shadow: 0 1px 2px rgba(20,20,40,.04), 0 12px 32px rgba(20,20,40,.06);
  --shadow-lg: 0 24px 60px rgba(30,25,70,.12);

  /* stuff·finder brand accents (constant across theme) */
  --sf-orange: #E8650D;
  --sf-orange-soft: #FBE4D2;
  --sf-plaque: #23262B;
  --sf-plaque-ink: #F4F2EC;

  --maxw: 1120px;
  --radius: 18px;
  --font: 'Golos Text', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

:root[data-theme="dark"] {
  --bg: #0E0F13;
  --surface: #181A20;
  --surface-2: #1F222A;
  --line: #2A2D36;
  --ink: #ECECF1;
  --ink-2: #A0A2AE;
  --accent: #7C7CF0;
  --accent-2: #A78BFA;
  --accent-soft: #22243A;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
  --sf-orange: #FB7A24;
  --sf-orange-soft: #3A2415;
}

/* ===================== Base ===================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Language visibility: default shows uk in HTML; JS swaps text. */
[data-lang="en"] [data-lang-label]::after { }

/* ===================== Header ===================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.wordmark {
  font-weight: 800; font-size: 20px; letter-spacing: -.02em;
  color: var(--ink);
}
.wordmark .rr { color: var(--accent); }
.wordmark .dot { color: var(--ink-2); font-weight: 600; }
.wordmark.small { font-size: 17px; }
.nav { display: flex; gap: 26px; margin-left: 8px; }
.nav a {
  color: var(--ink-2); font-weight: 500; font-size: 15px;
  transition: color .2s;
}
.nav a:hover { color: var(--ink); }
.controls { margin-left: auto; display: flex; gap: 8px; }
.ctl {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); cursor: pointer;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  transition: border-color .2s, background .2s, transform .1s;
}
.ctl:hover { border-color: var(--accent); }
.ctl:active { transform: scale(.95); }
/* theme icon swap */
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }

/* ===================== Hero ===================== */
.hero { position: relative; overflow: hidden; padding: 96px 0 72px; }
.hero-inner { position: relative; z-index: 2; max-width: 820px; }
.eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: .08em;
  color: var(--accent); margin: 0 0 18px; font-weight: 500;
}
.hero-title {
  font-size: clamp(38px, 7vw, 68px); line-height: 1.05;
  font-weight: 800; letter-spacing: -.03em; margin: 0 0 22px;
}
.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  font-size: clamp(17px, 2.3vw, 21px); color: var(--ink-2);
  max-width: 620px; margin: 0 0 34px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-glow {
  position: absolute; top: -180px; right: -140px; width: 620px; height: 620px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 34%, transparent), transparent 62%);
  filter: blur(20px); z-index: 1; pointer-events: none;
}

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: 12px;
  font-weight: 700; font-size: 15px; cursor: pointer;
  border: 1px solid transparent; transition: transform .12s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 38%, transparent);
}
.btn-primary:hover { box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 48%, transparent); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); }

/* ===================== Sections ===================== */
.section { padding: 76px 0; }
.section-alt { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em;
  color: var(--accent); font-weight: 700; margin: 0 0 10px;
}
.section-title {
  font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em;
  margin: 0 0 40px;
}

/* ===================== Projects ===================== */
.projects-grid {
  display: grid; grid-template-columns: 1fr; gap: 26px;
}
.project {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
}
/* stuff·finder featured card = two columns */
.project.sf { display: grid; grid-template-columns: 1.15fr .85fr; }
.project-body { padding: 38px; }
.project-head { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; }
.project-icon { width: 56px; height: 56px; border-radius: 14px; box-shadow: var(--shadow); }
.project-name { font-size: 27px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.project-name .mid { color: var(--sf-orange); }
.project-tag-line { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; }
.tape {
  display: inline-block; font-family: var(--mono); font-weight: 700; font-size: 13px;
  letter-spacing: .04em; color: var(--sf-plaque-ink); background: var(--sf-plaque);
  padding: 8px 14px; border-radius: 7px; margin-bottom: 20px;
}
:root[data-theme="dark"] .tape { background: var(--sf-orange); color: #17181B; }
.project-desc { color: var(--ink-2); font-size: 16px; margin: 0 0 22px; max-width: 46ch; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 9px; padding: 0; margin: 0 0 26px; }
.chips li {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  padding: 6px 11px; border-radius: 999px;
  background: var(--sf-orange-soft); color: var(--sf-orange);
  border: 1px solid color-mix(in srgb, var(--sf-orange) 26%, transparent);
}
.project-cta { display: flex; align-items: center; gap: 14px; }
.badge-soon {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14px; color: var(--sf-orange);
  padding: 11px 18px; border-radius: 12px;
  background: var(--sf-orange-soft);
  border: 1px dashed color-mix(in srgb, var(--sf-orange) 45%, transparent);
}

/* screenshot / phone */
.project-shot {
  display: flex; align-items: flex-end; justify-content: center;
  padding: 40px 30px 0;
  background: linear-gradient(160deg, var(--sf-orange-soft), transparent 70%);
  overflow: hidden;
}
.phone {
  width: 260px; max-width: 78%;
  border: 8px solid var(--sf-plaque); border-bottom: none;
  border-radius: 30px 30px 0 0; overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--surface);
}
/* In dark mode the plaque frame + dark screenshot blend into the dark card,
   so give the phone a lighter frame and a hairline ring to keep its silhouette. */
:root[data-theme="dark"] .phone {
  border-color: #3b3f47;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .06), 0 0 60px rgba(251, 122, 36, .12);
}
:root[data-theme="dark"] .project-shot {
  background: linear-gradient(160deg, var(--sf-orange-soft), transparent 62%), var(--surface-2);
}
.phone img { width: 100%; }
.shot-dark { display: none; }
:root[data-theme="dark"] .shot-light { display: none; }
:root[data-theme="dark"] .shot-dark { display: block; }

/* placeholder card */
.project.placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 54px 30px; border-style: dashed;
  background: transparent; box-shadow: none; color: var(--ink-2);
}
.ph-plus {
  font-size: 34px; font-weight: 300; width: 60px; height: 60px; line-height: 56px;
  border-radius: 16px; border: 1px dashed var(--line); color: var(--accent);
  margin-bottom: 14px;
}
.ph-title { margin: 0 0 6px; font-size: 19px; color: var(--ink); font-weight: 700; }
.ph-desc { margin: 0; font-size: 15px; }

/* ===================== Values ===================== */
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow);
}
.value-ico { font-size: 30px; margin-bottom: 14px; }
.value h3 { margin: 0 0 8px; font-size: 19px; font-weight: 700; }
.value p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ===================== Contact ===================== */
.contact-inner { text-align: center; max-width: 640px; }
.contact-inner .section-title { margin-bottom: 12px; }
.contact-sub { color: var(--ink-2); font-size: 18px; margin: 0 0 28px; }

.contact-form { text-align: left; display: flex; flex-direction: column; gap: 14px; }
.field-row { display: flex; gap: 14px; }
.field-row > * { flex: 1; }
.contact-form input,
.contact-form textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; transition: border-color .2s, box-shadow .2s;
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--ink-2); opacity: .8; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.contact-form input:user-invalid,
.contact-form textarea:user-invalid { border-color: var(--accent-2); }
.contact-form .btn-primary { align-self: flex-start; justify-content: center; }
.contact-form button[disabled] { opacity: .6; cursor: progress; }
/* honeypot — visually and semantically hidden, still submitted by bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-status { margin: 4px 0 0; font-size: 15px; min-height: 1.2em; }
.form-status.ok { color: var(--success, #2E7D4F); }
.form-status.err { color: var(--danger, #C0392B); }
:root[data-theme="dark"] .form-status.ok { color: #58B37E; }
:root[data-theme="dark"] .form-status.err { color: #E56A5A; }
.contact-alt { color: var(--ink-2); font-size: 15px; margin: 22px 0 0; text-align: center; }
.contact-alt a { color: var(--accent); font-weight: 600; }
.contact-alt a:hover { text-decoration: underline; }

/* ===================== Footer ===================== */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; background: var(--surface); }
.footer-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; margin: 0 auto; }
.footer-links a { color: var(--ink-2); font-size: 14px; font-weight: 500; }
.footer-links a:hover { color: var(--accent); }
.copy { color: var(--ink-2); font-size: 14px; }

/* ===================== Responsive ===================== */
@media (max-width: 860px) {
  .project.sf { grid-template-columns: 1fr; }
  .project-shot { padding: 34px 30px 0; }
  .phone { width: 220px; }
  .values-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nav { display: none; }
  .hero { padding: 68px 0 52px; }
  .project-body { padding: 28px; }
  .section { padding: 56px 0; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-links { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* ===================== Hero device + trust (landing v2) ===================== */
.hero-inner.hero-grid {
  max-width: var(--maxw);
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 52px; align-items: center;
}
.hero-copy { max-width: 620px; }
.hero-device { display: flex; justify-content: center; position: relative; }
.hero-device .halo {
  position: absolute; top: -30px; right: 26px; width: 320px; height: 420px;
  background: var(--accent); border-radius: 48px; transform: rotate(9deg); opacity: .12;
}
.hero-device .phone {
  position: relative; width: 264px; max-width: 100%;
  border: 9px solid var(--sf-plaque); border-bottom: 9px solid var(--sf-plaque);
  border-radius: 38px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface);
}
:root[data-theme="dark"] .hero-device .phone {
  border-color: #3b3f47;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.06), 0 0 60px rgba(124,124,240,.14);
}
.trust-row { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 6px; }
.trust { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-2); }
.trust .dot { width: 8px; height: 8px; border-radius: 50%; }
.trust .dot.i { background: var(--accent); }
.trust .dot.o { background: var(--sf-orange); }

.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 34px; }
.section-head-row .section-kicker,
.section-head-row .section-title { margin-bottom: 0; }
.btn-sm { padding: 11px 18px; font-size: 14px; }

/* project card as a link */
a.project { color: inherit; }
.project.link { transition: transform .16s ease, box-shadow .2s ease; }
.project.link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* ===================== Sub-page breadcrumb header ===================== */
.crumb { display: flex; align-items: center; gap: 12px; }
.crumb .sep { color: var(--ink-2); opacity: .55; }
.crumb .here { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.crumb .here.sf { color: var(--sf-orange); }

.page-head { padding: 72px 0 44px; }
.page-head .page-title { font-size: clamp(34px, 5.4vw, 54px); line-height: 1.06; font-weight: 800; letter-spacing: -.03em; margin: 0 0 18px; max-width: 18ch; }
.page-head .page-sub { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-2); max-width: 58ch; margin: 0; }
.stat-row { display: flex; gap: 34px; flex-wrap: wrap; margin-top: 32px; }
.stat b { font-size: 22px; font-weight: 800; display: block; }
.stat span { font-family: var(--mono); font-size: 11px; color: var(--ink-2); letter-spacing: .06em; }

/* projects grid: featured + follow-up */
.proj-list { display: grid; grid-template-columns: 1fr; gap: 24px; }
.follow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card-dark {
  background: var(--sf-plaque); color: var(--sf-plaque-ink);
  border-radius: var(--radius); padding: 40px; display: flex; flex-direction: column; justify-content: center; min-height: 220px;
}
.card-dark .k { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: var(--sf-orange); font-weight: 700; margin: 0 0 12px; }
.card-dark h3 { margin: 0 0 10px; font-size: 22px; font-weight: 800; color: var(--sf-plaque-ink); }
.card-dark p { margin: 0 0 22px; color: #B9BBC4; font-size: 15px; max-width: 36ch; }
.card-dark .btn-ghost { background: rgba(255,255,255,.08); color: #F4F2EC; border-color: rgba(255,255,255,.14); }
.badge-pill {
  position: absolute; top: 18px; right: 18px; z-index: 3;
  font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--sf-orange);
  background: var(--sf-orange-soft); padding: 6px 12px; border-radius: 999px;
  border: 1px dashed color-mix(in srgb, var(--sf-orange) 45%, transparent);
}

/* ===================== stuff·finder app page ===================== */
.sf-hero { position: relative; overflow: hidden; padding: 88px 0 76px; }
.sf-hero .glow { position: absolute; top: -180px; right: -140px; width: 620px; height: 620px; background: radial-gradient(circle, color-mix(in srgb, var(--sf-orange) 26%, transparent), transparent 62%); filter: blur(20px); z-index: 1; pointer-events: none; }
.sf-hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.sf-lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.sf-lockup img { width: 60px; height: 60px; border-radius: 15px; box-shadow: var(--shadow); }
.sf-name { font-size: 30px; font-weight: 800; letter-spacing: -.01em; line-height: 1; }
.sf-name .mid { color: var(--sf-orange); }
.sf-kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--ink-2); margin-top: 4px; }
.sf-title { font-size: clamp(34px, 5vw, 54px); line-height: 1.06; font-weight: 800; letter-spacing: -.03em; margin: 0 0 20px; }
.sf-title .grad { background: linear-gradient(100deg, var(--sf-orange), #F0902E); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sf-lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-2); max-width: 520px; margin: 0 0 24px; }
.sf-device { display: flex; justify-content: center; position: relative; }
.sf-device .halo { position: absolute; top: -40px; right: 20px; width: 340px; height: 440px; background: var(--sf-orange); border-radius: 48px; transform: rotate(10deg); opacity: .14; }
.sf-device .phone { position: relative; width: 278px; max-width: 100%; border: 9px solid var(--sf-plaque); border-radius: 38px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface); }
:root[data-theme="dark"] .sf-device .phone { border-color: #3b3f47; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.06), 0 0 60px rgba(251,122,36,.12); }
.btn-orange { background: linear-gradient(100deg, var(--sf-orange), #F0902E); color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--sf-orange) 38%, transparent); }
.btn-orange:hover { box-shadow: 0 12px 30px color-mix(in srgb, var(--sf-orange) 48%, transparent); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--sf-orange-soft); display: flex; align-items: center; justify-content: center; color: var(--sf-orange); margin-bottom: 16px; }
.feature h3 { margin: 0 0 8px; font-size: 19px; font-weight: 700; }
.feature p { margin: 0; color: var(--ink-2); font-size: 15px; }

.gallery { display: flex; gap: 24px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.gallery figure { margin: 0; flex: none; width: 250px; scroll-snap-align: start; }
.gallery .frame { border: 8px solid var(--sf-plaque); border-radius: 30px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface); }
:root[data-theme="dark"] .gallery .frame { border-color: #3b3f47; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.06); }
.gallery figcaption { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--ink-2); text-align: center; margin-top: 14px; }

.privacy-band { padding: 76px 0; background: var(--sf-plaque); }
.privacy-band .inner { text-align: center; }
.privacy-band .k { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--sf-orange); font-weight: 700; margin: 0 0 14px; }
.privacy-band h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.02em; margin: 0 auto 18px; color: var(--sf-plaque-ink); max-width: 16ch; }
.privacy-band .sub { color: #B9BBC4; font-size: 17px; max-width: 560px; margin: 0 auto 40px; }
.privacy-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 760px; margin: 0 auto; text-align: left; }
.pstat { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 24px; }
.pstat b { font-size: 26px; font-weight: 800; color: var(--sf-orange); font-family: var(--mono); display: block; }
.pstat span { color: #B9BBC4; font-size: 14px; margin-top: 6px; display: block; }

.sf-cta-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 56px 40px; text-align: center; position: relative; overflow: hidden; }
.sf-cta-card .glow { position: absolute; top: -120px; left: -80px; width: 360px; height: 360px; background: radial-gradient(circle, color-mix(in srgb, var(--sf-orange) 20%, transparent), transparent 65%); filter: blur(10px); }
.sf-cta-card .inner { position: relative; z-index: 2; }
.sf-cta-card img { width: 64px; height: 64px; border-radius: 16px; box-shadow: var(--shadow); margin: 0 auto 20px; }
.sf-cta-card h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 12px; }
.sf-cta-card p { color: var(--ink-2); font-size: 17px; max-width: 460px; margin: 0 auto 28px; }

@media (max-width: 860px) {
  .hero-inner.hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-device { order: -1; }
  .sf-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .sf-device { order: -1; }
  .feature-grid { grid-template-columns: 1fr; }
  .privacy-stats { grid-template-columns: 1fr; }
  .follow-grid { grid-template-columns: 1fr; }
}
