/* ===================================================================
   Dillon Connor — Portfolio  |  Design System
   =================================================================== */
:root {
  --bg: #05060a;
  --bg-2: #0a0c14;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f8;
  --muted: #9098b0;
  --muted-2: #6b7184;
  --accent: #22d3ee;
  --accent-2: #8b5cf6;
  --accent-3: #3b82f6;
  --grad: linear-gradient(120deg, #22d3ee 0%, #3b82f6 45%, #8b5cf6 100%);
  --grad-soft: linear-gradient(120deg, rgba(34,211,238,.18), rgba(139,92,246,.18));
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand-name { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.02em; line-height: 1.08; }
a { color: inherit; text-decoration: none; }
img, iframe { display: block; }
section { position: relative; z-index: 2; }

/* ===== 3D Background ===== */
#bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.bg-overlay {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(59,130,246,.12), transparent 60%),
    radial-gradient(900px 500px at 10% 20%, rgba(139,92,246,.10), transparent 60%),
    linear-gradient(180deg, rgba(5,6,10,0) 0%, rgba(5,6,10,.55) 55%, var(--bg) 100%);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .85rem 1.5rem; border-radius: 100px;
  font-weight: 600; font-size: .95rem; cursor: pointer;
  border: 1px solid transparent; transition: all .35s var(--ease);
  white-space: nowrap;
}
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary {
  background: var(--grad); color: #04060d; font-weight: 700;
  box-shadow: 0 10px 30px -8px rgba(59,130,246,.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(139,92,246,.7); filter: brightness(1.08); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--accent); }
.btn-nav { padding: .6rem 1.1rem; font-size: .85rem; background: var(--grad); color: #04060d; font-weight: 700; }
.btn-nav:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-block { width: 100%; justify-content: center; padding: 1.05rem; font-size: 1rem; }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem); gap: 1rem;
  transition: all .4s var(--ease);
}
.nav.scrolled {
  background: rgba(7, 9, 16, 0.72); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); padding-top: .8rem; padding-bottom: .8rem;
}
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad); color: #04060d; font-family: 'Space Grotesk'; font-weight: 700; font-size: .95rem;
  box-shadow: 0 6px 18px -6px rgba(59,130,246,.7);
}
.brand-name { font-size: 1.02rem; }
.nav-links { display: flex; gap: 2rem; margin-left: auto; margin-right: 1.5rem; }
.nav-links a { color: var(--muted); font-size: .92rem; font-weight: 500; transition: color .25s; position: relative; }
.nav-links a:hover { color: var(--text); }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--grad); transition: width .3s var(--ease); }
.nav-links a:hover::after { width: 100%; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ===== Hero ===== */
.hero { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 7rem 1.25rem 4rem; }
.hero-inner { max-width: 880px; }
.badge {
  display: inline-flex; align-items: center; gap: .5rem; padding: .45rem 1rem;
  border: 1px solid var(--border-strong); border-radius: 100px; background: var(--surface);
  font-size: .82rem; color: var(--muted); margin-bottom: 1.8rem; backdrop-filter: blur(8px);
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 12px #34d399; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.hero-title { font-size: clamp(2.4rem, 6.5vw, 4.6rem); font-weight: 700; margin-bottom: 1.4rem; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { font-size: clamp(1rem, 2vw, 1.22rem); color: var(--muted); max-width: 640px; margin: 0 auto 2.4rem; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3.5rem; }
.hero-stats { display: flex; gap: clamp(1.5rem, 5vw, 4rem); justify-content: center; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: 'Space Grotesk'; font-size: clamp(1.8rem, 4vw, 2.6rem); background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-stats span { color: var(--muted-2); font-size: .85rem; }
.hero-tags { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.hero-tags span { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1.1rem; border: 1px solid var(--border-strong); border-radius: 100px; background: var(--surface); color: var(--muted); font-size: .88rem; font-weight: 500; backdrop-filter: blur(8px); }
.hero-tags span::before { content: '✦'; color: var(--accent); font-size: .8rem; }
.scroll-hint { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); color: var(--muted-2); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.scroll-hint span { width: 1px; height: 36px; background: linear-gradient(var(--accent), transparent); animation: scrolldown 1.8s infinite; }
@keyframes scrolldown { 0%{transform:scaleY(0);transform-origin:top} 50%{transform:scaleY(1);transform-origin:top} 50.1%{transform-origin:bottom} 100%{transform:scaleY(0);transform-origin:bottom} }

/* ===== Marquee ===== */
.marquee { overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 1.1rem 0; background: rgba(8,10,18,.5); backdrop-filter: blur(6px); }
.marquee-track { display: flex; gap: 2.5rem; align-items: center; white-space: nowrap; width: max-content; animation: marquee 28s linear infinite; }
.marquee-track span { font-family: 'Space Grotesk'; font-size: 1.1rem; color: var(--muted); font-weight: 500; }
.marquee-track i { color: var(--accent); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== Sections ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 9vw, 7.5rem) clamp(1rem, 4vw, 2rem); }
.section-head { max-width: 680px; margin: 0 auto 3.5rem; text-align: center; }
.eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 1rem; }
.section-head h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin-bottom: 1rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ===== Work grid ===== */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.2rem, 3vw, 2rem); }
.work-card { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); transition: transform .5s var(--ease), border-color .4s; }
.work-card:hover { transform: translateY(-6px); border-color: var(--border-strong); }
.work-frame {
  position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden;
  background: #0b0e16; border-bottom: 1px solid var(--border);
}
.work-frame iframe {
  position: absolute; top: 0; left: 0;
  width: 1440px; height: 900px;
  border: 0; transform: scale(.345); transform-origin: top left;
  pointer-events: none; background: #fff;
}
@media (min-width: 1100px) { .work-frame iframe { transform: scale(.385); } }
.work-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.4rem; }
.work-meta h3 { font-size: 1.25rem; }
.work-meta p { color: var(--muted); font-size: .9rem; }
.tags { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.tags span { font-size: .72rem; color: var(--muted); border: 1px solid var(--border); padding: .25rem .6rem; border-radius: 100px; }

/* ===== Service cards ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.card { padding: 2rem 1.7rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: all .4s var(--ease); position: relative; overflow: hidden; }
.card::before { content: ''; position: absolute; inset: 0; background: var(--grad-soft); opacity: 0; transition: opacity .4s; }
.card:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }
.card-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: var(--grad); color: #04060d; font-size: 1.3rem; margin-bottom: 1.2rem; box-shadow: 0 8px 24px -8px rgba(59,130,246,.6); }
.card h3 { font-size: 1.2rem; margin-bottom: .6rem; }
.card p { color: var(--muted); font-size: .95rem; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about-card { position: relative; aspect-ratio: 4/5; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); background: linear-gradient(160deg, rgba(34,211,238,.08), rgba(139,92,246,.12)); display: grid; place-items: center; overflow: hidden; }
.about-glow { position: absolute; width: 70%; height: 70%; background: var(--grad); filter: blur(80px); opacity: .35; border-radius: 50%; animation: float 8s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translate(-10%,-10%)} 50%{transform:translate(10%,10%)} }
.about-initials { position: relative; font-family: 'Space Grotesk'; font-size: 6rem; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.about-tag { position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .85rem; color: var(--muted); border: 1px solid var(--border); padding: .4rem 1rem; border-radius: 100px; background: rgba(7,9,16,.6); backdrop-filter: blur(8px); }
.about-text h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: .6rem 0 1.2rem; }
.about-text p { color: var(--muted); margin-bottom: 1rem; }
.about-list { list-style: none; margin: 1.6rem 0; display: grid; gap: .7rem; }
.about-list li { color: var(--text); font-size: .98rem; }

/* ===== Process ===== */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.step { padding: 2rem 1.6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); position: relative; }
.step-num { font-family: 'Space Grotesk'; font-size: 2.4rem; font-weight: 700; color: transparent; -webkit-text-stroke: 1.3px var(--accent); opacity: .55; }
.step h3 { font-size: 1.2rem; margin: .8rem 0 .5rem; }
.step p { color: var(--muted); font-size: .92rem; }

/* ===== Apply ===== */
.apply-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 6vw, 4.5rem); align-items: start; }
.apply-copy h2 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); margin: .6rem 0 1.2rem; }
.apply-copy p { color: var(--muted); margin-bottom: 1.6rem; }
.apply-perks { list-style: none; display: grid; gap: .7rem; margin-bottom: 2rem; }
.apply-perks li { color: var(--text); }
.apply-contact { display: flex; flex-direction: column; gap: .2rem; padding-top: 1.4rem; border-top: 1px solid var(--border); }
.apply-contact span { color: var(--muted-2); font-size: .85rem; }
.apply-contact a { color: var(--accent); font-weight: 600; }
.apply-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.4rem); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.apply-form label { display: block; font-size: .82rem; color: var(--muted); font-weight: 500; margin-bottom: 1rem; }
.apply-form input, .apply-form select, .apply-form textarea {
  width: 100%; margin-top: .45rem; padding: .8rem .9rem;
  background: rgba(0,0,0,.25); border: 1px solid var(--border-strong); border-radius: 12px;
  color: var(--text); font-family: inherit; font-size: .95rem; transition: border-color .25s, box-shadow .25s;
}
.apply-form textarea { resize: vertical; min-height: 100px; }
.apply-form input::placeholder, .apply-form textarea::placeholder { color: var(--muted-2); }
.apply-form input:focus, .apply-form select:focus, .apply-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34,211,238,.15); }
.apply-form select option { background: #0b0e16; }
.form-status { margin-top: 1rem; font-size: .9rem; text-align: center; min-height: 1.2rem; }
.form-status.ok { color: #34d399; }
.form-status.err { color: #f87171; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); position: relative; z-index: 2; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 3rem clamp(1rem, 4vw, 2rem); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; }
.footer-brand { display: flex; align-items: center; gap: .8rem; }
.footer-brand strong { display: block; font-family: 'Space Grotesk'; }
.footer-brand span { color: var(--muted); font-size: .85rem; }
.footer-links { display: flex; gap: 1.6rem; }
.footer-links a { color: var(--muted); font-size: .9rem; transition: color .25s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--muted-2); font-size: .82rem; width: 100%; text-align: center; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .btn-nav { display: none; }
  .nav-toggle { display: flex; }
  .work-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-card { max-width: 320px; margin: 0 auto; }
  .process { grid-template-columns: 1fr 1fr; }
  .apply-grid { grid-template-columns: 1fr; }
  .work-frame iframe { transform: scale(.52); }
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .hero-stats { gap: 1.5rem; }
  .work-frame iframe { transform: scale(.46); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
  html { scroll-behavior: auto; }
}
