/* ============================================================
   Frontforge — site styles
   ============================================================ */

:root {
  --bg:            #0b0f14;
  --bg-alt:        #0f151d;
  --surface:       #131a24;
  --surface-2:     #18212d;
  --line:          #22303f;
  --line-soft:     #1a2531;

  --text:          #e8eef5;
  --text-muted:    #9fb0c3;
  --text-dim:      #7286a0;

  --ember:         #ff7a18;
  --ember-2:       #ffb020;
  --ember-soft:    rgba(255, 122, 24, .12);
  --steel:         #4ea3ff;

  --radius:        14px;
  --radius-lg:     20px;
  --wrap:          1140px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .7);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
a { color: var(--ember-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.18rem; }
p  { margin: 0 0 1rem; }

::selection { background: var(--ember); color: #10151b; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ember); color: #10151b; padding: 12px 18px; border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--ember-2); outline-offset: 3px; border-radius: 4px; }

/* ─────────────── Header ─────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 20, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line-soft); background: rgba(11, 15, 20, .92); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 20px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; flex: none;
  fill: none; stroke: var(--ember);
  stroke-width: 2.2; stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(255, 122, 24, .45));
}
.brand-name { font-weight: 700; font-size: 1.22rem; letter-spacing: -.03em; }
.brand-name span { color: var(--ember); }

.nav-menu { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.nav-menu a {
  color: var(--text-muted); font-size: .95rem; font-weight: 500;
  padding: 9px 14px; border-radius: 9px; text-decoration: none;
  transition: color .2s, background .2s;
}
.nav-menu a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-menu a.btn:hover { background: var(--ember-2); }

.nav-toggle {
  display: none; width: 44px; height: 40px; background: none; border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; padding: 10px 11px;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─────────────── Buttons ─────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 11px; border: 1px solid transparent;
  font-weight: 600; font-size: .96rem; font-family: inherit; cursor: pointer;
  text-decoration: none; transition: transform .18s, background .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--ember) 0%, var(--ember-2) 100%);
  color: #14181d;
  box-shadow: 0 10px 30px -12px rgba(255, 122, 24, .8);
}
.btn-primary:hover { box-shadow: 0 16px 40px -12px rgba(255, 122, 24, .95); }

.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--ember); background: var(--ember-soft); }

.btn-sm  { padding: 9px 16px; font-size: .9rem; }
.btn-lg  { padding: 15px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ─────────────── Hero ─────────────── */

.hero { position: relative; padding: clamp(70px, 11vw, 130px) 0 clamp(60px, 8vw, 96px); overflow: hidden; }
.hero-glow {
  position: absolute; inset: -30% -10% auto; height: 720px; pointer-events: none;
  background:
    radial-gradient(46% 52% at 22% 30%, rgba(255, 122, 24, .20) 0%, transparent 70%),
    radial-gradient(40% 46% at 78% 18%, rgba(78, 163, 255, .14) 0%, transparent 70%);
  filter: blur(10px);
}
.hero-inner { position: relative; max-width: 900px; }

.eyebrow {
  display: inline-block; margin: 0 0 18px;
  font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ember-2);
  background: var(--ember-soft); border: 1px solid rgba(255, 122, 24, .25);
  padding: 6px 14px; border-radius: 999px;
}

.grad {
  background: linear-gradient(100deg, var(--ember) 10%, var(--ember-2) 55%, #ffd98a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.lede { font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--text-muted); max-width: 660px; margin-top: 22px; }
.lede em { color: var(--text); font-style: italic; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px; margin: 60px 0 0; padding: 26px 0 0; border-top: 1px solid var(--line-soft);
}
.stats div { margin: 0; }
.stats dt { font-weight: 700; color: var(--text); font-size: 1.02rem; }
.stats dd { margin: 4px 0 0; color: var(--text-dim); font-size: .93rem; }

/* ─────────────── Tech strip ─────────────── */

.strip { border-block: 1px solid var(--line-soft); background: var(--bg-alt); }
.strip-inner { padding-block: 30px; text-align: center; }

.strip-label {
  margin: 0 0 18px;
  font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-dim);
}

.strip-tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.strip-tags span {
  padding: 7px 15px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-soft);
  font-size: .85rem; font-weight: 600; color: var(--text-muted);
  transition: color .2s, border-color .2s, background .2s;
}
.strip-tags span:hover { color: var(--text); border-color: rgba(255, 122, 24, .4); background: var(--surface-2); }

/* ─────────────── Sections ─────────────── */

.section { padding: clamp(70px, 9vw, 118px) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line-soft); }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-sub { color: var(--text-muted); font-size: 1.05rem; }

.grid { display: grid; gap: 22px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }

/* ─────────────── Cards ─────────────── */

.card {
  position: relative; background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); padding: 30px 28px 26px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 122, 24, .07), transparent 45%);
  opacity: 0; transition: opacity .25s;
}
.card:hover { transform: translateY(-5px); border-color: rgba(255, 122, 24, .35); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--text-muted); font-size: .97rem; }

.card-icon {
  width: 46px; height: 46px; border-radius: 13px; margin-bottom: 20px;
  display: grid; place-items: center;
  background: var(--ember-soft); border: 1px solid rgba(255, 122, 24, .28);
}
.card-icon svg {
  width: 23px; height: 23px; fill: none; stroke: var(--ember-2);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.ticks { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line-soft); padding-top: 16px; }
.ticks li { position: relative; padding-left: 24px; margin-bottom: 8px; color: var(--text-dim); font-size: .91rem; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: .55em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ember); box-shadow: 0 0 8px rgba(255, 122, 24, .7);
}

/* ─────────────── Steps ─────────────── */

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  counter-reset: step;
}
.step {
  position: relative; padding: 30px 26px 26px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  transition: border-color .25s, transform .25s;
}
.step:hover { border-color: rgba(255, 122, 24, .3); transform: translateY(-4px); }
.step-no {
  display: block; font-size: 2.1rem; font-weight: 800; letter-spacing: -.05em;
  background: linear-gradient(135deg, var(--ember), var(--ember-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 10px;
}
.step p { color: var(--text-muted); font-size: .96rem; margin: 0; }

/* ─────────────── Work ─────────────── */

.work-grid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.work {
  padding: 32px 30px; border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-soft);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.work:hover { border-color: rgba(255, 122, 24, .32); transform: translateY(-4px); box-shadow: var(--shadow); }
.work-tag {
  font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ember-2); margin-bottom: 10px;
}
.work h3 { font-size: 1.3rem; margin-bottom: .6rem; }
.work p { color: var(--text-muted); font-size: .97rem; }
.work-result {
  margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line-soft);
  color: var(--text) !important; font-size: .93rem !important; font-weight: 500;
}

/* ─────────────── About ─────────────── */

.about-grid { display: grid; gap: 46px; grid-template-columns: 1fr 1fr; align-items: start; }
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.values li {
  padding: 22px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line-soft);
  border-left: 3px solid var(--ember);
}
.values h3 { font-size: 1.02rem; margin-bottom: .3rem; }
.values p { margin: 0; color: var(--text-muted); font-size: .94rem; }

/* ─────────────── Contact ─────────────── */

.contact { background:
  radial-gradient(60% 90% at 15% 0%, rgba(255, 122, 24, .09), transparent 60%), var(--bg); }
.contact-grid { display: grid; gap: 46px; grid-template-columns: 1fr 1fr; align-items: start; }

.contact-list { list-style: none; margin: 30px 0 0; padding: 0; }
.contact-list li { padding: 14px 0; border-top: 1px solid var(--line-soft); display: flex; gap: 16px; flex-wrap: wrap; }
.contact-label { color: var(--text-dim); font-size: .88rem; min-width: 130px; }

.form {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); padding: 30px 28px;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .89rem; font-weight: 600; margin-bottom: 7px; color: var(--text-muted); }
.opt { font-weight: 400; color: var(--text-dim); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: .96rem;
  color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .2s, box-shadow .2s;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: #e5484d; }
.form-note { margin: 14px 0 0; font-size: .84rem; color: var(--text-dim); text-align: center; }

/* Honeypot — off-screen rather than display:none, which some bots detect. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin: 16px 0 0; font-size: .92rem; text-align: center; }
.form-status:empty { margin: 0; }
.form-status.is-busy  { color: var(--text-muted); }
.form-status.is-ok    { color: #4ad07f; }
.form-status.is-error { color: #ff8b8f; }

#submit-btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* ─────────────── Footer ─────────────── */

.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line-soft); padding-top: 60px; }
.footer-inner { display: grid; gap: 40px; grid-template-columns: 1.4fr 1fr; padding-bottom: 44px; }
.footer-brand p { color: var(--text-dim); font-size: .94rem; margin-top: 14px; max-width: 320px; }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.footer-nav h4 { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 9px; }
.footer-nav a { color: var(--text-muted); font-size: .94rem; }
.footer-nav a:hover { color: var(--ember-2); text-decoration: none; }

.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  border-top: 1px solid var(--line-soft); padding-block: 22px;
  color: var(--text-dim); font-size: .88rem;
}
.footer-bottom p { margin: 0; }

/* ─────────────── 404 ─────────────── */

.error-page { min-height: 72vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.error-code {
  font-size: clamp(5rem, 18vw, 10rem); font-weight: 800; letter-spacing: -.06em; line-height: 1; margin: 0;
  background: linear-gradient(135deg, var(--ember), var(--ember-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede-center { margin-inline: auto; }
.hero-actions-center { justify-content: center; }
.footer-bottom-bare { border-top: none; }

/* ─────────────── Reveal animation ─────────────── */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ─────────────── Responsive ─────────────── */

@media (max-width: 900px) {
  .about-grid, .contact-grid, .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute; left: 0; right: 0; top: 74px;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg-alt); border-bottom: 1px solid var(--line);
    padding: 14px 24px 22px;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 12px 14px; font-size: 1rem; }
  .nav-menu a.btn { justify-content: center; margin-top: 8px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .card, .work, .form, .step { padding-inline: 22px; }
  .hero-actions .btn { width: 100%; }
}

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