/* ============================================================
   trysciloop.dev — light, elegant, mobile-first
   Restraint over decoration. Whitespace does the work.
   ============================================================ */

:root {
  color-scheme: light;
  --bg: #fbfbf9;
  --bg-soft: #f3f3ef;
  --ink: #16181c;
  --muted: #5d626b;
  --faint: #6f747c;
  --line: rgba(22, 24, 28, 0.09);
  --accent: #1f7ae0;
  --accent-soft: rgba(31, 122, 224, 0.1);

  --max: 1080px;
  --reveal-y: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

.skip-link {
  position: fixed;
  left: 16px;
  top: 14px;
  z-index: 50;
  transform: translateY(-160%);
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
}

/* ---------- shared layout ---------- */

.nav,
.hero,
.proof,
.section,
.cta,
.footer {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 22px;
}

.section {
  padding-block: clamp(52px, 9vw, 92px);
}

/* ---------- type ---------- */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.4rem, 8.5vw, 4.2rem);
  font-weight: 400;
}

h2 {
  font-size: clamp(1.9rem, 6vw, 2.9rem);
}

h3 {
  font-size: 1.3rem;
  font-weight: 500;
}

p {
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.button-primary {
  background: var(--ink);
  color: #fff;
}
.button-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -12px rgba(31, 122, 224, 0.7);
}

.button-ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: transparent;
}
.button-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(251, 251, 249, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.brand img {
  width: 104px;
}
.brand-tag {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-link {
  display: none;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.2s var(--ease);
}
.nav-link:hover {
  color: var(--ink);
}
.nav-cta {
  height: 42px;
  padding: 0 18px;
  font-size: 0.92rem;
}

/* ---------- hero ---------- */

.hero {
  padding-top: clamp(56px, 16vw, 116px);
  padding-bottom: clamp(48px, 10vw, 80px);
}

.hero .eyebrow {
  margin-bottom: 26px;
}

.hero h1 {
  max-width: 16ch;
  margin-bottom: 26px;
}

.hero-subhead {
  max-width: 46ch;
  margin-bottom: 36px;
  color: var(--muted);
  font-size: clamp(1.08rem, 3.4vw, 1.3rem);
  font-weight: 300;
  line-height: 1.55;
}

.hero-builds {
  display: grid;
  gap: 14px;
  margin: clamp(34px, 6vw, 52px) 0 0;
  padding: 0;
  list-style: none;
}
.hero-builds li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 1rem;
}
.hero-builds li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}

/* ---------- proof strip ---------- */

.proof {
  padding-block: clamp(36px, 8vw, 56px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}
.proof-row span {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

/* ---------- section heads ---------- */

.section-head {
  margin-bottom: clamp(28px, 5vw, 44px);
}
.section-head h2 {
  max-width: 16ch;
}
.section-head .eyebrow {
  margin-bottom: 18px;
}

/* ---------- service cards ---------- */

.cards {
  display: grid;
  gap: clamp(40px, 7vw, 56px);
}

.card {
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.card-icon {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--accent);
}
.card-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card h3 {
  margin-bottom: 14px;
}
.card p {
  color: var(--muted);
  font-weight: 300;
}
.card-outcome {
  margin-top: 18px;
  color: var(--ink) !important;
  font-weight: 400 !important;
}

/* ---------- process steps ---------- */

.steps {
  display: grid;
  gap: clamp(34px, 6vw, 48px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.step-k {
  display: block;
  margin-bottom: 10px;
  font-size: 1.15rem;
  font-weight: 500;
}
.steps p {
  color: var(--muted);
  font-weight: 300;
}

/* ---------- trust ---------- */

.trust {
  text-align: left;
}
.trust .eyebrow {
  margin-bottom: 28px;
}
.trust-line {
  max-width: 28ch;
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  font-weight: 300;
  line-height: 1.28;
  letter-spacing: -0.02em;
}
.trust-line em {
  font-style: normal;
  color: var(--accent);
}

/* ---------- good fit ---------- */

.fit {
  display: grid;
  gap: clamp(20px, 4vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.fit li {
  position: relative;
  padding-left: 34px;
  font-size: clamp(1.1rem, 3.6vw, 1.35rem);
  font-weight: 300;
  color: var(--ink);
}
.fit li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}

/* ---------- final cta ---------- */

.cta {
  padding-block: clamp(24px, 6vw, 56px);
  text-align: left;
}
.cta-panel {
  padding: clamp(36px, 7vw, 72px);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.cta .eyebrow {
  margin-bottom: 22px;
}
.cta h2 {
  max-width: 16ch;
  margin-bottom: 20px;
  font-size: clamp(2.1rem, 7vw, 3.4rem);
}
.cta-sub {
  max-width: 44ch;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(1.05rem, 3.2vw, 1.2rem);
  font-weight: 300;
}

/* ---------- footer ---------- */

.footer {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-block: 40px 52px;
  border-top: 1px solid var(--line);
}
.footer .brand img {
  width: 96px;
}
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  color: var(--faint);
  font-size: 0.9rem;
}
.footer-meta a {
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.footer-meta a:hover {
  color: var(--ink);
}

/* ---------- scroll reveal ---------- */

/* Hide only when JS is available, so content is never invisible without it */
.js .reveal {
  opacity: 0;
  transform: translateY(var(--reveal-y));
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}
/* gentle stagger within groups */
.cards .card:nth-child(2),
.steps li:nth-child(2),
.fit li:nth-child(2) {
  transition-delay: 0.08s;
}
.cards .card:nth-child(3),
.steps li:nth-child(3),
.fit li:nth-child(3) {
  transition-delay: 0.16s;
}
.steps li:nth-child(4) {
  transition-delay: 0.24s;
}

/* ============================================================
   Tablet / desktop
   ============================================================ */

@media (min-width: 700px) {
  .nav,
  .hero,
  .proof,
  .section,
  .cta,
  .footer {
    padding-inline: 40px;
  }

  .nav-link {
    display: inline-flex;
  }

  .brand img {
    width: 118px;
  }

  .hero-builds {
    grid-template-columns: 1fr 1fr;
    gap: 18px 40px;
    max-width: 640px;
  }

  .proof-row {
    gap: 40px;
  }

  .section-head {
    max-width: none;
  }
  .section-head h2 {
    max-width: 15ch;
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
  }

  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
  }

  .footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 980px) {
  .hero {
    padding-top: clamp(96px, 14vw, 150px);
  }
  .hero h1 {
    font-size: clamp(3.6rem, 6vw, 5rem);
  }
}

/* ============================================================
   Accessibility — honour reduced motion
   ============================================================ */

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