/* ==========================================================================
   The Really Useful Company — base styles
   A single shared stylesheet for all pages.
   ========================================================================== */

:root {
  /* Palette */
  --ink: #0e1726;
  --ink-soft: #38465c;
  --muted: #6b7888;
  --line: #e6e9f0;
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --bg-ink: #0e1726;

  /* Brand */
  --brand: #2f6df6;
  --brand-dark: #1f53cf;
  --brand-soft: #eaf1ff;
  --accent: #14c2a3;

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  /* Shape */
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(14, 23, 38, 0.06),
    0 1px 3px rgba(14, 23, 38, 0.08);
  --shadow-md: 0 10px 30px rgba(14, 23, 38, 0.08);
  --shadow-lg: 0 24px 60px rgba(14, 23, 38, 0.12);

  --maxw: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-dark);
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1rem;
}

/* Layout helpers ----------------------------------------------------------- */

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

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

.section--soft {
  background: var(--bg-soft);
}

.section--ink {
  background: var(--bg-ink);
  color: #d8deea;
}

.section--ink h2,
.section--ink h3 {
  color: #fff;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}

.section--ink .eyebrow {
  color: var(--accent);
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 60ch;
}

.section--ink .lead {
  color: #aeb8c9;
}

.center {
  text-align: center;
}

.center .lead {
  margin-inline: auto;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease,
    background 0.15s ease, color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(47, 109, 246, 0.28);
}

.btn--primary:hover {
  background: var(--brand-dark);
  color: #fff;
}

.btn--ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover {
  border-color: #c9d2e3;
  color: var(--ink);
}

.btn--light {
  background: #fff;
  color: var(--ink);
}

.btn--light:hover {
  color: var(--brand-dark);
}

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

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

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}

.brand-name strong {
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 9px;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--bg-soft);
}

.nav-links a.active {
  color: var(--brand);
}

.nav-cta {
  margin-left: 8px;
}

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

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span::before {
  position: absolute;
  top: -6px;
}

.nav-toggle span::after {
  position: absolute;
  top: 6px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 10vw, 130px);
  background: radial-gradient(
      1200px 500px at 80% -10%,
      var(--brand-soft),
      transparent 60%
    ),
    radial-gradient(900px 500px at 0% 110%, #e6fbf5, transparent 55%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  margin-bottom: 18px;
}

.hero .lead {
  font-size: 1.22rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-trust {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-trust strong {
  color: var(--ink);
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Hero visual — "production line" story card */
.line-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px 24px 28px;
}

.line-card-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.line-stage-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.line-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.line-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 10px;
}

.line-chip svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
  flex: none;
}

/* connector arrow between stages */
.line-arrow {
  display: grid;
  place-items: center;
  height: 32px;
  color: #c2cbdb;
}

.line-arrow svg {
  width: 22px;
  height: 22px;
}

/* the "machine" / belt */
.line-belt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #0e1726, #1c3157);
  color: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  overflow: hidden;
}

.line-belt::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.14) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  animation: belt-shimmer 3s ease-in-out infinite;
}

@keyframes belt-shimmer {
  to {
    transform: translateX(100%);
  }
}

.line-belt-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  color: #fff;
}

.line-belt-icon svg {
  width: 22px;
  height: 22px;
  animation: belt-spin 7s linear infinite;
}

@keyframes belt-spin {
  to {
    transform: rotate(360deg);
  }
}

.line-belt strong {
  display: block;
  font-size: 0.98rem;
  color: #fff;
}

.line-belt span {
  font-size: 0.8rem;
  color: #9fb0c9;
}

/* useful output */
.line-output {
  position: relative;
  background: var(--brand-soft);
  border: 1px solid #d4e2ff;
  border-radius: 14px;
  padding: 18px;
}

.line-stamp {
  position: absolute;
  top: -12px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(20, 194, 163, 0.35);
}

.line-output > strong {
  display: block;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 12px;
}

.line-results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.line-results span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--brand-dark);
  background: #fff;
  border: 1px solid #d4e2ff;
  padding: 6px 10px;
  border-radius: 999px;
}

.line-results svg {
  width: 14px;
  height: 14px;
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  .line-belt::after,
  .line-belt-icon svg {
    animation: none;
  }
}

/* Grids -------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 22px;
}

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

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

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

.section-head {
  max-width: 62ch;
  margin-bottom: 44px;
}

.section-head.center {
  margin-inline: auto;
}

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

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #dbe2f0;
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 16px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.98rem;
}

/* Feature list */
.ticklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.ticklist li {
  position: relative;
  padding-left: 32px;
  color: var(--ink-soft);
}

.ticklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f6df6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

/* Steps -------------------------------------------------------------------- */

.steps {
  counter-reset: step;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(4, 1fr);
}

.step {
  position: relative;
  padding-top: 18px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 1.05rem;
}

.step p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

/* Stats banner ------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.stat span {
  color: #9fb0c9;
  font-size: 0.92rem;
}

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

.cta {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  padding: clamp(36px, 6vw, 64px);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.cta h2 {
  color: #fff;
}

.cta p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: 26px;
}

/* About / value ------------------------------------------------------------ */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.media-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0e1726, #1c3157);
  color: #fff;
  padding: 36px;
  box-shadow: var(--shadow-lg);
}

.media-card .quote {
  font-size: 1.3rem;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}

.media-card .byline {
  color: #9fb0c9;
  font-size: 0.9rem;
}

/* Value tiles */
.value {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.value-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
}

.value h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.value p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 7px;
  color: var(--ink);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font: inherit;
  color: var(--ink);
  background: var(--bg-soft);
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.contact-detail {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.contact-detail .value-icon {
  background: var(--brand-soft);
}

.contact-detail h3 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.contact-detail p {
  margin: 0;
  color: var(--ink-soft);
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
  margin-bottom: 0;
}

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

.site-footer {
  background: var(--bg-ink);
  color: #9fb0c9;
  padding-block: 56px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer .brand {
  color: #fff;
  margin-bottom: 14px;
}

.site-footer .brand:hover {
  color: #fff;
}

.footer-about {
  max-width: 34ch;
  font-size: 0.92rem;
  color: #8a99b3;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-col a {
  color: #9fb0c9;
  font-size: 0.94rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.86rem;
  color: #7e8da7;
}

/* Page hero (interior pages) ----------------------------------------------- */

.page-hero {
  padding-block: clamp(56px, 8vw, 96px) clamp(28px, 4vw, 48px);
  background: radial-gradient(
    900px 400px at 90% -20%,
    var(--brand-soft),
    transparent 60%
  );
}

.page-hero .lead {
  font-size: 1.2rem;
}

/* Tags */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.tag {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

/* Reveal animation --------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

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

@media (max-width: 900px) {
  .hero-grid,
  .split,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-visual {
    order: -1;
  }

  .grid--3,
  .grid--4,
  .steps,
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 14px 18px 20px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
  }

  .nav-cta {
    margin-left: 0;
    text-align: center;
    justify-content: center;
  }

  .grid--3,
  .grid--4,
  .steps,
  .stats,
  .grid--2 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
