/* ==========================================================================
   Sigma Torq site stylesheet
   Light theme only. Indigo/violet accents. No build step, no dependencies.
   ========================================================================== */

/* --- Tokens ---------------------------------------------------------------- */

:root {
  /* Surfaces */
  --surface:        #ffffff;
  --surface-alt:    #f8fafc;
  --surface-sunken: #f1f5f9;
  --border:         #e2e8f0;
  --border-strong:  #cbd5e1;

  /* Accents */
  --indigo:         #4f46e5;
  --indigo-dark:    #4338ca;
  --indigo-soft:    #eef2ff;
  --violet:         #7c3aed;
  --violet-soft:    #f5f3ff;

  /* Text */
  --ink:            #0f172a;
  --body:           #475569;
  --muted:          #64748b;
  --on-accent:      #ffffff;

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  /* Space + shape */
  --maxw:       1120px;
  --gutter:     16px;
  --radius:     14px;
  --radius-sm:  9px;
  --shadow:     0 1px 2px rgba(15, 23, 42, .04),
                0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg:  0 2px 4px rgba(15, 23, 42, .04),
                0 18px 48px -16px rgba(15, 23, 42, .18);
  --ring:       0 0 0 3px rgba(79, 70, 229, .35);
}

/* --- Reset ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

/* The HTML `hidden` attribute must beat any author `display` rule below it,
   otherwise elements like .notice (display:flex) stay visible while hidden. */
[hidden] { display: none !important; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.021em; }
h1 { font-size: clamp(2.1rem, 1.35rem + 3.2vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.1875rem; font-weight: 650; }
p  { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--indigo-dark); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Helpers -------------------------------------------------------------- */

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--indigo);
  color: var(--on-accent);
  padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip:focus { left: 0; text-decoration: none; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--indigo);
  margin: 0 0 1rem;
  font-weight: 600;
}

.lede { font-size: clamp(1.03rem, .98rem + .3vw, 1.19rem); max-width: 62ch; }

.section { padding: clamp(3.5rem, 2rem + 6vw, 6.5rem) 0; }
.section--alt { background: var(--surface-alt); border-block: 1px solid var(--border); }
.section__head { max-width: 64ch; margin-bottom: clamp(2rem, 1.2rem + 2.5vw, 3.25rem); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .72rem 1.3rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease,
              color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--indigo); color: var(--on-accent); box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--indigo-dark); color: var(--on-accent); box-shadow: var(--shadow-lg); }

.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-alt); border-color: var(--muted); color: var(--ink); }

.btn--onAccent { background: var(--surface); color: var(--indigo-dark); }
.btn--onAccent:hover { background: var(--indigo-soft); color: var(--indigo-dark); }

.btn--lg { padding: .88rem 1.6rem; font-size: 1rem; }
.btn--block { width: 100%; justify-content: center; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* --- Header --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -.01em;
  font-size: 1.0625rem;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  flex: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
}
.brand__word { white-space: nowrap; }
.brand__word span { color: var(--indigo); }

.nav { display: flex; align-items: center; gap: 1.9rem; }
.nav__list { display: flex; align-items: center; gap: 1.9rem; }
.nav__link {
  color: var(--body);
  font-size: .9375rem;
  font-weight: 550;
  white-space: nowrap;
}
.nav__link:hover { color: var(--ink); text-decoration: none; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--ink);
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 2rem + 7vw, 7rem) 0 clamp(3rem, 2rem + 4vw, 5rem);
  background:
    radial-gradient(900px 420px at 12% -8%,  rgba(79, 70, 229, .11), transparent 70%),
    radial-gradient(760px 380px at 88% 4%,   rgba(124, 58, 237, .10), transparent 72%),
    var(--surface);
}
.hero__inner { position: relative; max-width: 54rem; }
.hero h1 { margin-bottom: 1.1rem; }

/* Benefit tags above the headline */
.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 0 0 1.5rem;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .85rem;
  background: var(--indigo-soft);
  border: 1px solid rgba(79, 70, 229, .18);
  border-radius: 999px;
  color: var(--indigo-dark);
  font-size: .84rem;
  font-weight: 600;
}
.tag svg { width: 15px; height: 15px; flex: none; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--indigo), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Capability strip ----------------------------------------------------- */

.strip {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.strip__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}
.strip__item {
  background: var(--surface);
  padding: 1.6rem 1.25rem;
}
.strip__item:first-child { padding-left: 0; }
.strip__k {
  display: block;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .45rem;
}
.strip__v { color: var(--ink); font-weight: 600; font-size: .96rem; line-height: 1.45; }

/* --- Cards ---------------------------------------------------------------- */

.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow-lg); border-color: var(--border-strong); transform: translateY(-2px); }

.card__icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 11px;
  background: var(--indigo-soft);
  color: var(--indigo);
  margin-bottom: 1.1rem;
}
.card__icon svg { width: 22px; height: 22px; }

.card h3 { margin-bottom: .4rem; }
.card__promise { color: var(--body); font-size: .95rem; margin-bottom: 1.1rem; }

.ticks { display: grid; gap: .55rem; }
.ticks li {
  position: relative;
  padding-left: 1.5rem;
  font-size: .9rem;
  color: var(--body);
  line-height: 1.5;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .42em;
  width: 13px; height: 7px;
  border-left: 2px solid var(--violet);
  border-bottom: 2px solid var(--violet);
  transform: rotate(-45deg);
  border-radius: 1px;
}

/* --- Approach steps ------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 1.4rem;
  border-top: 2px solid var(--border);
}
.step::after {
  content: "";
  position: absolute;
  top: -2px; left: 0;
  width: 2.25rem; height: 2px;
  background: linear-gradient(90deg, var(--indigo), var(--violet));
}
.step__n {
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--indigo);
  display: block;
  margin-bottom: .55rem;
}
.step h3 { font-size: 1.0625rem; margin-bottom: .35rem; }
.step p { font-size: .9rem; margin: 0; }

/* --- Why / principles ----------------------------------------------------- */

.principle {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  align-items: start;
}
.principle__num {
  font-family: var(--font-mono);
  font-weight: 650;
  color: var(--violet);
  font-size: .95rem;
  padding-top: .18rem;
}
.principle h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.principle p { font-size: .93rem; margin: 0; }

.pull {
  margin-top: clamp(2rem, 1.4rem + 2vw, 3rem);
  padding: 1.75rem clamp(1.25rem, .8rem + 1.6vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--indigo);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: clamp(1.03rem, .98rem + .35vw, 1.22rem);
  font-weight: 550;
  line-height: 1.5;
}

/* --- CTA band ------------------------------------------------------------- */

.cta {
  background: linear-gradient(120deg, var(--indigo), var(--violet));
  color: var(--on-accent);
  padding: clamp(2.75rem, 2rem + 4vw, 4.5rem) 0;
}
.cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
}
.cta h2 { color: var(--on-accent); margin-bottom: .4rem; }
.cta p { color: rgba(255, 255, 255, .88); margin: 0; max-width: 52ch; }

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
  font-size: .9rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer__meta { color: var(--muted); font-size: .86rem; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* --- Contact page --------------------------------------------------------- */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2rem, 1.5rem + 3vw, 4rem);
  align-items: start;
}

.aside-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.aside-card h3 { font-size: 1rem; margin-bottom: .6rem; }
.aside-card p:last-child { margin-bottom: 0; }

.form { display: grid; gap: 1.1rem; }

.field { display: grid; gap: .4rem; }
.field > label { font-size: .89rem; font-weight: 600; color: var(--ink); }
.field__hint { font-size: .8rem; color: var(--muted); }
.field__req { color: var(--violet); font-weight: 600; }

.input, .select, .textarea {
  width: 100%;
  padding: .72rem .85rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font: inherit;
  font-size: .95rem;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.input::placeholder, .textarea::placeholder { color: #94a3b8; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: var(--ring);
}
.textarea { min-height: 140px; resize: vertical; }
.select { appearance: none; cursor: pointer; padding-right: 2.5rem;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
}

.field[data-invalid="true"] .input,
.field[data-invalid="true"] .select,
.field[data-invalid="true"] .textarea { border-color: #dc2626; }
.field__error { font-size: .82rem; color: #b91c1c; font-weight: 550; min-height: 0; }

/* Honeypot: hidden from humans and assistive tech, visible to naive bots */
.pot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid;
  margin-bottom: 1.75rem;
  font-size: .92rem;
}
.notice svg { width: 18px; height: 18px; flex: none; margin-top: .18rem; }
.notice--ok   { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.notice--bad  { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.notice strong { display: block; color: inherit; }

/* --- Reveal on scroll ----------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .55s ease, transform .55s ease;
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }

  /* Stack straight to one column: with three items, a two-column grid would
     leave an empty cell showing through as a grey block. */
  .strip__grid { grid-template-columns: 1fr; }
  .strip__item, .strip__item:first-child { padding: 1.15rem 0; }

  .nav {
    position: absolute;
    inset: 70px 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .75rem var(--gutter) 1.25rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .nav[data-open="true"] { display: flex; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list li { border-bottom: 1px solid var(--border); }
  .nav__link { display: block; padding: .85rem .25rem; font-size: 1rem; }
  .nav .btn { margin-top: 1rem; justify-content: center; }

  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .cta__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .btn-row .btn { width: 100%; justify-content: center; }
}

/* --- Motion + print ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .btn:hover, .card:hover { transform: none; }
}

@media print {
  .site-header, .nav, .cta, .nav-toggle { display: none !important; }
  body { color: #000; }
  .card, .aside-card { break-inside: avoid; box-shadow: none; }
}
