/* ============================================================
   RIGHTSIZE SOFTWARE — "The Spec Sheet"
   A precision-document design system: cool paper, blueprint ink,
   caliper teal, heritage-amber ticks. Light-first, left-aligned,
   drafting-frame details, mono annotations.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --rs-paper:      #F7F8FA;
  --rs-surface:    #FFFFFF;
  --rs-ink:        #101725;
  --rs-slate:      #5B6472;
  --rs-line:       #E3E7ED;
  --rs-teal:       #0B7A6E;
  --rs-teal-deep:  #085E54;
  --rs-teal-lift:  #38B2A3;
  --rs-amber:      #E8A317;
  --rs-amber-deep: #B57F12;
  --rs-amber-lift: #F2B33D;
  --rs-success:    #2E7D4F;
  --rs-error:      #C0392B;

  /* Dark-section palette */
  --rs-d-bg:      #101725;
  --rs-d-surface: #161F30;
  --rs-d-line:    rgba(237, 240, 245, 0.12);
  --rs-d-text:    #EDF0F5;
  --rs-d-muted:   #98A1B3;

  --font-display: 'Archivo', 'Helvetica Neue', system-ui, sans-serif;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --nav-height: 4.25rem;
  --max-width: 1200px;
  --pad: clamp(1.25rem, 4vw, 3rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.3s;

  --radius: 8px;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  color: var(--rs-ink);
  background-color: var(--rs-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background-color: var(--rs-teal);
  color: #FFFFFF;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); margin-bottom: 1.25rem; }
h3 { font-size: clamp(1.2rem, 1rem + 0.8vw, 1.5rem); letter-spacing: -0.01em; }
h4 { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }

p { max-width: 62ch; }

.section-label {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rs-teal);
  margin-bottom: 1.1rem;
}

.label-no {
  color: var(--rs-amber-deep);
  font-variant-numeric: tabular-nums;
}

.label-no::after {
  content: '';
  display: inline-block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background-color: var(--rs-amber);
  margin-left: 0.65rem;
  vertical-align: 0.22em;
  transform-origin: left center;
}

.section-lead {
  color: var(--rs-slate);
  margin-top: 0.25rem;
}

.figure-caption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rs-slate);
}

/* Section labels reveal their tick on scroll */
.animate-on-scroll .label-no::after {
  transform: scaleX(0);
  transition: transform 0.5s var(--ease-out) 0.3s;
}

.animate-on-scroll.is-visible .label-no::after {
  transform: scaleX(1);
}

/* ---------- Section shell ---------- */
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 8rem) var(--pad);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform var(--duration) var(--ease-out),
              box-shadow var(--duration) var(--ease-out),
              background-color var(--duration) var(--ease-out),
              border-color var(--duration) var(--ease-out),
              color var(--duration) var(--ease-out);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.97); }

.btn-primary {
  background-color: var(--rs-teal);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(11, 122, 110, 0.22);
}

.btn-primary:hover {
  background-color: var(--rs-teal-deep);
  box-shadow: 0 4px 14px rgba(11, 122, 110, 0.28);
}

.btn-ghost {
  border: 1.5px solid var(--rs-ink);
  color: var(--rs-ink);
}

.btn-ghost:hover {
  background-color: var(--rs-ink);
  color: var(--rs-paper);
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2.5px solid var(--rs-amber);
  outline-offset: 3px;
}

/* ============================================================
   NAVIGATION — paper bar, hairline rule
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background-color: rgba(247, 248, 250, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rs-line);
  transition: box-shadow var(--duration) var(--ease-out);
}

.site-nav.scrolled {
  box-shadow: 0 2px 16px rgba(16, 23, 37, 0.06);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-logo { color: var(--rs-ink); z-index: 101; }

.logo-mark {
  flex-shrink: 0;
  display: block;
  width: 1.97rem;
  height: 1.97rem;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.logo-sub {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.62rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--rs-slate);
  width: 88%;
  align-self: center;
  display: flex;
  justify-content: space-between;
}

/* Logo mark assembles on load */
@keyframes mark-bracket-in-l     { from { transform: translateX(-7px); opacity: 0; } }
@keyframes mark-bracket-in-r     { from { transform: translateX(7px); opacity: 0; } }
@keyframes mark-square-outer-in  { from { transform: scale(0.4); opacity: 0; } }
@keyframes mark-square-inner-in  { from { transform: scale(0.3); opacity: 0; } }

.mark-square-outer { transform-box: fill-box; transform-origin: center; }
.mark-square-inner { transform-box: fill-box; transform-origin: center; }

.nav-logo .mark-bracket-l    { animation: mark-bracket-in-l 0.5s var(--ease-out) 0.1s backwards; }
.nav-logo .mark-bracket-r    { animation: mark-bracket-in-r 0.5s var(--ease-out) 0.1s backwards; }
.nav-logo .mark-square-outer { animation: mark-square-outer-in 0.45s var(--ease-out) 0.32s backwards; }
.nav-logo .mark-square-inner { animation: mark-square-inner-in 0.4s var(--ease-out) 0.5s backwards; }

.footer-logo:hover .mark-square-outer { animation: mark-square-outer-in 0.45s var(--ease-out); }
.footer-logo:hover .mark-square-inner { animation: mark-square-inner-in 0.4s var(--ease-out) 0.15s backwards; }

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  z-index: 101;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--rs-ink);
  border-radius: 2px;
  transition: transform var(--duration) var(--ease-out), opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu: paper slide-over */
.nav-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(85vw, 340px);
  height: 100dvh;
  background-color: var(--rs-surface);
  border-left: 1px solid var(--rs-line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5rem;
  padding: 0 2.25rem;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-out);
  z-index: 100;
}

.nav-menu.is-open { transform: translateX(0); }

.nav-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(16, 23, 37, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease-out);
  z-index: 99;
}

.nav-backdrop.is-active { opacity: 1; pointer-events: auto; }

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.nav-links a {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--rs-ink);
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
}

.nav-no {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--rs-amber-deep);
  font-variant-numeric: tabular-nums;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background-color: var(--rs-amber);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease-out);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after { transform: scaleX(1); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  background-color: var(--rs-teal);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius);
  transition: background-color var(--duration) var(--ease-out);
  align-self: flex-start;
}

.nav-cta:hover { background-color: var(--rs-teal-deep); }

@media (min-width: 900px) {
  .nav-toggle { display: none; }

  .nav-menu {
    position: static;
    width: auto;
    height: auto;
    background: none;
    border: none;
    flex-direction: row;
    align-items: center;
    gap: 2.25rem;
    padding: 0;
    transform: none;
    transition: none;
  }

  .nav-links {
    flex-direction: row;
    gap: 1.9rem;
  }

  .nav-links a {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9375rem;
    letter-spacing: 0;
  }

  .nav-cta { align-self: center; padding: 0.6rem 1.25rem; }
}

/* ============================================================
   HERO — the spec sheet cover
   ============================================================ */
.hero {
  padding-top: var(--nav-height);
  background-color: var(--rs-paper);
  background-image:
    linear-gradient(var(--rs-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--rs-line) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  position: relative;
}

/* Fade the grid toward the bottom so the strip sits clean */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(247,248,250,0.2) 0%, rgba(247,248,250,0.92) 78%, var(--rs-paper) 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad) clamp(3rem, 7vw, 5.5rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rs-slate);
  margin-bottom: 1.75rem;
}

.hero-headline {
  font-size: clamp(3rem, 2rem + 6.5vw, 6.25rem);
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin-bottom: 1.5rem;
}

.hero-headline em {
  font-style: normal;
  color: var(--rs-teal);
}

/* Dimension line — measured, like a drawing annotation */
.hero-dim {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 420px;
  margin-bottom: 1.75rem;
}

.dim-cap {
  width: 2px;
  height: 14px;
  background-color: var(--rs-amber);
  border-radius: 1px;
  flex-shrink: 0;
}

.dim-line {
  flex: 1;
  height: 1.5px;
  background-color: var(--rs-amber);
  opacity: 0.55;
}

.dim-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rs-amber-deep);
  white-space: nowrap;
}

.hero-sub {
  color: var(--rs-slate);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  max-width: 54ch;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.75rem;
}

.hero-pricing {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
}

.hero-pricing-amount {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rs-teal);
}

.hero-pricing-detail {
  font-size: 0.875rem;
  color: var(--rs-slate);
}

/* Hero figure: the mark in a drafting frame */
.hero-figure { display: none; }

@media (min-width: 960px) {
  .hero-figure {
    display: flex;
    justify-content: center;
  }

  .figure-frame {
    position: relative;
    width: min(100%, 360px);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--rs-line);
    border-radius: 12px;
  }

  .figure-mark {
    width: 58%;
    height: auto;
    color: var(--rs-ink);
  }

  .figure-frame .figure-caption {
    position: absolute;
    bottom: 1.1rem;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
  }

  /* Figure mark assembles slightly after the nav logo */
  .figure-mark .mark-bracket-l    { animation: mark-bracket-in-l 0.6s var(--ease-out) 0.45s backwards; }
  .figure-mark .mark-bracket-r    { animation: mark-bracket-in-r 0.6s var(--ease-out) 0.45s backwards; }
  .figure-mark .mark-square-outer { animation: mark-square-outer-in 0.5s var(--ease-out) 0.7s backwards; }
  .figure-mark .mark-square-inner { animation: mark-square-inner-in 0.45s var(--ease-out) 0.9s backwards; }
}

.frame-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--rs-amber);
  border-style: solid;
  border-width: 0;
}

.c-tl { top: -1px; left: -1px; border-top-width: 2.5px; border-left-width: 2.5px; border-top-left-radius: 4px; }
.c-tr { top: -1px; right: -1px; border-top-width: 2.5px; border-right-width: 2.5px; border-top-right-radius: 4px; }
.c-bl { bottom: -1px; left: -1px; border-bottom-width: 2.5px; border-left-width: 2.5px; border-bottom-left-radius: 4px; }
.c-br { bottom: -1px; right: -1px; border-bottom-width: 2.5px; border-right-width: 2.5px; border-bottom-right-radius: 4px; }

/* Hero entrance choreography */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.hero-eyebrow  { animation: rise 0.6s var(--ease-out) 0.1s backwards; }
.hero-headline { animation: rise 0.65s var(--ease-out) 0.2s backwards; }
.hero-dim      { animation: rise 0.6s var(--ease-out) 0.32s backwards; }
.hero-sub      { animation: rise 0.6s var(--ease-out) 0.42s backwards; }
.hero-actions  { animation: rise 0.6s var(--ease-out) 0.52s backwards; }
.hero-pricing  { animation: rise 0.6s var(--ease-out) 0.62s backwards; }
.hero-figure   { animation: rise 0.7s var(--ease-out) 0.35s backwards; }

/* Capability strip */
.hero-strip {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--rs-line);
  border-bottom: 1px solid var(--rs-line);
  background-color: var(--rs-surface);
}

.hero-strip span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rs-slate);
}

.hero-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 2.75rem;
  row-gap: 0.6rem;
  padding: 1rem var(--pad);
}

.hero-strip span { position: relative; }

.hero-strip span:not(:last-child)::after {
  content: '·';
  position: absolute;
  right: -1.55rem;
  color: var(--rs-amber);
}

/* ============================================================
   PROBLEM / SOLUTION — ink section
   ============================================================ */
.ps {
  background-color: var(--rs-d-bg);
  color: var(--rs-d-text);
}

.ps .section-label { color: var(--rs-teal-lift); }
.ps .label-no { color: var(--rs-amber-lift); }
.ps .label-no::after { background-color: var(--rs-amber-lift); }

.ps-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 860px) {
  .ps-layout {
    grid-template-columns: 1fr 1fr;
    gap: clamp(3rem, 6vw, 5.5rem);
  }

  .ps-col:last-child {
    border-left: 1px solid var(--rs-d-line);
    padding-left: clamp(3rem, 6vw, 5.5rem);
  }
}

.ps-col h2 { color: var(--rs-d-text); }
.ps-col p { color: var(--rs-d-muted); margin-bottom: 1rem; }

.ps-emphasis {
  color: var(--rs-d-text) !important;
  font-weight: 600;
  border-left: 3px solid var(--rs-amber);
  padding-left: 1rem;
  margin-top: 1.5rem;
}

/* ============================================================
   SERVICES — the spec list
   ============================================================ */
.services { background-color: var(--rs-paper); }

.services-head { max-width: 640px; margin-bottom: 3.5rem; }

.spec-list {
  counter-reset: spec;
  border-top: 1px solid var(--rs-line);
}

.spec-row {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1.5rem;
  row-gap: 0.35rem;
  padding: 1.75rem 0.75rem 1.75rem 0.5rem;
  border-bottom: 1px solid var(--rs-line);
  position: relative;
  transition: background-color var(--duration) var(--ease-out);
}

.spec-row:hover { background-color: var(--rs-surface); }

/* Amber tick slides in on hover, drafting-style */
.spec-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 42%;
  transform: translateY(-50%) scaleY(0);
  transform-origin: center;
  background-color: var(--rs-amber);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out);
}

.spec-row:hover::before { transform: translateY(-50%) scaleY(1); }

.spec-no {
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--rs-amber-deep);
  padding-top: 0.45rem;
  font-variant-numeric: tabular-nums;
}

.spec-row h3 { transition: color var(--duration) var(--ease-out); }
.spec-row:hover h3 { color: var(--rs-teal); }

.spec-row p {
  grid-column: 2;
  color: var(--rs-slate);
  font-size: 0.9375rem;
  max-width: 58ch;
}

@media (min-width: 860px) {
  .spec-row {
    grid-template-columns: 4rem minmax(0, 15rem) 1fr;
    align-items: baseline;
  }

  .spec-no { grid-row: auto; padding-top: 0; }
  .spec-row p { grid-column: 3; }
}

/* ============================================================
   USE CASES — index grid
   ============================================================ */
.use-cases {
  background-color: var(--rs-surface);
  border-top: 1px solid var(--rs-line);
  border-bottom: 1px solid var(--rs-line);
}

.use-cases-head { max-width: 640px; margin-bottom: 3rem; }

.index-grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: clamp(2rem, 4vw, 3.5rem);
}

@media (min-width: 640px)  { .index-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .index-grid { grid-template-columns: repeat(4, 1fr); } }

.index-item {
  border-top: 1px solid var(--rs-line);
  padding: 1.4rem 0 1.9rem;
}

.index-no {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--rs-amber-deep);
  border: 1px solid var(--rs-line);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  margin-bottom: 0.9rem;
  transition: border-color var(--duration) var(--ease-out),
              color var(--duration) var(--ease-out);
}

.index-item:hover .index-no {
  border-color: var(--rs-teal);
  color: var(--rs-teal);
}

.index-item h4 { margin-bottom: 0.4rem; }

.index-item p {
  color: var(--rs-slate);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Staggered reveal inside the grid */
.index-grid .index-item {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}

.index-grid.is-visible .index-item {
  opacity: 1;
  transform: translateY(0);
}

.index-grid.is-visible .index-item:nth-child(2) { transition-delay: 0.05s; }
.index-grid.is-visible .index-item:nth-child(3) { transition-delay: 0.10s; }
.index-grid.is-visible .index-item:nth-child(4) { transition-delay: 0.15s; }
.index-grid.is-visible .index-item:nth-child(5) { transition-delay: 0.20s; }
.index-grid.is-visible .index-item:nth-child(6) { transition-delay: 0.25s; }
.index-grid.is-visible .index-item:nth-child(7) { transition-delay: 0.30s; }
.index-grid.is-visible .index-item:nth-child(8) { transition-delay: 0.35s; }

/* ============================================================
   PRICING — ink section with a paper work order
   ============================================================ */
.pricing {
  background-color: var(--rs-d-bg);
  color: var(--rs-d-text);
}

.pricing .section-label { color: var(--rs-teal-lift); }
.pricing .label-no { color: var(--rs-amber-lift); }
.pricing .label-no::after { background-color: var(--rs-amber-lift); }

.pricing-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 900px) {
  .pricing-layout {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(3rem, 6vw, 5.5rem);
  }
}

.pricing-text h2 { color: var(--rs-d-text); }
.pricing-text p { color: var(--rs-d-muted); margin-bottom: 1rem; }
.price-highlight { color: var(--rs-teal-lift); }

/* The work order card */
.work-order {
  position: relative;
  background-color: var(--rs-paper);
  color: var(--rs-ink);
  border-radius: 12px;
  padding: 2rem 2rem 2.25rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.wo-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rs-slate);
  border-bottom: 1px dashed var(--rs-line);
  padding-bottom: 0.9rem;
  margin-bottom: 1.4rem;
}

.wo-head span:last-child { color: var(--rs-amber-deep); }

.work-order h3 { margin-bottom: 0.7rem; }

.work-order > p {
  color: var(--rs-slate);
  font-size: 0.9375rem;
  margin-bottom: 1.4rem;
}

.wo-spec {
  border-top: 1px solid var(--rs-line);
  margin-bottom: 1.75rem;
}

.wo-spec div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rs-line);
}

.wo-spec dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rs-slate);
}

.wo-spec dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.work-order .btn { width: 100%; }

/* ============================================================
   MEET THE FOUNDER
   ============================================================ */
.meet { background-color: var(--rs-paper); }

.meet-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .meet-layout {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(3rem, 6vw, 5rem);
  }
}

.meet-photo {
  position: relative;
  max-width: 420px;
  padding: 0.9rem;
  background-color: var(--rs-surface);
  border: 1px solid var(--rs-line);
  border-radius: 12px;
}

.meet-photo img {
  border-radius: 6px;
  width: 100%;
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
}

.meet-photo .figure-caption {
  display: block;
  text-align: center;
  padding-top: 0.75rem;
}

.meet-text p { color: var(--rs-slate); margin-bottom: 1rem; }
.meet-text .btn { margin-top: 0.75rem; }

/* ============================================================
   ABOUT + TESTIMONIAL
   ============================================================ */
.about {
  background-color: var(--rs-surface);
  border-top: 1px solid var(--rs-line);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 900px) {
  .about-layout {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(3rem, 6vw, 5.5rem);
  }
}

.about-story p { color: var(--rs-slate); margin-bottom: 1rem; }

.about-quote .section-label { color: var(--rs-amber-deep); }
.about-quote .label-no { color: var(--rs-teal); }
.about-quote .label-no::after { background-color: var(--rs-teal); }

.testimonial {
  border-left: 3px solid var(--rs-amber);
  padding-left: 1.4rem;
}

.testimonial p {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--rs-ink);
  margin-bottom: 1rem;
}

.testimonial cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rs-slate);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background-color: var(--rs-paper); }

.contact-head { max-width: 640px; margin-bottom: 3rem; }

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 960px) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
    gap: clamp(2.5rem, 5vw, 4.5rem);
  }
}

.contact-form-wrap h3,
.contact-cal-wrap h3 { margin-bottom: 0.4rem; }

.form-description,
.cal-description {
  color: var(--rs-slate);
  font-size: 0.9375rem;
  margin-bottom: 1.75rem;
}

.contact-form { max-width: 520px; }

.form-group { margin-bottom: 1.4rem; }

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rs-slate);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--rs-ink);
  background-color: var(--rs-surface);
  border: 1px solid var(--rs-line);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  transition: border-color var(--duration) var(--ease-out),
              box-shadow var(--duration) var(--ease-out);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #A7AEBB; }

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--rs-teal);
  box-shadow: 0 0 0 3.5px rgba(11, 122, 110, 0.13);
}

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

/* Form status */
@keyframes status-rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes status-shake {
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}
@keyframes btn-pulse { 50% { opacity: 0.65; } }

.form-status {
  margin-top: 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.form-status.success {
  color: var(--rs-success);
  animation: status-rise 0.4s var(--ease-out);
}

.form-status.error {
  color: var(--rs-error);
  animation: status-rise 0.4s var(--ease-out),
             status-shake 0.45s var(--ease-out) 0.15s;
}

.btn-submit.is-loading {
  pointer-events: none;
  animation: btn-pulse 1.1s ease-in-out infinite;
}

/* Calendly card */
.contact-cal-wrap .calendly-inline-widget {
  border: 1px solid var(--rs-line);
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--rs-surface);
}

/* ============================================================
   FOOTER — ink
   ============================================================ */
.site-footer {
  background-color: var(--rs-d-bg);
  color: var(--rs-d-text);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem var(--pad) 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
    align-items: start;
  }

  .footer-legal { grid-column: 1 / -1; }
}

.footer-logo { color: var(--rs-d-text); }
.footer-logo .logo-sub { color: var(--rs-d-muted); }

.footer-tagline {
  color: var(--rs-d-muted);
  font-size: 0.875rem;
  margin-top: 0.9rem;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav a {
  color: var(--rs-d-muted);
  font-size: 0.875rem;
  transition: color var(--duration) var(--ease-out);
}

.footer-nav a:hover { color: var(--rs-d-text); }

.footer-contact a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--rs-teal-lift);
  transition: color var(--duration) var(--ease-out);
}

.footer-contact a:hover { color: var(--rs-d-text); }

.footer-legal {
  border-top: 1px solid var(--rs-d-line);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.footer-legal p {
  color: var(--rs-d-muted);
  opacity: 0.7;
  font-size: 0.8125rem;
}

.footer-fig {
  font-family: var(--font-mono);
  font-size: 0.68rem !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================
   SCROLL REVEALS
   ============================================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger the service spec rows */
.spec-list .animate-on-scroll:nth-child(2) { transition-delay: 0.07s; }
.spec-list .animate-on-scroll:nth-child(3) { transition-delay: 0.14s; }
.spec-list .animate-on-scroll:nth-child(4) { transition-delay: 0.21s; }
.spec-list .animate-on-scroll:nth-child(5) { transition-delay: 0.28s; }
.spec-list .animate-on-scroll:nth-child(6) { transition-delay: 0.35s; }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .animate-on-scroll,
  .index-grid .index-item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .animate-on-scroll .label-no::after { transform: scaleX(1); transition: none; }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
  }
}
