/* ===========================================================
   TechUpdates — Portfolio
   A "systems/diagnostics" visual language: this studio's edge
   isn't just design, it's the infrastructure underneath it
   (DNS, email, performance) — so the whole page reads like a
   status board, not a brochure.
   =========================================================== */

:root {
  --ink:        #0A1615;
  --ink-2:      #10201E;
  --ink-3:      #172F2B;
  --ink-border: rgba(251,249,244,0.10);
  --ink-border-soft: rgba(251,249,244,0.06);
  --paper:      #FBF9F4;
  --paper-dim:  rgba(251,249,244,0.66);
  --paper-mute: rgba(251,249,244,0.46);
  --signal:     #1FA89C;
  --signal-soft: rgba(31,168,156,0.14);
  --signal-2:   #29c2b4;
  --green:      #1E9E6B;
  --amber:      #D99A1F;
  --red:        #D9503F;

  --display: 'Space Grotesk', 'Inter', sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

.mono { font-family: var(--mono); }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

section { position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 16px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-soft);
}

.section-head { max-width: 640px; margin: 0 0 48px; }
.section-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.14;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.section-head p { color: var(--paper-dim); font-size: 16.5px; margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 9px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-solid { background: var(--signal); color: #06211E; }
.btn-solid:hover { background: var(--signal-2); }
.btn-ghost { background: transparent; color: var(--paper); border-color: var(--ink-border); }
.btn-ghost:hover { border-color: var(--signal); color: var(--signal); }

/* =================== NAV =================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(10,22,21,0.82);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--ink-border-soft);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  color: var(--paper);
  letter-spacing: -0.01em;
}
.brand-status {
  display: none;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-mute);
  padding-left: 10px;
  border-left: 1px solid var(--ink-border);
}
@media (min-width: 640px) { .brand-status { display: inline-flex; } }
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(30,158,107,0.6);
  animation: pulse 2.2s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(30,158,107,0.5); }
  70% { box-shadow: 0 0 0 6px rgba(30,158,107,0); }
  100% { box-shadow: 0 0 0 0 rgba(30,158,107,0); }
}

.nav-links {
  display: none;
  align-items: center;
  gap: 30px;
  font-size: 14.5px;
  font-weight: 500;
}
.nav-links a { text-decoration: none; color: var(--paper-dim); transition: color 0.15s ease; }
.nav-links a:hover { color: var(--paper); }
@media (min-width: 900px) { .nav-links { display: flex; } }

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-phone {
  display: none;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--paper-dim);
  text-decoration: none;
}
@media (min-width: 900px) { .nav-phone { display: inline; } }
.nav-cta .btn { padding: 10px 18px; font-size: 14px; }

/* =================== HERO =================== */
.hero {
  padding: 168px 0 64px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: 1.05fr 0.9fr; gap: 40px; }
}
.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(36px, 5.6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 14px 0 20px;
}
.hero h1 em {
  font-style: normal;
  color: var(--signal);
}
.hero-sub {
  font-size: 17.5px;
  color: var(--paper-dim);
  max-width: 52ch;
  margin: 0 0 28px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 32px;
}
.chip {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--paper-dim);
  background: rgba(251,249,244,0.05);
  border: 1px solid var(--ink-border);
  border-radius: 100px;
  padding: 7px 14px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
.scroll-cue .line {
  width: 1px; height: 26px;
  background: linear-gradient(var(--signal), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-cue .line::after {
  content: "";
  position: absolute; left: 0; top: -100%;
  width: 100%; height: 100%;
  background: var(--signal);
  animation: scrollcue 1.8s ease-in-out infinite;
}
@keyframes scrollcue { 0% { top: -100%; } 60%, 100% { top: 100%; } }

/* -------- hero terminal card -------- */
.term-card {
  background: var(--ink-2);
  border: 1px solid var(--ink-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink-border-soft);
  background: rgba(251,249,244,0.02);
}
.term-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(251,249,244,0.16); }
.term-title {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--paper-mute);
}
.term-body {
  padding: 22px 20px 24px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.9;
  min-height: 236px;
}
.term-body .prompt { color: var(--signal); }
.term-line { opacity: 0; white-space: pre-wrap; }
.term-line.ok { color: var(--green); }
.term-line.show { opacity: 1; }
.term-status {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--ink-border);
  color: var(--paper);
  font-weight: 600;
  opacity: 0;
}
.term-status.show { opacity: 1; }
.term-cursor {
  display: inline-block;
  width: 7px; height: 14px;
  background: var(--signal);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* =================== MARQUEE =================== */
.marquee-strip {
  border-top: 1px solid var(--ink-border-soft);
  border-bottom: 1px solid var(--ink-border-soft);
  background: var(--ink-2);
  overflow: hidden;
  padding: 15px 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee-strip:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-item {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 22px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-dim);
  white-space: nowrap;
}
.marquee-item .sep { color: var(--signal); }

/* =================== PORTFOLIO GRID =================== */
.work { padding: 96px 0; }
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 700px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .portfolio-grid { grid-template-columns: repeat(3, 1fr); } }

.pcard {
  background: var(--ink-2);
  border: 1px solid var(--ink-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.pcard:hover { border-color: rgba(31,168,156,0.4); transform: translateY(-3px); }
.pcard.featured { border-color: rgba(31,168,156,0.35); }

.pcard-preview {
  position: relative;
  height: 150px;
  display: flex;
  flex-direction: column;
}
.pcard-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(10,22,21,0.35);
}
.pcard-chrome .term-dot { width: 6px; height: 6px; }
.pcard-url {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: rgba(251,249,244,0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pcard-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.pcard-visual .glyph { font-size: 34px; opacity: 0.9; filter: grayscale(0.15); }
.pcard-visual::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(251,249,244,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(251,249,244,0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: radial-gradient(ellipse at center, black, transparent 75%);
}

.pcard-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pcard-visual.has-photo::before { display: none; }
.pcard-visual.has-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,22,21,0.08) 0%, rgba(10,22,21,0.55) 100%);
  pointer-events: none;
}

.pcard-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard-status { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(30,158,107,0.16); }
.status-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); }
.status-label.dim { color: var(--paper-mute); }
.pcard-cat { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--signal); margin-left: auto; }
.pcard-body h3 { font-family: var(--display); font-size: 19px; font-weight: 600; margin: 2px 0 0; }
.pcard-body p { font-size: 14px; line-height: 1.55; color: var(--paper-dim); margin: 0; flex: 1; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--paper-mute);
  background: rgba(251,249,244,0.04);
  border: 1px solid var(--ink-border);
  border-radius: 100px;
  padding: 4px 10px;
}

.pcard-visit {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--paper);
}
.pcard-visit .arrow { transition: transform 0.15s ease; }
.pcard:hover .pcard-visit .arrow { transform: translateX(3px); }

/* palette variants for preview blocks */
.v-teal  { background: linear-gradient(135deg, #123430, #0d201d); }
.v-amber { background: linear-gradient(135deg, #3a2c11, #1a1710); }
.v-blue  { background: linear-gradient(135deg, #142a34, #0d1c22); }
.v-rose  { background: linear-gradient(135deg, #35171a, #1a0f10); }
.v-moss  { background: linear-gradient(135deg, #1f3417, #10200e); }
.v-slate { background: linear-gradient(135deg, #232a34, #12161c); }

.privacy-note {
  position: absolute;
  bottom: 8px; right: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: rgba(251,249,244,0.4);
  text-transform: uppercase;
}

/* =================== CAPABILITIES ROTATOR =================== */
.capabilities { padding: 20px 0 100px; }
.cap-panel {
  background: var(--ink-2);
  border: 1px solid var(--ink-border);
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .cap-panel { grid-template-columns: 1.15fr 0.85fr; } }

.cap-display { padding: 40px 34px; position: relative; min-height: 300px; display: flex; flex-direction: column; justify-content: center; }
.cap-display::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(251,249,244,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(251,249,244,0.045) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at top left, black, transparent 78%);
  pointer-events: none;
}
.cap-slide { position: relative; }
.cap-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--signal-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}
.cap-slide h3 { font-family: var(--display); font-size: clamp(22px,2.6vw,28px); font-weight: 600; margin: 0 0 10px; }
.cap-slide p { color: var(--paper-dim); font-size: 15.5px; line-height: 1.6; max-width: 46ch; margin: 0 0 18px; }
.cap-readout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--green);
  background: rgba(30,158,107,0.08);
  border: 1px solid rgba(30,158,107,0.25);
  border-radius: 8px;
  padding: 8px 12px;
}

.cap-nav {
  border-top: 1px solid var(--ink-border-soft);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--ink-border-soft);
}
@media (min-width: 560px) and (max-width: 899px) {
  .cap-nav { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .cap-nav { border-top: none; border-left: 1px solid var(--ink-border-soft); grid-template-columns: 1fr; gap: 0; background: none; }
}
.cap-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  background: var(--ink-2);
  border: none;
  color: var(--paper-mute);
  cursor: pointer;
  text-align: left;
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 500;
  position: relative;
  min-width: 0;
  transition: color 0.2s ease, background 0.2s ease;
}
@media (min-width: 900px) {
  .cap-tab { padding: 16px 18px; font-size: 13.5px; border-bottom: 1px solid var(--ink-border-soft); }
  .cap-tab:last-child { border-bottom: none; }
}
.cap-tab:hover { color: var(--paper); background: rgba(251,249,244,0.03); }
.cap-tab.active { color: var(--paper); background: rgba(31,168,156,0.08); }
.cap-tab-emoji { font-size: 15px; flex-shrink: 0; }
.cap-tab-bar {
  position: absolute; left: 0; bottom: 0;
  height: 2px;
  width: 0%;
  background: var(--signal);
}
.cap-tab.active .cap-tab-bar { width: 100%; transition: width linear; }

/* =================== GRADER SECTION =================== */
.grader-section { padding: 20px 0 100px; }
.grader-inner { max-width: none; }
.wg-scope { border: 1px solid var(--ink-border); border-radius: 20px; }
.wg-panel { border-radius: 20px; background: var(--ink-2); }

/* =================== DNS SECTION =================== */
.dns { padding: 96px 0; background: var(--ink-2); border-top: 1px solid var(--ink-border-soft); border-bottom: 1px solid var(--ink-border-soft); }
.dns-grid { display: grid; grid-template-columns: 1fr; gap: 44px; align-items: center; }
@media (min-width: 900px) { .dns-grid { grid-template-columns: 1fr 1fr; } }
.dns h2 { font-family: var(--display); font-size: clamp(26px,3.2vw,36px); font-weight: 600; margin: 12px 0 16px; line-height: 1.16; }
.dns p.lead { color: var(--paper-dim); font-size: 16px; margin: 0 0 26px; max-width: 52ch; }
.dns-list { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.dns-list li { display: flex; gap: 12px; font-size: 14.5px; color: var(--paper-dim); }
.dns-list b { color: var(--paper); font-weight: 600; }
.dns-list .check { color: var(--green); flex-shrink: 0; }

.dns-term { background: var(--ink); border: 1px solid var(--ink-border); border-radius: 16px; overflow: hidden; }
.dns-term .term-body { min-height: 0; padding: 24px 22px; font-size: 13px; line-height: 2; }

/* =================== CTA =================== */
.cta { padding: 100px 0; text-align: center; }
.cta h2 { font-family: var(--display); font-size: clamp(30px,4.2vw,46px); font-weight: 600; margin: 12px 0 14px; }
.cta p { color: var(--paper-dim); font-size: 16.5px; margin: 0 0 34px; }
.cta-details { display: flex; flex-wrap: wrap; justify-content: center; gap: 34px; margin-top: 44px; font-family: var(--mono); font-size: 13px; }
.cta-detail { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.cta-detail .label { color: var(--paper-mute); text-transform: uppercase; letter-spacing: 0.1em; font-size: 10.5px; }
.cta-detail .val { color: var(--paper); font-size: 14.5px; }
.cta-detail a { color: var(--signal); text-decoration: none; }

/* =================== FOOTER =================== */
footer { border-top: 1px solid var(--ink-border-soft); padding: 40px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 16px; }
.footer-copy { font-family: var(--mono); font-size: 12px; color: var(--paper-mute); }

/* =================== CONTACT MODAL =================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(6,12,11,0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--ink-2);
  border: 1px solid var(--ink-border);
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 30px 28px 28px;
  position: relative;
}
.modal-close {
  position: absolute; top: 18px; right: 18px;
  background: rgba(251,249,244,0.06);
  border: none;
  color: var(--paper);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.modal h2 { font-family: var(--display); font-size: 24px; font-weight: 600; margin: 0 0 8px; }
.modal p.sub { color: var(--paper-dim); font-size: 14px; margin: 0 0 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 7px; color: var(--paper-dim); }
.field input, .field textarea {
  width: 100%;
  background: rgba(251,249,244,0.04);
  border: 1px solid var(--ink-border);
  border-radius: 9px;
  padding: 11px 13px;
  color: var(--paper);
  font-family: var(--body);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.15s ease;
}
.field input:focus, .field textarea:focus { border-color: var(--signal); }
.field textarea { resize: vertical; min-height: 90px; }
.modal .btn { width: 100%; justify-content: center; margin-top: 6px; }
.modal-success { text-align: center; padding: 20px 0; display: none; }
.modal-success.show { display: block; }
.modal-success .check-big { font-size: 40px; margin-bottom: 14px; }
.modal-success p { color: var(--paper-dim); font-size: 14.5px; }
.modal-form.hide { display: none; }

/* keyboard focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

/* mobile nav toggle (kept minimal — links collapse into Get a Quote focus) */
.mobile-menu-btn { display: none; }
