/* Home-page-specific composition: hero/terminal/services/stack/work/products/contact.
   Atoms it uses (.section, .btn-*, .tags, etc.) live in components.css. */

/* ── hero ─────────────────────────────────────────────────────────────── */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) var(--pad) clamp(56px, 8vw, 96px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: stretch;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 24px; }
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 28px;
}
.tag-dot {
  width: 6px; height: 6px;
  background: var(--brand);
  border-radius: 50%;
  display: inline-block;
}

.hero-headline {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(44px, 6.5vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
  color: var(--ink);
  text-wrap: balance;
}
.hl-line { display: block; }

.hero-lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 32px;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

/* ── terminal ─────────────────────────────────────────────────────────── */
.hero-terminal {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: #d4d4d4;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 24px 60px -20px rgba(0,0,0,.35);
}
[data-scanlines="on"] .hero-terminal::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.025) 0,
    rgba(255,255,255,.025) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
}
.term-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px;
  background: #141414;
  border-bottom: 1px solid #1f1f1f;
}
.term-dots { display: inline-flex; gap: 6px; }
.term-dots em {
  width: 10px; height: 10px; border-radius: 50%;
  background: #303030;
  display: inline-block;
}
.term-dots em:nth-child(1) { background: #ff5f57; }
.term-dots em:nth-child(2) { background: #febc2e; }
.term-dots em:nth-child(3) { background: #28c840; }
.term-title {
  flex: 1;
  text-align: center;
  color: #707070;
  font-size: 11.5px;
}
.term-body {
  padding: 18px 18px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.term-line { display: flex; align-items: center; gap: 0; min-height: 22px; }
.term-prompt { color: #d4d4d4; white-space: pre; }
.term-cursor {
  color: var(--brand);
  margin-left: 2px;
  animation: cursor 1s steps(2) infinite;
}
.term-cursor.blink { color: var(--brand); }
@keyframes cursor { 50% { opacity: 0; } }

.term-out { margin: 6px 0 8px; padding-left: 0; }
.term-out > div {
  color: #b8b8b8;
  display: grid;
  grid-template-columns: 130px 1fr;
}
.t-key { color: #707070; }
.t-ok  { color: var(--brand); }

/* ── hero stats ───────────────────────────────────────────────────────── */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  margin-top: clamp(40px, 5vw, 64px);
  background: var(--paper);
}
.hero-stats > div {
  padding: 24px clamp(16px, 2vw, 28px);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-stats > div:last-child { border-right: none; }
.stat-num {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat-lbl {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
@media (max-width: 720px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats > div:nth-child(2) { border-right: none; }
  .hero-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
}

/* ── services ─────────────────────────────────────────────────────────── */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  background: var(--rule);
}
@media (max-width: 960px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .svc-grid { grid-template-columns: 1fr; } }

.svc-card {
  background: var(--paper);
  padding: clamp(24px, 2.6vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 280px;
  position: relative;
  transition: background .2s;
}
.svc-card:hover { background: var(--bg-deep); }
.svc-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; height: 3px; width: 0;
  background: var(--brand);
  transition: width .25s ease;
}
.svc-card:hover::before { width: 100%; }

.svc-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.svc-num { color: var(--ink-3); }
.svc-id  { color: var(--brand-ink); }

.svc-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 4px 0 0;
}
.svc-body {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-3);
  margin: 0;
  flex: 1;
}

/* ── stack ────────────────────────────────────────────────────────────── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  background: var(--paper);
}
@media (max-width: 900px) { .stack-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .stack-grid { grid-template-columns: 1fr; } }

.stack-col {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 24px clamp(18px, 2vw, 24px) 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stack-h {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}
.stack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.stack-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 13px;
  border-bottom: 1px dashed var(--rule);
  padding-bottom: 8px;
}
.stack-list li:last-child { border-bottom: none; padding-bottom: 0; }
.stack-name { color: var(--ink); font-weight: 500; }
.stack-meta { color: var(--ink-4); font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; }

/* ── work ─────────────────────────────────────────────────────────────── */
.work-list { display: flex; flex-direction: column; }
.work-row {
  display: grid;
  grid-template-columns: 120px 1.4fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(28px, 3vw, 44px) 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.work-row:last-child { border-bottom: 1px solid var(--rule); }
@media (max-width: 820px) { .work-row { grid-template-columns: 1fr; } }

.work-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
}
.work-tag {
  display: inline-block;
  background: var(--ink);
  color: var(--brand);
  padding: 4px 10px;
  border-radius: 3px;
  letter-spacing: 0.06em;
  align-self: flex-start;
  font-weight: 500;
}
.work-num { color: var(--ink-4); font-size: 12px; }

.work-main h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--ink);
}
.work-main p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-3);
  margin: 0 0 14px;
  max-width: 50ch;
}

.work-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-deep);
  border: 1px solid var(--rule);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}
.visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.visual-stripes {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 18px,
    var(--rule) 18px,
    var(--rule) 19px
  );
  opacity: .8;
}
.visual-label {
  position: relative; z-index: 1;
  font-family: var(--mono);
  font-size: 10.5px;
  background: var(--paper);
  padding: 4px 8px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink-3);
}

/* ── products (dark) ──────────────────────────────────────────────────── */
.section-dark {
  background: #0a0a0a;
  color: #e5e5e5;
  border-top: none;
  position: relative;
  overflow: hidden;
}
.section-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}
.section-dark > * { position: relative; z-index: 1; }

.prod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #1a1a1a;
  border: 1px solid #1a1a1a;
}
@media (max-width: 820px) { .prod-grid { grid-template-columns: 1fr; } }

.prod-card {
  background: #0a0a0a;
  padding: clamp(24px, 2.6vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 260px;
  transition: background .2s;
}
.prod-card:hover { background: #131313; }

.prod-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.prod-kind { color: #707070; }
.prod-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  color: var(--brand);
}
.prod-status::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--brand);
  border-radius: 50%;
}

.prod-name {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 0;
  color: #ffffff;
}
.prod-card p {
  font-size: 14.5px;
  line-height: 1.65;
  color: #a8a8a8;
  margin: 0;
  flex: 1;
}
.prod-link {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brand);
  border-bottom: 1px solid rgba(45,202,61,.3);
  align-self: flex-start;
  padding-bottom: 3px;
  transition: border-color .18s;
}
.prod-link:hover { border-color: var(--brand); }

/* ── contact ──────────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-left .section-title { margin: 14px 0 28px; }

.contact-form {
  background: var(--bg-deep);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: clamp(22px, 2.6vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-family: var(--mono);
  box-shadow:
    0 1px 0 rgba(10, 10, 10, 0.02),
    0 8px 24px -12px rgba(10, 10, 10, 0.12),
    0 24px 48px -24px rgba(10, 10, 10, 0.08);
}
.form-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  font-size: 12px;
  color: var(--ink-3);
}
.form-head > span:first-child {
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
}
.form-status { color: var(--brand-ink); }

.contact-form label,
.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lbl {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.contact-form input,
.contact-form textarea {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  padding: 8px 0;
  outline: none;
  resize: vertical;
  transition: border-color .15s;
}
.contact-form input:focus,
.contact-form textarea:focus { border-bottom-color: var(--brand); }
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--ink-4);
  font-family: var(--mono);
}

.sent {
  text-align: center;
  padding: clamp(20px, 4vw, 48px) 12px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.sent-mark {
  width: 44px; height: 44px;
  border-radius: 4px;
  background: var(--brand);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}
.sent h3 {
  font-family: var(--sans); font-weight: 600;
  font-size: 22px; margin: 0;
  letter-spacing: -0.02em;
}
.sent p {
  margin: 0; color: var(--ink-3);
  max-width: 36ch; font-size: 14.5px; font-family: var(--sans);
}
