/* ==========================================================================
   Sassteq v2.1 Design System & Stylesheet
   Palette: orange #F26B21, cream #FBF4E8, forest #1F4D2E, ink #1A1A1A, line #E5DAC8
   Fonts: Space Grotesk (headings/body/wordmark) & IBM Plex Mono (labels/panel)
   ========================================================================== */

:root {
  /* Design Tokens */
  --color-orange: #F26B21;
  --color-cream: #FBF4E8;
  --color-cream-deep: #F3E8D3;
  --color-forest: #1F4D2E;
  --color-forest-hover: #173A22;
  --color-ink: #1A1A1A;
  --color-line: #E5DAC8;

  /* Typography */
  --font-main: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Layout */
  --max-width: 1120px;
  --side-padding: 24px;
  --section-gap: 96px;

  /* Motion Transitions */
  --ease-reveal: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-hover: ease-out;
  --dur-hover: 200ms;
}

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

/* No italics anywhere */
em, i, cite {
  font-style: normal;
}

html {
  font-size: 16px;
  background-color: var(--color-cream);
  color: var(--color-ink);
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-main);
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 400;
  color: var(--color-ink);
  background-color: var(--color-cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--side-padding);
  padding-right: var(--side-padding);
}

/* Accessible Focus States */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 3px;
}

.site-footer a:focus-visible {
  outline: 2px solid var(--color-cream);
  outline-offset: 3px;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 24px;
  background: var(--color-forest);
  color: var(--color-cream);
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 9999;
  text-decoration: none;
  border-radius: 4px;
  transition: top 0.2s var(--ease-hover);
}

.skip-link:focus {
  top: 16px;
}

/* ==========================================================================
   Header & Navigation - Cream Background
   ========================================================================== */
.site-header {
  background-color: var(--color-cream);
  border-bottom: 1px solid var(--color-line);
  position: relative;
  z-index: 100;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.site-wordmark {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--color-forest);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.site-nav a {
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 4px;
  transition: color var(--dur-hover) var(--ease-hover);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--color-forest);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ==========================================================================
   Section 1: Hero - Orange Background (#F26B21), Auto Height
   Small text on orange is always ink; forest on orange only at heading sizes.
   ========================================================================== */
.hero-section {
  background-color: var(--color-orange);
  color: var(--color-ink);
  padding-top: 96px;
  padding-bottom: 96px;
  position: relative;
  overflow: hidden;
}

/* SVG Grain Overlay at 3% opacity */
.hero-grain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.03;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Headline: Full width, 3 stacked lines, clamp(3rem, 8vw, 6rem), tracking -0.02em, sentence case */
.hero-title {
  font-family: var(--font-main);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.04;
  font-weight: 700;
  color: var(--color-forest);
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  width: 100%;
}

.hero-title .line-wrap {
  display: block;
  overflow: hidden;
}

.hero-title .line-inner {
  display: block;
  will-change: transform, opacity;
}

/* Subcopy: ~60ch measure, ink color (5.7:1 WCAG AA compliant on orange) */
.hero-subcopy {
  font-family: var(--font-main);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--color-ink);
  max-width: 60ch;
  margin-bottom: 36px;
}

/* Button rule: forest background + cream text */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-forest);
  color: var(--color-cream);
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 1.125rem;
  padding: 14px 36px;
  border-radius: 4px;
  text-decoration: none;
  min-height: 48px;
  border: 1px solid var(--color-forest);
  transition: background-color var(--dur-hover) var(--ease-hover), border-color var(--dur-hover) var(--ease-hover);
  cursor: pointer;
  margin-bottom: 64px;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--color-forest-hover);
  border-color: var(--color-forest-hover);
  color: var(--color-cream);
}

/* Hero 3-Stage Strip (QUESTION > ANSWER > SOURCE) */
.stage-strip-container {
  width: 100%;
  margin-top: 12px;
}

.stage-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-ink);
  word-break: break-word;
}

/* Small mono Replay button */
.btn-replay {
  background: transparent;
  border: 1px solid var(--color-ink);
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color var(--dur-hover) var(--ease-hover), color var(--dur-hover) var(--ease-hover);
}

.btn-replay:hover,
.btn-replay:focus-visible {
  background-color: var(--color-ink);
  color: var(--color-cream);
}

.stage-strip {
  display: grid;
  grid-template-columns: 1fr auto 1.3fr auto 1fr;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.stage-panel {
  background-color: var(--color-cream);
  border: 1px solid var(--color-line);
  border-radius: 6px;
  padding: 24px;
  position: relative;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.stage-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-forest);
  margin-bottom: 12px;
}

.stage-text {
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--color-ink);
}

.stage-panel-answer .stage-text {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Stage 3: Source panel with animated orange stroke */
.stage-panel-source {
  border: 1px solid transparent;
  background-color: var(--color-cream);
  position: relative;
}

.source-svg-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 6px;
  overflow: visible;
}

.source-svg-rect {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--color-orange);
  stroke-width: 2px;
  rx: 6px;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
}

/* Connecting Hand-drawn SVG arrows */
.stage-arrow-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-forest);
}

.stage-arrow-svg {
  width: 38px;
  height: 24px;
  stroke: var(--color-forest);
  fill: none;
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   Section 2: Services - Numbered Rows, Not Cards
   Three full-width rows on cream, 1px dividers, numbered 01 / 02 / 03 in forest mono
   ========================================================================== */
.services-section {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  background-color: var(--color-cream);
}

.section-heading-mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-forest);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-main);
  font-size: 2.25rem;
  line-height: 1.15;
  font-weight: 700;
  color: var(--color-forest);
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}

.services-table {
  border-top: 1px solid var(--color-line);
}

.service-row {
  display: grid;
  grid-template-columns: 80px 280px 1fr 60px;
  align-items: center;
  gap: 24px;
  padding: 36px 16px;
  border-bottom: 1px solid var(--color-line);
  background-color: var(--color-cream);
  transition: background-color var(--dur-hover) var(--ease-hover);
  position: relative;
  will-change: transform, opacity;
}

/* Hover: deeper cream, orange arrow slides in right */
.service-row:hover,
.service-row:focus-within {
  background-color: var(--color-cream-deep);
}

.service-num {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-forest);
}

.service-title-col {
  display: flex;
  align-items: center;
  gap: 12px;
}

.service-icon-svg {
  width: 22px;
  height: 22px;
  stroke: var(--color-forest);
  stroke-width: 2px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
}

.service-name {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--color-forest);
}

.service-desc {
  font-family: var(--font-main);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--color-ink);
}

.service-arrow-col {
  display: flex;
  justify-content: flex-end;
}

.service-hover-arrow {
  width: 24px;
  height: 24px;
  stroke: var(--color-orange);
  stroke-width: 2.5px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity var(--dur-hover) var(--ease-hover), transform var(--dur-hover) var(--ease-hover);
}

.service-row:hover .service-hover-arrow,
.service-row:focus-within .service-hover-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ==========================================================================
   Section 3: About - Two Columns
   Photo left in plain forest-bordered frame, text right at 1.25rem
   ========================================================================== */
.about-section {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  background-color: var(--color-cream);
  border-top: 1px solid var(--color-line);
}

.about-grid {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 64px;
  align-items: center;
}

.about-photo-wrapper {
  position: relative;
  width: 100%;
  max-width: 290px;
  perspective: 900px;
  transform-style: preserve-3d;
  will-change: transform;
}

.about-photo-frame {
  border: 2px solid var(--color-forest);
  padding: 8px;
  background-color: var(--color-cream);
  border-radius: 4px;
  box-shadow: 4px 4px 0px var(--color-forest);
  transition: box-shadow 0.2s ease;
  position: relative;
}

.about-photo-frame:hover {
  box-shadow: 6px 6px 0px var(--color-forest);
}

.about-frame-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-forest);
}

.about-frame-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.about-frame-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-forest);
  animation: pulse-dot 2.2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.about-canvas-box {
  border: 1px solid var(--color-line);
  background-color: #F6BC36;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  line-height: 0;
}

.about-elastic-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 380 / 440;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.about-elastic-canvas:active {
  cursor: grabbing;
}

.about-frame-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink);
  opacity: 0.75;
}

.about-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 380 / 440;
  object-fit: cover;
  display: block;
}

.about-text-content {
  display: flex;
  flex-direction: column;
}

.about-copy {
  font-family: var(--font-main);
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--color-ink);
}

/* ==========================================================================
   Section 4: Contact - Cream Background
   Oversized "Let's talk", email mailto link clamp(1.5rem, 4vw, 2.5rem), underline wipe
   ========================================================================== */
.contact-section {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  background-color: var(--color-cream);
  border-top: 1px solid var(--color-line);
}

.contact-title-oversized {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  color: var(--color-forest);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.contact-intro {
  font-family: var(--font-main);
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--color-ink);
  margin-bottom: 40px;
  max-width: 65ch;
}

.contact-action-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-action-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.contact-action-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-forest);
}

/* Link with Underline Wipe on Hover */
.contact-wipe-link {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.2;
  color: var(--color-ink);
  text-decoration: none;
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
  word-break: break-all;
}

.contact-wipe-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background-color: var(--color-orange);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-hover) var(--ease-hover);
}

.contact-wipe-link:hover::after,
.contact-wipe-link:focus-visible::after {
  transform: scaleX(1);
}

/* ==========================================================================
   Section 5: Footer - Forest Background (#1F4D2E), Cream Text (#FBF4E8)
   "Sassteq" at ~8vw in Space Grotesk 700
   ========================================================================== */
.site-footer {
  background-color: var(--color-forest);
  color: var(--color-cream);
  padding-top: 80px;
  padding-bottom: 64px;
  margin-top: auto;
}

.footer-wordmark-huge {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.95;
  color: var(--color-cream);
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}

.footer-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid rgba(251, 244, 232, 0.2);
  flex-wrap: wrap;
}

.footer-tagline {
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-cream);
}

.footer-links-group {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-link-cream {
  font-family: var(--font-main);
  font-size: 1rem;
  color: var(--color-cream);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity var(--dur-hover) var(--ease-hover);
}

.footer-link-cream:hover,
.footer-link-cream:focus-visible {
  opacity: 0.85;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
  .stage-strip {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stage-arrow-wrap {
    transform: rotate(90deg);
    padding: 8px 0;
  }

  .services-table {
    border-top: 1px solid var(--color-line);
  }

  .service-row {
    grid-template-columns: 60px 1fr auto;
    gap: 16px;
    align-items: flex-start;
  }

  .service-desc {
    grid-column: 2 / 3;
    margin-top: 8px;
  }

  .service-arrow-col {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
    align-self: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .about-photo-wrapper {
    max-width: 260px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .nav-container {
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .site-wordmark {
    font-size: 1.5rem;
  }

  .site-nav {
    gap: 16px;
    width: 100%;
    justify-content: flex-start;
  }

  .hero-section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .service-row {
    grid-template-columns: 44px 1fr;
    padding: 24px 8px;
  }

  .service-arrow-col {
    display: none;
  }

  .btn-primary {
    width: 100%;
  }

  .footer-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

/* ==========================================================================
   prefers-reduced-motion Gate
   When reduced: show final states, hide Replay button
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .btn-replay {
    display: none !important;
  }

  .source-svg-rect {
    stroke-dashoffset: 0 !important;
  }

  .service-icon-svg {
    stroke-dashoffset: 0 !important;
  }
}

/* ==========================================================================
   Section 4: FAQ - Cream Background with Line Dividers
   ========================================================================== */
.faq-section {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  background-color: var(--color-cream);
  border-top: 1px solid var(--color-line);
}

.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-line);
  margin-top: 2.5rem;
}

.faq-item {
  padding-top: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-line);
  transition: background-color 0.2s ease;
}

.faq-item:hover {
  background-color: rgba(229, 218, 200, 0.2);
}

.faq-question {
  font-family: var(--font-main);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-ink);
  margin-bottom: 12px;
}

.faq-answer {
  font-family: var(--font-main);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--color-ink);
  max-width: 75ch;
  opacity: 0.92;
}

.faq-link {
  color: var(--color-forest);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.faq-link:hover {
  color: var(--color-orange);
}
