/* ─── Variables ─── */
:root {
  --bg: #f4f1ea;
  --bg-alt: #eee9df;
  --bg-dark: #1f2940;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --ink: #1f2940;
  --ink-soft: rgba(31, 41, 64, 0.68);
  --line: rgba(31, 41, 64, 0.1);
  --accent: #2aa6f8;
  --accent-soft: rgba(42, 166, 248, 0.12);
  --shadow: 0 28px 80px rgba(31, 41, 64, 0.1);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --max-width: 1140px;
  --max-width-narrow: 720px;
  --section-pad: clamp(3rem, 7vw, 5.5rem);
}

/* ─── Reset ─── */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(42, 166, 248, 0.08), transparent 30%),
    linear-gradient(180deg, #f8f5ef 0%, var(--bg) 36%, #efe8dc 100%);
  overflow-x: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

/* ─── Page texture ─── */
.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    radial-gradient(rgba(31, 41, 64, 0.14) 0.5px, transparent 0.5px),
    radial-gradient(rgba(42, 166, 248, 0.06) 0.6px, transparent 0.6px);
  background-position: 0 0, 14px 14px;
  background-size: 22px 22px, 22px 22px;
  mix-blend-mode: multiply;
  z-index: -1;
}

/* ─── Layout utilities ─── */
.section-shell {
  width: min(calc(100% - 3rem), var(--max-width));
  margin: 0 auto;
}

.section {
  position: relative;
  padding: var(--section-pad) 0;
}

section[id] {
  scroll-margin-top: 6rem;
}

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.4rem clamp(1rem, 3vw, 2rem) 0;
}

.nav-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  background: rgba(248, 245, 239, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 32px rgba(31, 41, 64, 0.06);
}

.brand {
  display: inline-grid;
  gap: 0;
  align-items: start;
}

.brand-mark {
  position: relative;
  display: inline-block;
}

.brand-logo {
  width: clamp(20.625rem, 30vw, 25.3rem);
  margin: -18% 0 -18%;
}

.brand-trademark {
  position: absolute;
  top: 41%;
  left: 76.2%;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(31, 41, 64, 0.56);
  line-height: 1;
  transform: translate(0, -52%);
}

.brand-pronunciation {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-style: italic;
  font-size: 0.78rem;
  color: rgba(31, 41, 64, 0.5);
  letter-spacing: 0.02em;
}

/* Nav links */
.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: color 180ms ease, background 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--ink);
  background: rgba(42, 166, 248, 0.06);
}

.nav-cta {
  margin-left: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
}

/* Progress bar */
.nav-progress {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0.5rem auto 0;
  height: 2px;
  border-radius: 999px;
  background: rgba(31, 41, 64, 0.06);
  overflow: hidden;
}

.nav-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(42, 166, 248, 0.3), var(--accent));
  transition: width 120ms linear;
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 110;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 300ms ease, opacity 200ms ease;
  transform-origin: center;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Hero ─── */
.hero {
  padding-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: var(--section-pad);
  text-align: center;
}

.hero-inner {
  max-width: 52rem;
  margin: 0 auto;
}

.hero-title {
  margin: 0 auto 1.8rem;
  max-width: 22ch;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2.8rem, 6.5vw, 5.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.04;
  color: var(--ink);
}

.hero-title .word {
  display: inline-block;
  margin-right: 0.18em;
  transform: translateY(18px);
  opacity: 0;
  filter: blur(10px);
  animation: word-rise 0.9s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

.hero-title .word:last-child {
  margin-right: 0;
}

.hero-subtitle {
  max-width: 38rem;
  margin: 0 auto 1.2rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
  line-height: 1.75;
}

.hero-supporting {
  margin: 0 auto 2.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* ─── Primary button ─── */
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 9rem;
  padding: 0.9rem 1.5rem;
  border: 0;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #1f2940, #2d3958);
  color: #fff;
  box-shadow: 0 12px 32px rgba(31, 41, 64, 0.16);
  transition: transform 200ms ease, box-shadow 200ms ease;
  cursor: pointer;
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(31, 41, 64, 0.22);
}

.primary-button--light {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.primary-button--light:hover,
.primary-button--light:focus-visible {
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

/* ─── Section headings ─── */
.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}

.section-label {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #1777ba;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ─── Differentiation ─── */
.differentiation {
  background: var(--bg-alt);
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.diff-card {
  position: relative;
  padding: 2rem 2rem 2rem 2.2rem;
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 24px rgba(31, 41, 64, 0.05);
  transition: transform 280ms ease, box-shadow 280ms ease;
  overflow: hidden;
}

.diff-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(31, 41, 64, 0.1);
}

.diff-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), rgba(42, 166, 248, 0.25));
  border-radius: 4px 0 0 4px;
}

.diff-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

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

/* ─── Process / How We Work ─── */
.process {
  background: transparent;
}

.process-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 0;
}

.process-line {
  position: absolute;
  top: 1.5rem;
  left: calc(12.5% + 0.5rem);
  right: calc(12.5% + 0.5rem);
  height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(42, 166, 248, 0.15));
  border-radius: 999px;
  z-index: 0;
}

.process-step {
  position: relative;
  text-align: center;
  z-index: 1;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.process-step h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--ink);
}

/* Stagger reveal for process steps */
.process-step:nth-child(2) { transition-delay: 0ms; }
.process-step:nth-child(3) { transition-delay: 150ms; }
.process-step:nth-child(4) { transition-delay: 300ms; }
.process-step:nth-child(5) { transition-delay: 450ms; }

/* ─── About ─── */
.about {
  background: var(--bg-alt);
}

.about-header {
  max-width: var(--max-width-narrow);
  margin-bottom: 3rem;
}

.about-header h2 {
  margin: 0 0 1.5rem;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}

.about-body p {
  max-width: 40rem;
  margin: 0 0 1rem;
  color: var(--ink-soft);
  line-height: 1.8;
  font-size: 1.1rem;
}

.about-differentiators {
  max-width: 38rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.difference-list {
  display: grid;
  gap: 1.1rem;
  padding: 0;
  margin: 1.25rem 0 0;
  list-style: none;
}

.difference-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 1.05rem;
}

.difference-list li::before {
  content: "";
  position: absolute;
  top: 0.72rem;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(42, 166, 248, 0.1);
}

/* ─── Contact ─── */
.contact {
  background: transparent;
}

.contact-header {
  text-align: center;
  max-width: var(--max-width-narrow);
  margin: 0 auto 3rem;
}

.contact-header h2 {
  margin: 0 0 1rem;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}

.contact-header p {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 1.1rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  margin-top: 0.5rem;
  color: #1777ba;
  font-weight: 700;
  font-size: 0.95rem;
}

.contact-link:hover {
  color: var(--accent);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  gap: 1.25rem;
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: var(--surface-strong);
  box-shadow: 0 16px 48px rgba(31, 41, 64, 0.07);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.contact-form label {
  display: grid;
  gap: 0.5rem;
}

.contact-form span {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(31, 41, 64, 0.6);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(31, 41, 64, 0.1);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  font-size: 1rem;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(42, 166, 248, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(31, 41, 64, 0.3);
}

/* ─── CTA Banner ─── */
.cta-banner {
  background: var(--bg-dark);
  text-align: center;
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.cta-banner h2 {
  margin: 0 auto 2rem;
  max-width: 16ch;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
}

/* ─── Footer ─── */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.65);
  padding: 4rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-shell {
  width: min(calc(100% - 3rem), var(--max-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo-lockup {
  position: relative;
  display: inline-block;
  width: fit-content;
}

.footer-logo {
  width: 120px;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.footer-logo-trademark {
  position: absolute;
  top: 41%;
  left: 76.2%;
  transform: translate(0, -56%);
  font-size: 0.36rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.76);
}

.footer-tagline {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 28ch;
  color: rgba(255, 255, 255, 0.4);
}

.footer-heading {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.footer-nav,
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-nav a,
.footer-contact a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.93rem;
  transition: color 180ms ease;
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: #fff;
}

.footer-bottom {
  width: min(calc(100% - 3rem), var(--max-width));
  margin: 0 auto;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.3);
}

/* ─── Reveal animations ─── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms cubic-bezier(0.2, 1, 0.3, 1),
    transform 700ms cubic-bezier(0.2, 1, 0.3, 1);
}

[data-reveal="left"] {
  transform: translateX(34px);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* ─── Magnetic effect ─── */
.magnetic {
  transform-style: preserve-3d;
  transition: transform 180ms ease;
}

/* ─── Keyframes ─── */
@keyframes word-rise {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ─── Responsive: Tablet (980px) ─── */
@media (max-width: 980px) {
  .diff-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .process-timeline {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 1.5rem;
  }

  .process-line {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: 2px;
    height: 100%;
  }

  .process-step {
    text-align: left;
    display: grid;
    grid-template-columns: 3rem 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem 0;
  }

  .step-number {
    margin: 0;
  }

  .process-step h3 {
    text-align: left;
  }

  .footer-shell {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ─── Responsive: Mobile (720px) ─── */
@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(300px, 85vw);
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 5rem 1.5rem 2rem;
    background: rgba(248, 245, 239, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: -8px 0 40px rgba(31, 41, 64, 0.12);
    transform: translateX(110%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1),
                visibility 350ms step-end;
    z-index: 105;
  }

  .site-nav.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0ms step-start;
  }

  .nav-link {
    padding: 0.9rem 1rem;
    font-size: 1.1rem;
  }

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

  .site-header {
    padding-top: 0.75rem;
  }

  .section-shell {
    width: min(calc(100% - 2rem), var(--max-width));
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-title {
    max-width: none;
  }

  .section {
    padding: clamp(3.5rem, 8vw, 6rem) 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 1rem;
    font-size: 16px;
  }

  .primary-button {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }

  .hero-actions .primary-button {
    min-width: auto;
  }
}

/* ─── Responsive: Small mobile (480px) ─── */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .section-heading h2,
  .about-header h2,
  .contact-header h2,
  .cta-banner h2 {
    font-size: 1.8rem;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .step-number {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.78rem;
  }

  .diff-card {
    padding: 1.5rem 1.5rem 1.5rem 1.8rem;
  }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
