/* ==========================================================
   CJ Dev Labs: site styles
   Brand: near-black, glowing orange circuit accents, white type
   ========================================================== */

:root {
  --bg: #050505;
  --bg-alt: #0c0c0d;
  --surface: #131315;
  --surface-2: #1a1a1d;
  --border: #26262a;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --orange: #ff7a1a;
  --orange-2: #ff5a00;
  --orange-soft: rgba(255, 122, 26, 0.14);
  --glow: 0 0 24px rgba(255, 122, 26, 0.45);
  --radius: 14px;
  --font-display: "Saira", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1160px;
}

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

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

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

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

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

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--orange); color: #000; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 8px; }

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

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }
p  { margin: 0 0 1em; }

.accent { color: var(--orange); }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.9rem;
}

.glow {
  background: linear-gradient(90deg, var(--orange) 0%, #ffb35c 50%, var(--orange-2) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 122, 26, 0.35));
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: #0a0a0a;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--glow); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--orange); color: var(--orange); box-shadow: none; }
.btn--sm { padding: 9px 18px; font-size: 0.92rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--border); background: rgba(5, 5, 5, 0.9); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 8px; }
.brand__text { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: 1.3rem; letter-spacing: 0.02em; }

.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a:not(.btn) {
  text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.97rem;
  transition: color .2s ease;
}
.nav__links a:not(.btn):hover { color: var(--text); }

.nav__toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer;
  flex-direction: column; gap: 5px;
}
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.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); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 96px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 75% 45%, rgba(255, 122, 26, 0.12), transparent 70%),
    var(--bg);
}
.hero__circuits { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.55; }
.hero__circuits--m { display: none; }
.trace path, .trace circle {
  fill: none; stroke: var(--orange); stroke-width: 2.5; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(255, 122, 26, 0.8));
}
.trace path { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.6s ease forwards; }
.trace circle { opacity: 0; animation: pop .5s ease forwards 2.2s; }
.trace path:nth-of-type(2n) { animation-delay: .3s; }
.trace path:nth-of-type(3n) { animation-delay: .6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop  { to { opacity: 1; } }

.hero__inner {
  position: relative;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero__logo img {
  width: 100%;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%);
          mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%);
  mix-blend-mode: lighten; /* lets the logo's black background melt into the page */
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { max-width: 680px; margin-bottom: 56px; }
.section__sub { color: var(--muted); font-size: 1.08rem; }

.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); gap: 28px; }

/* ---------- Service cards ---------- */
.card {
  position: relative;
  padding: 30px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255, 122, 26, 0.5); box-shadow: 0 10px 40px -12px rgba(255, 122, 26, 0.35); }
.card p { color: var(--muted); margin: 0; font-size: 0.98rem; }
.card__icon {
  width: 50px; height: 50px; border-radius: 12px; margin-bottom: 20px;
  display: grid; place-items: center;
  background: var(--orange-soft);
  border: 1px solid rgba(255, 122, 26, 0.35);
}
.card__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--orange); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Projects ---------- */
.project {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  text-decoration: none;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.project:hover { transform: translateY(-5px); border-color: var(--tint); box-shadow: 0 18px 50px -18px var(--tint); }

.project__frame { padding: 18px 18px 0; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.project__bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px;
  background: #0b0b0c;
  border: 1px solid var(--border); border-bottom: 0;
  border-radius: 10px 10px 0 0;
}
.project__bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a3a40; }
.project__bar span { margin-left: 10px; font-size: 0.78rem; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.project__screen {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--tint) 45%, transparent), transparent 60%),
    radial-gradient(circle at 80% 80%, color-mix(in srgb, var(--tint) 25%, transparent), transparent 55%),
    var(--screen, #0b0b0c);
  border: 1px solid var(--border); border-bottom: 0;
  overflow: hidden;
}
.project__screen--light {
  background:
    radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--tint) 14%, transparent), transparent 55%),
    radial-gradient(circle at 85% 85%, color-mix(in srgb, var(--tint) 10%, transparent), transparent 50%),
    var(--screen);
}
.project__logo {
  position: relative;
  width: 72%; height: 62%;
  object-fit: contain;
  transition: transform .4s ease;
}
.project__logo--tall { height: 70%; }
.project__logo--full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project:hover .project__logo { transform: scale(1.05); }

.project__body { padding: 26px 28px 30px; display: flex; flex-direction: column; flex: 1; }
.project__body p { color: var(--muted); font-size: 0.98rem; }
.project__tag { font-size: 0.8rem !important; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tint-text, var(--tint)) !important; font-weight: 600; margin-bottom: 0.6rem; }
.project__link { margin-top: auto; font-family: var(--font-display); font-weight: 700; color: var(--text); }
.project__link span { display: inline-block; transition: transform .2s ease; color: var(--tint-text, var(--tint)); }
.project:hover .project__link span { transform: translateX(5px); }

/* ---------- Process ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 28px 24px; border-top: 2px solid var(--border); transition: border-color .3s ease; }
.step:hover { border-top-color: var(--orange); }
.step::before {
  content: ""; position: absolute; top: -7px; left: 24px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--orange);
  box-shadow: 0 0 10px rgba(255, 122, 26, 0.7);
}
.step__num { display: block; font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 2.4rem; color: var(--orange); line-height: 1; margin-bottom: 14px; opacity: .9; }
.step p { color: var(--muted); font-size: 0.97rem; margin: 0; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: center; }
.about__copy p { color: var(--muted); }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stats li { padding: 26px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stats strong { display: block; font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 2rem; color: var(--orange); line-height: 1.1; }
.stats span { color: var(--muted); font-size: 0.92rem; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: start; }
.contact__copy p { color: var(--muted); }
.contact__direct a { color: var(--orange); font-weight: 600; text-decoration: none; }
.contact__direct a:hover { text-decoration: underline; }

.form {
  display: grid; gap: 18px;
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 8px; font-size: 0.9rem; font-weight: 600; color: var(--text); }
.form input, .form select, .form textarea {
  width: 100%;
  padding: 13px 14px;
  background: #0b0b0c;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit; font-weight: 400; font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form textarea { resize: vertical; min-height: 130px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.form .is-invalid { border-color: #f87171; }
.form .btn { justify-self: start; }
.form__status { margin: 0; font-size: 0.92rem; color: var(--muted); min-height: 1.4em; }

/* ---------- Footer ---------- */
.footer { padding: 34px 0; border-top: 1px solid var(--border); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.footer .brand__text { font-size: 1.1rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__inner, .about, .contact { grid-template-columns: 1fr; gap: 40px; }
  .hero__logo { max-width: 520px; margin: 0 auto; order: -1; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .section { padding: 80px 0; }
  .hero { padding: 32px 0 120px; }
  .hero__circuits--d { display: none; }
  .hero__circuits--m { display: block; height: auto; inset: auto 0; }
  .hero__circuits--top { top: 0; }
  .hero__circuits--bottom { bottom: 0; }
  .hero__circuits--m .trace path { stroke-width: 2; }
  .grid--3, .grid--2, .steps { grid-template-columns: 1fr; }
  .form { padding: 24px 18px; }
  .form__row { grid-template-columns: 1fr; }

  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 16px 24px;
    background: rgba(5, 5, 5, 0.97);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    visibility: hidden;
    transition: transform .3s ease, visibility .3s;
  }
  .nav__links.is-open { transform: none; visibility: visible; }
  .nav__links a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
  .nav__links .btn { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .trace path { stroke-dashoffset: 0; }
  .trace circle { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
}
