/* ============================================================
   SphotaLens — components
   ============================================================ */

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: var(--s-6);
}
.nav__brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.nav__brand .mark { width: 30px; height: 30px; }
.nav__brand .wordmark { font-size: 1.2rem; }
.nav__links { display: flex; align-items: center; gap: var(--s-6); }
.nav__link {
  font-weight: 600; font-size: 0.95rem; color: var(--text-muted);
  transition: color 0.15s var(--ease);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--text); }
.nav__toggle { display: none; }

@media (max-width: 860px) {
  .nav__links {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: var(--s-5);
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: var(--s-6) var(--gutter);
    transform: translateY(-120%); transition: transform 0.25s var(--ease);
  }
  .nav__links[data-open="true"] { transform: translateY(0); }
  .nav__toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--border-strong); border-radius: 8px;
  }
  .nav__toggle svg { width: 20px; height: 20px; stroke: var(--text); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.4rem; border-radius: 8px; font-weight: 700; font-size: 0.95rem;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--teal); color: var(--bg); }
.btn--primary:hover { background: #34e7cf; }
.btn--ghost { border: 1px solid var(--border-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn--lg { padding: 1rem 1.7rem; font-size: 1rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(4rem, 9vw, 7.5rem); }
.hero__grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--s-10); align-items: center;
}
.hero__eyebrow { margin-bottom: var(--s-5); }
.hero__title { margin-bottom: var(--s-5); }
.hero__title .turn { color: var(--text-muted); }
.hero__sub { max-width: 46ch; margin-bottom: var(--s-8); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }
.hero__subscribe { font-weight: 600; color: var(--text-muted); font-size: 0.95rem; }
.hero__subscribe a { color: var(--teal); border-bottom: 1px solid transparent; transition: border-color 0.15s var(--ease); }
.hero__subscribe a:hover { border-color: var(--teal); }

.hero__markwrap {
  display: grid; place-items: center; aspect-ratio: 1; max-width: 440px; margin-inline: auto; width: 100%;
}
.hero .mark { width: 100%; height: auto; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--s-8); }
  .hero__markwrap { grid-row: 1; max-width: 280px; }
}

/* ---------- The mark (animation) ----------
   Draw order edges -> ring -> nodes. Apex node = the single amber.
   Defocus -> focus -> click, then settle. Reduced motion = final state. */
.mark .m-edge, .mark .m-ring {
  stroke: var(--teal); fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.mark .m-node-base { fill: var(--teal); }
.mark .m-node-apex { fill: var(--amber); }

.mark--animate .m-edge, .mark--animate .m-ring {
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len);
  animation: draw 1s var(--ease) forwards;
}
.mark--animate .m-edge-1 { animation-delay: 0.20s; }
.mark--animate .m-edge-2 { animation-delay: 0.32s; }
.mark--animate .m-edge-3 { animation-delay: 0.44s; }
.mark--animate .m-ring   { animation-delay: 0.62s; animation-duration: 1.1s; }
.mark--animate .m-node-base { opacity: 0; animation: pop 0.4s var(--ease) 1.35s forwards; }
.mark--animate .m-node-apex {
  opacity: 0; transform-box: fill-box; transform-origin: center;
  animation: click 0.55s var(--ease) 1.6s forwards;
}
.mark--animate .m-group {
  filter: blur(6px); opacity: 0.4;
  animation: focus 0.9s var(--ease) forwards;
}

@keyframes draw  { to { stroke-dashoffset: 0; } }
@keyframes focus { to { filter: blur(0); opacity: 1; } }
@keyframes pop   { from { opacity: 0; } to { opacity: 1; } }
@keyframes click {
  0%   { opacity: 0; transform: scale(0.2); }
  55%  { opacity: 1; transform: scale(1.32); }
  100% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .mark--animate .m-edge, .mark--animate .m-ring {
    stroke-dashoffset: 0; animation: none;
  }
  .mark--animate .m-node-base, .mark--animate .m-node-apex { opacity: 1; animation: none; transform: none; }
  .mark--animate .m-group { filter: none; opacity: 1; animation: none; }
}

/* ---------- Proof bar ---------- */
.proof {
  border-block: 1px solid var(--border);
  padding-block: var(--s-6);
}
.proof__inner { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-8); align-items: baseline; }
.proof__line { font-size: 1.05rem; color: var(--text-muted); }
.proof__line strong { color: var(--text); font-weight: 700; }

/* ---------- Section header ---------- */
.sec-head { max-width: 60ch; margin-bottom: var(--s-8); }
.sec-head .eyebrow { display: block; margin-bottom: var(--s-4); }
.sec-head__title { margin-bottom: var(--s-4); }

/* ---------- Showcase strip ---------- */
.showcase__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-5);
  margin-bottom: var(--s-8); flex-wrap: wrap;
}
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5);
}
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

.decode-card {
  display: flex; flex-direction: column; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.decode-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.decode-card__media {
  aspect-ratio: 4 / 5; background: #12161A;
  display: grid; place-items: center; border-bottom: 1px solid var(--border);
}
.decode-card__media .mark { width: 56px; height: 56px; opacity: 0.4; }
/* Placeholder ghost mark carries no amber: keeps one focal amber per view. */
.decode-card__media .mark .m-edge,
.decode-card__media .mark .m-ring { stroke: var(--text-subtle); }
.decode-card__media .mark .m-node-base,
.decode-card__media .mark .m-node-apex { fill: var(--text-subtle); }
.decode-card__body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.decode-card__cell { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-subtle); }
.decode-card__title { font-weight: 700; font-size: 1.15rem; line-height: 1.25; }
.decode-card__stat { margin-top: auto; font-family: var(--f-mono); font-weight: 500; font-size: 0.85rem; color: var(--text-muted); }

/* ---------- What we do / services ---------- */
.svc { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
@media (max-width: 860px) { .svc { grid-template-columns: 1fr; } }
.svc { counter-reset: svc; }
.svc-card {
  background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-3);
  counter-increment: svc;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease), background 0.18s var(--ease);
}
.svc-card::before { content: counter(svc, decimal-leading-zero); font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.16em; color: var(--teal); }
.svc-card:hover { border-color: var(--teal); transform: translateY(-3px); background: #15191E; }
.svc-card__name { font-weight: 700; font-size: 1.18rem; color: var(--text); }
.svc-card__desc { color: var(--text-muted); font-size: 0.98rem; flex: 1; }
.svc-card__price { font-family: var(--f-mono); font-size: 0.85rem; color: var(--text); }
.svc-card__price .label { color: var(--text-subtle); }

/* ---------- Method / map ---------- */
.method__grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: var(--s-10); align-items: center; }
@media (max-width: 980px) { .method__grid { grid-template-columns: 1fr; gap: var(--s-8); } }
.method__map {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: #0f1216;
}
.method__map img { width: 100%; height: auto; }
.method__sphota { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: var(--s-5); }
.method__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); flex: none; }
.method__sphota span { font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.1em; color: var(--text-muted); }

/* ---------- Email capture ---------- */
.capture {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.5rem);
}
.capture__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: center; }
@media (max-width: 860px) { .capture__grid { grid-template-columns: 1fr; gap: var(--s-6); } }
.form-row { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.field {
  flex: 1; min-width: 220px; padding: 0.85rem 1rem; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border-strong); color: var(--text);
  transition: border-color 0.15s var(--ease);
}
.field::placeholder { color: var(--text-subtle); }
.field:focus { outline: none; border-color: var(--teal); }
.form-note { margin-top: var(--s-3); font-size: 0.82rem; color: var(--text-subtle); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band__title { margin-bottom: var(--s-5); }
.cta-band__actions { display: flex; gap: var(--s-4); justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding-block: var(--s-10) var(--s-8); }
.footer__top { display: flex; justify-content: space-between; gap: var(--s-8); flex-wrap: wrap; margin-bottom: var(--s-8); }
.footer__brand { display: flex; flex-direction: column; gap: var(--s-4); max-width: 30ch; }
.footer__lockup { display: inline-flex; align-items: center; gap: 0.6rem; }
.footer__lockup .mark { width: 30px; height: 30px; }
.footer__lockup .wordmark { font-size: 1.2rem; }
.footer__tag { color: var(--text-muted); font-size: 0.95rem; }
.footer__cols { display: flex; gap: var(--s-10); flex-wrap: wrap; }
.footer__col h4 { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-subtle); margin-bottom: var(--s-4); font-weight: 500; }
.footer__col a { display: block; color: var(--text-muted); font-size: 0.95rem; padding-block: 0.25rem; transition: color 0.15s var(--ease); }
.footer__col a:hover { color: var(--text); }
.footer__legal { border-top: 1px solid var(--border); padding-top: var(--s-5); display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.footer__legal p { font-size: 0.82rem; color: var(--text-subtle); max-width: 70ch; }

/* ---------- Sphota define ---------- */
.sphota-define { border-block: 1px solid var(--border); background: #13161A; }
.sphota-define__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--s-10); align-items: start; }
@media (max-width: 900px) { .sphota-define__grid { grid-template-columns: 1fr; gap: var(--s-6); } }
.sphota-define__word { display: flex; align-items: baseline; gap: var(--s-4); flex-wrap: wrap; }
.sphota-define__word h2 { font-family: var(--f-display); font-weight: 800; font-size: clamp(2.4rem,5vw,3.6rem); letter-spacing: -0.022em; }
.sphota-define__word h2 .amber-dot { color: var(--amber); }
.sphota-define__pron { font-family: var(--f-mono); font-size: 0.85rem; letter-spacing: 0.12em; color: var(--text-muted); }
.sphota-define__body p { font-size: 1.2rem; line-height: 1.55; color: var(--text); }
.sphota-define__body p + p { margin-top: var(--s-5); color: var(--text-muted); font-size: 1.05rem; }
.sphota-define__lead { font-family: var(--f-quote); font-style: italic; font-weight: 500; }

/* ---------- Follow / socials block ---------- */
.follow { text-align: center; }
.follow__title { margin-bottom: var(--s-4); }
.follow__sub { color: var(--text-muted); max-width: 50ch; margin: 0 auto var(--s-8); }
.socials { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; }
.social {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.7rem 1.15rem; border: 1px solid var(--border-strong); border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; color: var(--text);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.social:hover { border-color: var(--teal); color: var(--teal); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.social .at { color: var(--text-subtle); font-family: var(--f-mono); font-size: 0.85rem; }
.social:hover .at { color: var(--teal); }

/* footer socials inline */
.footer__social { display: flex; gap: var(--s-4); flex-wrap: wrap; }
.footer__social a { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-muted); font-size: 0.92rem; transition: color 0.15s var(--ease); }
.footer__social a:hover { color: var(--text); }
.footer__social svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Credential (marquee proof) ---------- */
.credential { background: #13161A; border-block: 1px solid var(--border); }
.credential__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--s-10); align-items: center; }
@media (max-width: 900px) { .credential__inner { grid-template-columns: 1fr; gap: var(--s-8); } }
.credential__eyebrow { display: block; margin-bottom: var(--s-5); }
.credential__title { margin-bottom: var(--s-5); }
.credential__body { color: var(--text-muted); font-size: 1.08rem; line-height: 1.6; margin-bottom: var(--s-6); }
.credential__meta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-6); }
.credential__meta span { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); background: rgba(31,224,197,0.07); border: 1px solid var(--border-strong); border-radius: 999px; padding: 0.42rem 0.8rem; }

.playcard {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9;
  background: #0F1216; border: 1px solid var(--border-strong); border-radius: var(--radius);
  overflow: hidden; transition: border-color 0.18s var(--ease);
}
.playcard:hover { border-color: var(--teal); }
.playcard__play {
  width: 64px; height: 64px; border-radius: 50%; border: 1.5px solid var(--teal);
  display: grid; place-items: center; transition: transform 0.18s var(--ease);
}
.playcard:hover .playcard__play { transform: scale(1.06); }
.playcard__play svg { width: 22px; height: 22px; fill: var(--teal); margin-left: 3px; }
.playcard__label {
  position: absolute; left: var(--s-5); bottom: var(--s-4);
  font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted);
}

/* credential additions */
.credential__next { font-family: var(--f-quote); font-style: italic; font-size: 1.25rem; color: var(--text); margin-bottom: var(--s-6); }
.credential__clients { font-size: 0.95rem; color: var(--text-muted); margin-bottom: var(--s-6); }
.credential__clients strong { color: var(--text); font-weight: 700; }
.credential__actions { display: flex; gap: var(--s-4); flex-wrap: wrap; }

/* ---------- Contact / start-a-project ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 0.62fr; gap: var(--s-10); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: var(--s-8); } }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.form-field { display: flex; flex-direction: column; gap: var(--s-2); }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.form-field .field { width: 100%; }
textarea.field { resize: vertical; min-height: 130px; }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237E8794' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; background-size: 18px; padding-right: 2.6rem; }
.contact-aside { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-6); }
.contact-aside h3 { font-weight: 700; font-size: 1.05rem; margin-bottom: var(--s-3); }
.contact-aside p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: var(--s-4); }
.contact-aside a.mail { color: var(--teal); font-weight: 600; }
.contact-aside .divider { height: 1px; background: var(--border); margin-block: var(--s-5); }

/* ---------- Page hero (sub-pages) ---------- */
.page-hero { padding-block: clamp(3.5rem, 7vw, 5.5rem) 0; }
.page-hero .eyebrow { display:block; margin-bottom: var(--s-4); }
.page-hero h1 { margin-bottom: var(--s-5); }
.page-hero p { max-width: 56ch; }

/* ---------- Service detail cards ---------- */
.svc-card__includes { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-subtle); margin-top: var(--s-2); }

/* ---------- Process steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: var(--s-5); } }
.step__num { font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.18em; color: var(--teal); margin-bottom: var(--s-3); }
.step h3 { font-weight: 700; font-size: 1.15rem; margin-bottom: var(--s-2); }
.step p { color: var(--text-muted); font-size: 0.98rem; }

/* ---------- About ---------- */
.about-lead { font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.45; max-width: 32ch; }
.about-body p { color: var(--text-muted); font-size: 1.08rem; line-height: 1.6; }
.about-body p + p { margin-top: var(--s-5); }
.about-body strong { color: var(--text); font-weight: 700; }

/* ---------- Form success / error ---------- */
.form-error { margin-top: var(--s-4); color: #ff7a7a; font-size: 0.95rem; }
.form-success {
  background: var(--bg-elev); border: 1px solid var(--border-strong); border-left: 3px solid var(--teal);
  border-radius: var(--radius); padding: var(--s-6);
}
.form-success h3 { font-weight: 700; font-size: 1.2rem; margin-bottom: var(--s-3); }
.form-success p { color: var(--text-muted); }

/* ---------- Constellation hero ---------- */
.constellation-hero { position: relative; overflow: hidden; }
.constellation { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.constellation-hero > .container { position: relative; z-index: 1; }

/* ---------- Brief subscribe ---------- */
.brief-sub { max-width: 520px; }
.brief-sub .form-row { margin-top: var(--s-5); }
.brief-terms { margin-top: var(--s-3); font-size: 0.82rem; color: var(--text-subtle); }
.brief-terms a { color: var(--text-muted); border-bottom: 1px solid var(--border-strong); }
.brief-terms a:hover { color: var(--teal); border-color: var(--teal); }
.brief-points { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--s-5); margin-top: var(--s-4); }
@media (max-width: 760px){ .brief-points { grid-template-columns: 1fr; } }
.brief-point h3 { font-weight: 700; font-size: 1.05rem; margin-bottom: var(--s-2); }
.brief-point p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Footer legal links ---------- */
.footer__legal-links { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.footer__legal-links a { font-size: 0.82rem; color: var(--text-subtle); }
.footer__legal-links a:hover { color: var(--text); }

/* ---------- Legal / prose pages ---------- */
.prose { max-width: 70ch; }
.prose h2 { font-weight: 700; font-size: 1.3rem; margin: var(--s-8) 0 var(--s-3); }
.prose h2:first-of-type { margin-top: var(--s-4); }
.prose p, .prose li { color: var(--text-muted); line-height: 1.65; }
.prose p { margin-bottom: var(--s-4); }
.prose ul { margin: 0 0 var(--s-4) 1.2rem; }
.prose li { margin-bottom: var(--s-2); }
.prose a { color: var(--teal); }
.prose strong { color: var(--text); }
.prose .updated { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-subtle); }

/* ---------- Agree checkbox ---------- */
.agree { display: flex; gap: 0.55rem; align-items: flex-start; margin-top: var(--s-3); font-size: 0.82rem; color: var(--text-subtle); line-height: 1.45; }
.agree input { margin-top: 0.15rem; width: 15px; height: 15px; accent-color: var(--teal); flex-shrink: 0; }
.agree a { color: var(--text-muted); border-bottom: 1px solid var(--border-strong); }
.agree a:hover { color: var(--teal); border-color: var(--teal); }
.brief-success { color: var(--teal); font-weight: 600; font-size: 1.02rem; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal, .reveal.is-visible { opacity: 1 !important; transform: none !important; transition: none !important; } }

/* ---------- Beehiiv embed wrapper ---------- */
.beehiiv-embed { max-width: 520px; margin-top: var(--s-5); margin-bottom: var(--s-3); }
.beehiiv-embed iframe { max-width: 100%; border: 0; }
