/* ==========================================================
   tomji.net — main stylesheet
   Palette: blue (primary), red (accent), black (base)
   ========================================================== */

@import url("https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap");

:root {
  --blue: #1756C4;        /* matched to logo */
  --blue-bright: #2F72E8;
  --blue-deep: #0A2D74;
  --red: #D7191F;
  --red-deep: #A50D12;
  --black: #0B0F19;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6B7280;
  --line: #E5E7EB;
  --surface: #FFFFFF;
  --surface-2: #F5F7FB;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px rgba(11, 15, 25, 0.08);
  --shadow-lg: 0 24px 60px rgba(11, 15, 25, 0.16);
  --max: 1180px;

  --font-head: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .6em;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p  { margin: 0 0 1em; color: var(--ink-2); }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--black); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 3px; border-radius: 6px; }

/* ---------- Brand ---------- */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand img { width: 66px; height: 63px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-word {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
  line-height: 1;
}
.brand-word .j { color: var(--red); }
.brand-sub {
  font-family: var(--font-body);
  font-size: .62rem; font-weight: 500;
  letter-spacing: .42em; text-transform: uppercase;
  color: var(--muted); margin-top: 5px;
}
.footer-logo { display: inline-block; }
.footer-logo img { width: 150px; height: auto; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 82px;
}
.nav-links {
  display: flex; align-items: center; gap: 6px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  display: block; padding: 8px 16px; border-radius: 999px;
  font-weight: 500; color: var(--ink-2);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--blue); background: rgba(23, 86, 196, .08); }
.nav-links .btn { margin-left: 8px; }
.nav-links a.btn,
.nav-links a.btn:hover { color: #fff; background: var(--red); }
.nav-links a.btn:hover { background: var(--red-deep); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  position: relative; transition: transform .25s, background .25s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after  { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  cursor: pointer; transition: transform .15s, background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(23, 86, 196, .3); }
.btn-primary:hover { background: var(--blue-deep); color: #fff; }
.btn-accent { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(215, 25, 31, .3); }
.btn-accent:hover { background: var(--red-deep); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--black);
  color: #fff;
  padding: 110px 0 120px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(47, 114, 232, .35), transparent 70%),
    radial-gradient(500px 360px at 10% 100%, rgba(215, 25, 31, .22), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 90%);
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center;
}
.hero h1 { color: #fff; }
.hero h1 .hl { color: var(--blue-bright); }
.hero h1 .hl-red { color: var(--red); }
.hero p.lead { color: rgba(255,255,255,.72); font-size: 1.15rem; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-size: .8rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red);
}
.hero .eyebrow { color: rgba(255,255,255,.8); }

.hero-stack {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px;
}
.chip {
  font-size: .82rem; font-weight: 500;
  padding: 6px 12px; border-radius: 999px;
  color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}

/* Code window illustration */
.code-window {
  background: #111725;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(47,114,232,.15);
  overflow: hidden;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: .9rem;
  line-height: 1.75;
}
.code-window .bar {
  display: flex; align-items: center; gap: 8px; padding: 14px 18px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.code-window .bar i { width: 11px; height: 11px; border-radius: 50%; background: #3A4256; }
.code-window .bar i:first-child { background: var(--red); }
.code-window .bar i:nth-child(2) { background: #F4B740; }
.code-window .bar i:nth-child(3) { background: #3BB273; }
.code-window .bar span { margin-left: 10px; font-size: .78rem; color: rgba(255,255,255,.45); }
.code-window pre { margin: 0; padding: 22px 24px; color: #CBD5E1; white-space: pre; overflow-x: auto; }
.tk-k { color: #7AA2FF; }
.tk-t { color: #F28B94; }
.tk-s { color: #9BE3B0; }
.tk-c { color: #64748B; font-style: italic; }
.tk-f { color: #F4D58D; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

/* Services */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card .icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 22px;
  background: rgba(23, 86, 196, .1); color: var(--blue);
}
.card .icon.red { background: rgba(215, 25, 31, .1); color: var(--red); }
.card .icon.dark { background: var(--black); color: #fff; }
.card .icon svg { width: 26px; height: 26px; }
.card ul { list-style: none; padding: 0; margin: 18px 0 0; }
.card li {
  position: relative; padding-left: 22px; margin-bottom: 8px; color: var(--ink-2); font-size: .95rem;
}
.card li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 10px; height: 2px; background: var(--red); border-radius: 2px;
}

/* Tech stack band */
.stack-band {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px;
}
.stack-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 12px; text-align: center;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--ink);
}
.stack-item small { display: block; font-family: var(--font-body); font-weight: 400; color: var(--muted); font-size: .78rem; margin-top: 4px; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 18px; border-top: 2px solid var(--line); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: block; font-family: var(--font-head); font-weight: 700; font-size: .85rem;
  color: var(--blue); margin-bottom: 10px; letter-spacing: .08em;
}
.step:first-child { border-top-color: var(--red); }
.step h3 { margin-bottom: .4em; }
.step p { font-size: .95rem; }

/* CTA */
.cta {
  position: relative; overflow: hidden;
  background: var(--black); color: #fff; border-radius: 28px;
  padding: 64px; display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.cta::before {
  content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47,114,232,.45), transparent 70%);
}
.cta > * { position: relative; }
.cta h2 { color: #fff; margin-bottom: .3em; }
.cta p { color: rgba(255,255,255,.7); margin: 0; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative; overflow: hidden;
  background: var(--black); color: #fff; padding: 90px 0 80px;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(520px 320px at 90% 0%, rgba(47,114,232,.35), transparent 70%),
              radial-gradient(400px 280px at 0% 100%, rgba(215,25,31,.18), transparent 70%);
}
.page-hero .container { position: relative; }
.page-hero h1 { color: #fff; font-size: clamp(2.2rem, 4.4vw, 3.3rem); }
.page-hero p { color: rgba(255,255,255,.72); font-size: 1.12rem; max-width: 620px; margin: 0; }
.page-hero .eyebrow { color: rgba(255,255,255,.8); }

/* About */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px;
}
.stat strong {
  display: block; font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; color: var(--ink);
  line-height: 1.1;
}
.stat strong span { color: var(--red); }
.stat p { margin: 6px 0 0; font-size: .92rem; }
.stat.dark { background: var(--black); border-color: var(--black); }
.stat.dark strong { color: #fff; }
.stat.dark p { color: rgba(255,255,255,.65); }
.stat.blue { background: var(--blue); border-color: var(--blue); }
.stat.blue strong { color: #fff; }
.stat.blue strong span { color: #fff; opacity: .7; }
.stat.blue p { color: rgba(255,255,255,.8); }

.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.value {
  display: flex; gap: 18px; padding: 28px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.value .num {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; color: #fff; background: var(--blue);
}
.value:nth-child(2) .num { background: var(--red); }
.value:nth-child(3) .num { background: var(--black); }
.value:nth-child(4) .num { background: var(--blue-deep); }
.value h3 { margin-bottom: .3em; }
.value p { margin: 0; font-size: .95rem; }

.skill-list { display: grid; gap: 18px; }
.skill { font-weight: 500; font-size: .95rem; }
.skill .row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.skill .row span:last-child { color: var(--muted); }
.skill .track { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.skill .fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--blue-bright)); }
.skill:nth-child(even) .fill { background: linear-gradient(90deg, var(--red-deep), var(--red)); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: start; }
.contact-info { display: grid; gap: 16px; }
.info-card {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff;
}
.info-card .icon {
  flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(23,86,196,.1); color: var(--blue);
}
.info-card:nth-child(2) .icon { background: rgba(215,25,31,.1); color: var(--red); }
.info-card:nth-child(3) .icon { background: var(--black); color: #fff; }
.info-card .icon svg { width: 22px; height: 22px; }
.info-card h3 { font-size: 1rem; margin-bottom: 2px; }
.info-card p { margin: 0; font-size: .95rem; }

.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 40px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.field label .req { color: var(--red); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink);
  padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(23,86,196,.12);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); }
.field .error { color: var(--red); font-size: .82rem; display: none; }
.field.invalid .error { display: block; }
.form-note { font-size: .85rem; color: var(--muted); margin: 14px 0 0; }
.form-status {
  display: none; margin-top: 18px; padding: 14px 16px; border-radius: 12px;
  background: rgba(23,86,196,.08); color: var(--blue-deep); font-weight: 500;
}
.form-status.show { display: block; }

.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 0 22px; margin-bottom: 12px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 0; font-family: var(--font-head); font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--red); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: rgba(255,255,255,.65); padding: 70px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.site-footer p { color: rgba(255,255,255,.6); font-size: .95rem; margin-top: 16px; max-width: 320px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; font-size: .95rem; }
.site-footer a { color: rgba(255,255,255,.65); }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-top: 50px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.1); font-size: .88rem;
}
.footer-bottom .accent { color: var(--red); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .stack-band { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta { flex-direction: column; align-items: flex-start; padding: 48px; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 82px;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 14px 16px 20px; background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-open .nav-links { display: flex; }
  .nav-links a { padding: 12px 14px; border-radius: 10px; }
  .nav-links .btn { margin: 6px 0 0; justify-content: center; }

  .container { padding: 0 16px; }
  .hero { padding: 70px 0 80px; }
  .section { padding: 70px 0; }
  .grid-3, .values, .form-row, .steps { grid-template-columns: 1fr; }
  .stack-band { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .form-card { padding: 26px; }
  .cta { padding: 36px 26px; border-radius: 22px; }
  .code-window { font-size: .8rem; }
}
