/* ==========================================================================
   Sosteknology — styles
   ========================================================================== */

:root {
  --bg: #070b14;
  --bg-alt: #0b1120;
  --surface: #111a2e;
  --line: #1e2a44;
  --text: #e6ebf5;
  --muted: #8d9ab3;
  --accent: #38bdf8;
  --accent-2: #7dd3fc;
  --accent-deep: #0284c7;

  --font-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --radius: 6px;
  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
}
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.kicker, .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.95em 1.6em;
  border-radius: var(--radius);
  background: var(--accent);
  color: #04121f;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--accent-2); color: #04121f; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); color: var(--text); border-color: var(--accent); }
.btn-small { padding: 0.6em 1.1em; font-size: 0.9rem; }

/* ---------- Image slots ----------
   Every .media box shows a labeled placeholder until the matching file
   exists in /images. JS adds .is-missing when an image fails to load. */
.media {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(56,189,248,.08), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(56,189,248,.06) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(56,189,248,.06) 23px 24px),
    var(--surface);
  border-radius: var(--radius);
  aspect-ratio: 16 / 10;
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media.is-missing img { display: none; }
.media.is-missing::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: inherit;
}
.media.tall { aspect-ratio: 4 / 5; }
.media.portrait { aspect-ratio: 4 / 5; }
.media-bg { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.media-bg.is-missing::after { border: 0; place-items: end end; padding: 1.5rem; opacity: .6; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); }
.brand-logo { height: 34px; width: auto; display: block; }
@media (max-width: 480px) { .brand-logo { height: 28px; } }
.brand-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  color: var(--text);
  margin: 0;
}
.brand-text span { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a:not(.btn) { color: var(--muted); font-size: .95rem; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--text); }

.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 900px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-bg img { opacity: .55; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 75% 30%, rgba(56,189,248,.18), transparent 55%),
    linear-gradient(90deg, var(--bg) 15%, rgba(7,11,20,.7) 55%, rgba(7,11,20,.3));
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(56,189,248,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 70% 50%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 50%, #000 20%, transparent 70%);
}
.hero-content { position: relative; z-index: 2; padding-block: 6rem; }
.hero h1 {
  font-size: clamp(2.75rem, 8vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin-bottom: 1.5rem;
}
.hero-sub { font-family: var(--font-head); font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 600; color: var(--accent-2); }
.hero-body { max-width: 40rem; color: var(--muted); font-size: 1.125rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* ---------- Intro ---------- */
.intro { padding-block: 5rem; border-bottom: 1px solid var(--line); }
.intro-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 4rem; align-items: start; }
.intro-lead { font-family: var(--font-head); font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 600; line-height: 1.3; }
.intro-grid > div p { color: var(--muted); }
.tagline { font-family: var(--font-mono); color: var(--accent) !important; font-size: .9rem; letter-spacing: .04em; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4.5rem, 9vw, 7.5rem); }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { max-width: 50rem; margin-bottom: 3.5rem; }
.section-lead { color: var(--muted); font-size: 1.15rem; }
.section-lead.strong { color: var(--text); font-family: var(--font-head); font-weight: 600; font-size: 1.35rem; }

/* ---------- Service cards ---------- */
.service-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.service-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  transition: border-color .25s, transform .25s;
}
.service-card:hover { border-color: var(--accent); transform: translateY(-4px); color: var(--text); }
.service-card .media { border-radius: 0; aspect-ratio: 4 / 3; }
.service-card-body { padding: 1.25rem; }
.service-card .num { font-family: var(--font-mono); font-size: .75rem; color: var(--accent); }
.service-card h3 { font-size: 1.05rem; margin: .4rem 0 .5rem; }
.service-card p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- Service details ---------- */
.service-details { display: grid; gap: clamp(4rem, 8vw, 6.5rem); }
.service-detail { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.service-detail.reverse .media { order: 2; }
.service-detail h3 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 800; }
.service-detail-text > p { color: var(--muted); }
.caps {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .55rem 1.5rem;
  font-size: .95rem;
}
.caps li { position: relative; padding-left: 1.2rem; }
.caps li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border: 1.5px solid var(--accent); transform: rotate(45deg); }
.service-detail-text .closer { color: var(--text); font-weight: 500; border-left: 2px solid var(--accent); padding-left: 1rem; }

/* ---------- Approach ---------- */
.approach-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.approach-grid p { color: var(--muted); }
.tech-chips { list-style: none; padding: 0; margin: 1.5rem 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tech-chips li { font-family: var(--font-mono); font-size: .8rem; padding: .4em .85em; border: 1px solid var(--line); border-radius: 999px; color: var(--accent-2); background: var(--surface); }
.pull { font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; color: var(--text) !important; margin-top: 1.5rem; }

/* ---------- Why ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.why-item { padding: 2rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .25s; }
.why-item:hover { background: var(--surface); }
.why-item h3 { font-size: 1.15rem; }
.why-item p { color: var(--muted); font-size: .97rem; margin: 0; }

/* ---------- Founder ---------- */
.founder-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.founder-photo { position: sticky; top: 100px; }
.founder-photo .media { box-shadow: 18px 18px 0 -1px var(--bg), 18px 18px 0 0 var(--accent-deep); }
.founder-text p { color: var(--muted); }
.founder-text .role { font-family: var(--font-mono); font-size: .82rem; letter-spacing: .04em; color: var(--accent); margin-bottom: 2rem; }
.founder-text blockquote {
  margin: 2.5rem 0 0;
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-head);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

/* ---------- Process ---------- */
.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; counter-reset: none; }
.process li { position: relative; padding: 1.75rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.process li::after { content: ""; position: absolute; top: 2.35rem; right: -1rem; width: 1rem; height: 1px; background: var(--accent); }
.process li:last-child::after { display: none; }
.process .step { font-family: var(--font-mono); font-size: .8rem; color: var(--accent); }
.process h3 { margin: .5rem 0 .6rem; }
.process p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- CTA / Contact ---------- */
.cta { position: relative; padding-block: clamp(5rem, 10vw, 8rem); overflow: hidden; }
.cta-bg img { opacity: .3; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(7,11,20,.6), var(--bg)), radial-gradient(ellipse at 20% 30%, rgba(56,189,248,.15), transparent 60%); }
.cta-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.cta-grid > div p { color: var(--muted); }

.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; display: grid; gap: 1rem; }
.contact-form h3 { font-size: 1.4rem; margin-bottom: .25rem; }
.contact-form label { display: grid; gap: .4rem; font-size: .85rem; font-weight: 500; color: var(--muted); }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .75em .9em;
  width: 100%;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56,189,248,.15); }
.contact-form .btn { justify-self: start; margin-top: .5rem; }
.contact-form .btn:disabled { opacity: .6; cursor: wait; transform: none; }
.form-status { color: var(--accent-2); font-size: .95rem; margin: 0; }
.form-status.is-error { color: #f87171; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
[hidden] { display: none !important; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 3rem; background: var(--bg); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 2rem; text-align: center; }
.footer-logo { height: 30px; width: auto; display: block; margin-inline: auto; }
.footer-tag { color: var(--muted); font-size: .9rem; margin: .75rem 0 0; }
.footer-services ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; }
.footer-services li { display: flex; align-items: center; }
.footer-services li + li::before { content: "·"; color: var(--accent-deep); padding-inline: 1.1rem; font-size: 1.1rem; }
.footer-services a { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .02em; color: var(--muted); white-space: nowrap; transition: color .2s; }
.footer-services a:hover { color: var(--accent); }
.copyright { align-self: stretch; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1.5rem; margin: 0; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .process { grid-template-columns: repeat(3, 1fr); }
  .process li::after { display: none; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem var(--gutter) 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 1rem; text-align: center; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .intro-grid, .service-detail, .approach-grid, .founder-grid, .cta-grid { grid-template-columns: 1fr; }
  .intro-grid { gap: 1.5rem; }
  .service-detail.reverse .media { order: 0; }
  .founder-photo { position: static; max-width: 420px; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-services ul { flex-direction: column; align-items: center; gap: .85rem; }
  .footer-services li + li::before { content: none; }
}

@media (max-width: 600px) {
  .service-grid, .process, .why-grid { grid-template-columns: 1fr; }
  .caps { grid-template-columns: 1fr; }
  .hero-content { padding-block: 4rem; }
  .hero-actions .btn { flex: 1 1 100%; text-align: center; }
  .contact-form { padding: 1.5rem; }
  .founder-photo .media { box-shadow: 10px 10px 0 -1px var(--bg), 10px 10px 0 0 var(--accent-deep); }
}
