/* =========================================================================
   Silicon & Solder — brand palette
   Teal #14B8A6 · Graphite #1F2937 · Silver #E5E7EB · Green #10B981
   ========================================================================= */
:root {
  --teal: #14B8A6;
  --teal-bright: #2DD4BF;
  --green: #10B981;
  --graphite: #1F2937;
  --silver: #E5E7EB;

  --bg: #0B1220;          /* deep graphite background */
  --bg-2: #0F172A;        /* panel background */
  --bg-3: #111c2e;        /* card background */
  --line: rgba(229, 231, 235, 0.10);
  --text: #E5E7EB;
  --muted: #9aa6b8;

  --radius: 16px;
  --maxw: 1080px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --shadow-teal: 0 12px 40px -12px rgba(20, 184, 166, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

a { color: inherit; text-decoration: none; }

.amp { color: var(--teal); }
.grad {
  background: linear-gradient(120deg, var(--teal-bright), var(--teal) 55%, var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Decorative background ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000 35%, transparent 100%);
}

/* Animated circuit traces with travelling signal pulses */
.bg-circuit {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  mask-image: radial-gradient(ellipse 95% 85% at 50% 25%, #000 35%, transparent 92%);
}
.bg-circuit .trace path {
  fill: none;
  stroke: rgba(20, 184, 166, 0.22);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 9 13;
  animation: trace-flow 2.8s linear infinite;
}
@keyframes trace-flow { to { stroke-dashoffset: -44; } }
.bg-circuit .node circle {
  fill: rgba(45, 212, 191, 0.45);
  animation: node-glow 3.2s ease-in-out infinite;
}
@keyframes node-glow {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.9; }
}
.bg-circuit .pulse {
  fill: #2DD4BF;
  filter: drop-shadow(0 0 6px rgba(45, 212, 191, 0.9));
}

/* ---------- Layout primitives ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 24px;
}
.section--center { text-align: center; }
.section__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}
.section__lead {
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 28px;
  font-size: 1.04rem;
}
.section--center .section__lead { margin-left: auto; margin-right: auto; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  backdrop-filter: blur(10px);
  background: rgba(11, 18, 32, 0.6);
  border-bottom: 1px solid var(--line);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.3px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav__links a:not(.btn) { color: var(--muted); transition: color 0.2s; }
.nav__links a:not(.btn):hover { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(120deg, var(--teal), var(--green));
  color: #04201c;
  box-shadow: var(--shadow-teal);
}
.btn--primary:hover { transform: translateY(-2px); }
.btn--ghost {
  background: rgba(229, 231, 235, 0.04);
  border-color: var(--line);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--teal); color: var(--teal-bright); }
.btn--sm { padding: 8px 15px; font-size: 0.86rem; }
/* YouTube-red call to action */
.btn--yt {
  background: #FF0000;
  color: #fff;
  box-shadow: 0 12px 40px -12px rgba(255, 0, 0, 0.5);
}
.btn--yt:hover { background: #e60000; transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 24px 40px;
  text-align: center;
}
.hero__mark img {
  filter: drop-shadow(0 10px 28px rgba(20, 184, 166, 0.28));
}
.kicker {
  display: inline-block;
  margin: 18px 0 10px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.3px;
}
.hero__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -1.5px;
}
.hero__tag {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--teal-bright);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: clamp(0.8rem, 2vw, 1rem);
  margin: 10px 0 22px;
}
.hero__sub {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto 30px;
}
.hero__cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}
.card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 184, 166, 0.5);
  box-shadow: var(--shadow);
}
.card__icon {
  font-size: 2rem;
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(20,184,166,0.18), rgba(16,185,129,0.10));
  border: 1px solid rgba(20,184,166,0.25);
  margin-bottom: 16px;
}
.card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.card p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Panels & forms ---------- */
.section--panel,
.panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.section--panel {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 36px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.panel { padding: 34px 30px; }

.form { margin-top: 8px; }
.form--inline {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form--inline .field { margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { font-size: 0.85rem; font-weight: 500; color: var(--silver); }
.opt { color: var(--muted); font-weight: 400; }

input, textarea, select {
  width: 100%;
  background: #0a111e;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.96rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
select { appearance: none; cursor: pointer; }
/* Honeypot — hidden from humans, bots fill it and get blocked */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
input::placeholder, textarea::placeholder { color: #5b6677; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}
textarea { resize: vertical; min-height: 96px; }

.form--inline button { height: 46px; }
.form button { margin-top: 6px; }

.form__status {
  margin-top: 12px;
  font-size: 0.92rem;
  min-height: 1.2em;
  font-weight: 500;
}
.form--inline .form__status { grid-column: 1 / -1; margin-top: 4px; }
.form__status.is-ok { color: var(--teal-bright); }
.form__status.is-err { color: #f87171; }

/* ---------- Socials ---------- */
.socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 600;
  color: var(--silver);
  transition: transform 0.18s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.social:hover {
  transform: translateY(-4px);
  border-color: var(--teal);
  color: var(--teal-bright);
  box-shadow: var(--shadow-teal);
}
.social svg { color: var(--teal); }
.social:hover svg { color: var(--teal-bright); }
.connect__email { margin-top: 26px; color: var(--muted); }
.connect__email a { color: var(--teal-bright); font-weight: 600; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px 24px;
  text-align: center;
  margin-top: 40px;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
}
.footer__tag {
  color: var(--teal-bright);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin: 8px 0 18px;
}
.footer__links {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.footer__links a { color: var(--muted); font-size: 0.92rem; transition: color 0.2s; }
.footer__links a:hover { color: var(--teal-bright); }
.footer__copy { color: #6b7688; font-size: 0.85rem; }

/* ---------- Latest feed ---------- */
.feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.feed__item {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.feed__embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a111e;
}
.feed__embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.feed__item--ig { padding: 0; }
.feed__item--ig .instagram-media { margin: 0 !important; min-width: 0 !important; }
.feed__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
}
.feed__title { font-weight: 600; font-size: 0.95rem; }
.feed__date { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }
.feed__type {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--teal-bright);
}
.feed__empty { color: var(--muted); text-align: center; }
.feed__empty a { color: var(--teal-bright); font-weight: 600; }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px 16px;
  background: rgba(5, 9, 18, 0.72);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}
.modal[hidden] { display: none; }
.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px 28px;
  box-shadow: var(--shadow);
  animation: modal-in 0.18s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal__title { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.modal__close {
  position: absolute;
  top: 12px; right: 14px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.modal__close:hover { color: var(--text); border-color: var(--teal); }

/* ---------- Section head (title + "more" link) ---------- */
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section__more { color: var(--teal-bright); font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.section__more:hover { text-decoration: underline; }

/* ---------- Blog cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.post-card {
  display: flex; flex-direction: column;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.post-card:hover { transform: translateY(-4px); border-color: rgba(20,184,166,0.5); box-shadow: var(--shadow); }
.post-card__cover { aspect-ratio: 16 / 9; background: #0a111e center/cover no-repeat; }
.post-card__body { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.post-card__title { font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem; color: var(--text); }
.post-card__excerpt { color: var(--muted); font-size: 0.94rem; flex: 1; }
.post-card__date { color: #6b7688; font-size: 0.82rem; }

/* ---------- Article (blog post) ---------- */
.article { max-width: 760px; }
.article__crumb { margin-bottom: 14px; }
.article__crumb a { color: var(--teal-bright); font-weight: 600; }
.article__title { font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.5px; }
.article__meta { color: var(--muted); font-size: 0.9rem; margin: 12px 0 22px; }
.article__cover { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 24px; }
.article__body { color: var(--silver); font-size: 1.06rem; line-height: 1.75; }
.article__body h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; margin: 30px 0 12px; color: #fff; }
.article__body h3 { font-size: 1.2rem; margin: 24px 0 10px; color: #fff; }
.article__body p { margin: 0 0 16px; }
.article__body ul, .article__body ol { margin: 0 0 16px 1.2em; }
.article__body li { margin-bottom: 6px; }
.article__body a { color: var(--teal-bright); text-decoration: underline; }
.article__body img { max-width: 100%; border-radius: 12px; }
.article__body code { background: #0a111e; padding: 2px 6px; border-radius: 6px; font-size: 0.92em; }
.article__body pre { background: #0a111e; border: 1px solid var(--line); border-radius: 12px; padding: 16px; overflow-x: auto; }
.article__cta { margin-top: 32px; }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.product-card {
  display: flex; flex-direction: column;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.product-card:hover { transform: translateY(-4px); border-color: rgba(20,184,166,0.5); box-shadow: var(--shadow); }
.product-card__link { display: block; }
.product-card__img { aspect-ratio: 4 / 3; background: #0a111e center/cover no-repeat; }
.product-card__name { font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem; padding: 14px 16px 0; color: var(--text); }
.product-card__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 16px; margin-top: auto; }
.product-card__price { font-weight: 700; color: var(--teal-bright); }

/* ---------- Product page ---------- */
.product__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.product__media { aspect-ratio: 1 / 1; background: #0a111e center/cover no-repeat; border: 1px solid var(--line); border-radius: var(--radius); }
.product__name { font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700; letter-spacing: -0.5px; }
.product__price { font-size: 1.6rem; font-weight: 700; color: var(--teal-bright); margin: 12px 0 20px; }
.product__desc { color: var(--silver); line-height: 1.7; margin-bottom: 24px; }
.product__desc p { margin: 0 0 12px; }
.product__add { width: 100%; max-width: 280px; }
.product__add:disabled { opacity: 0.5; cursor: not-allowed; }
.product__note { color: var(--muted); font-size: 0.86rem; margin-top: 14px; }

/* ---------- Cart ---------- */
.cart-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(120deg, var(--teal), var(--green)); color: #04201c;
  border: none; font-size: 1.4rem; cursor: pointer; box-shadow: var(--shadow-teal);
  display: grid; place-items: center;
}
.cart-fab__count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  background: #FF0000; color: #fff; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  display: grid; place-items: center;
}
.cart { position: fixed; inset: 0; z-index: 110; }
.cart[hidden] { display: none; }
.cart__backdrop { position: absolute; inset: 0; background: rgba(5,9,18,0.72); backdrop-filter: blur(4px); }
.cart__panel {
  position: absolute; top: 0; right: 0; height: 100%; width: 100%; max-width: 420px;
  background: var(--bg-2); border-left: 1px solid var(--line);
  padding: 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px;
  animation: cart-in 0.2s ease-out;
}
@keyframes cart-in { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.cart__head { display: flex; align-items: center; justify-content: space-between; font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; }
.cart__x { background: transparent; border: 1px solid var(--line); border-radius: 9px; width: 34px; height: 34px; color: var(--muted); font-size: 1.4rem; cursor: pointer; }
.cart__x:hover { color: var(--text); border-color: var(--teal); }
.cart__items { display: flex; flex-direction: column; gap: 10px; }
.cart__item { background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.cart__item-info { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.cart__item-name { font-weight: 600; }
.cart__item-price { color: var(--teal-bright); white-space: nowrap; }
.cart__qty { display: flex; align-items: center; gap: 8px; }
.cart__qty button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #0a111e; color: var(--text); cursor: pointer; font-size: 1rem; }
.cart__qty button:hover { border-color: var(--teal); }
.cart__rm { width: auto !important; margin-left: auto; padding: 0 10px; color: var(--muted) !important; font-size: 0.82rem !important; }
.cart__empty { color: var(--muted); }
.cart__total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; padding-top: 8px; border-top: 1px solid var(--line); }
.cart__total-val { color: var(--teal-bright); }
.cart__form { display: flex; flex-direction: column; gap: 10px; }
.cart__status { font-size: 0.9rem; font-weight: 500; min-height: 1.1em; }
.cart__status.is-ok { color: var(--teal-bright); }
.cart__status.is-err { color: #f87171; }
.cart__fineprint { color: var(--muted); font-size: 0.8rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav { flex-wrap: wrap; row-gap: 10px; }
  .nav__links { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
  .nav__links a:not(.btn) { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .form--inline { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .section { padding: 56px 20px; }
  .section--panel { padding: 36px 22px; }
  .feed { grid-template-columns: 1fr; }
  .product__grid { grid-template-columns: 1fr; }
  .cart__panel { max-width: 100%; }
  .modal__dialog { padding: 28px 20px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .bg-circuit .trace path,
  .bg-circuit .node circle { animation: none; }
  .bg-circuit .pulse { display: none; }
}
