/*
  finch website design system
  - Strict palette from prompt
  - Shared layout for Home, Product, About
  - Accessible, responsive, and lightweight
*/
:root {
  --dark-navy: #24364C;
  --light-gray: #D4D4D4;
  --red: #D43C33;
  --orange: #E09643;
  --text-dark: #24364C;
  --text-light: #F6F7F9;
  --white: #FFFFFF;
  --bg-main: #F8F9FA;
  --bg-surface: #FFFFFF;
  --bg-soft: #F3F4F6;
  --text-main: var(--text-dark);
  --text-muted: #333333;
  --card-bg: #FFFFFF;
  --card-border: rgba(36, 54, 76, 0.14);
  --header-bg: rgba(255, 255, 255, 0.95);
  --header-border: rgba(36, 54, 76, 0.12);
  --nav-link: rgba(36, 54, 76, 0.86);
  --input-bg: #FFFFFF;
  --input-border: rgba(36, 54, 76, 0.22);
  --footer-bg: var(--dark-navy);
  --footer-text: var(--text-light);
  --hero-overlay-start: rgba(238, 238, 238, 0.9);
  --hero-overlay-end: rgba(220, 220, 220, 0.9);
  --hero-doodle-image: url("doodle/doodle.png");
  --faq-bg: #FAFAFA;
  --faq-bg-open: #F2F2F2;
  --value-circle-bg: linear-gradient(170deg, #f8f8f8 0%, #dfdfdf 100%);
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --container: min(1120px, 92vw);
  --shadow-soft: 0 10px 28px rgba(36, 54, 76, 0.12);
  --header-height: 78px;
}

html[data-theme="dark"] {
  --bg-main: #121B26;
  --bg-surface: #1B2838;
  --bg-soft: #1E2F43;
  --text-main: #D4D4D4;
  --text-muted: #C3CCD7;
  --card-bg: #24364C;
  --card-border: rgba(212, 212, 212, 0.2);
  --header-bg: rgba(18, 27, 38, 0.95);
  --header-border: rgba(212, 212, 212, 0.2);
  --nav-link: #D4D4D4;
  --input-bg: #1E2F43;
  --input-border: rgba(212, 212, 212, 0.35);
  --footer-bg: #0D141D;
  --footer-text: #F6F7F9;
  --hero-overlay-start: rgba(18, 27, 38, 0.88);
  --hero-overlay-end: rgba(36, 54, 76, 0.9);
  --hero-doodle-image: url("doodle/doodle_dark_mode.png");
  --faq-bg: #25384D;
  --faq-bg-open: #2C425A;
  --value-circle-bg: linear-gradient(170deg, #223347 0%, #1A2A3B 100%);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text-main);
  background: var(--bg-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 2000;
  background: var(--dark-navy);
  color: var(--text-light);
  padding: 10px 14px;
  border-radius: 8px;
}

.skip-link:focus {
  left: 12px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1100;
  border-bottom: 1px solid var(--header-border);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
}

.header-inner {
  width: var(--container);
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.brand-name {
  font-size: 1.12rem;
  color: var(--text-main);
}

.nav-toggle {
  display: none;
  justify-self: center;
  border: 1px solid var(--card-border);
  background: var(--bg-surface);
  color: var(--text-main);
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.site-nav {
  justify-self: center;
}

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

.site-nav a {
  text-decoration: none;
  color: var(--nav-link);
  font-weight: 600;
}

.site-nav a[aria-current="page"] {
  color: var(--orange);
}

.header-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.page-main {
  padding-top: calc(var(--header-height) + 12px);
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.section {
  padding: 72px 0;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 800;
  font-size: 0.74rem;
  color: var(--orange);
}

h1,
h2,
h3 {
  margin: 0 0 12px;
  line-height: 1.16;
  color: var(--text-main);
}

h1 {
  font-size: clamp(2rem, 4.7vw, 3.5rem);
}

h2 {
  font-size: clamp(1.45rem, 3.1vw, 2.2rem);
}

h3 {
  font-size: 1.18rem;
}

p {
  margin: 0 0 12px;
  color: var(--text-muted);
}

.btn {
  border: 0;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  padding: 12px 20px;
  font: inherit;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(224, 150, 67, 0.35);
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #cc8638;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: #f6f6f6;
}

html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .btn-secondary:focus-visible {
  background: #2A3F56;
}

.hero {
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(170deg, var(--hero-overlay-start) 0%, var(--hero-overlay-end) 100%),
    var(--hero-doodle-image);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--bg-surface);
  color: var(--text-main);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  background: var(--bg-soft);
}

.theme-toggle-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
}

.theme-toggle-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Decorative circles used in CTA and premium sections */
.cta-orb {
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 790px;
  margin: 0 auto;
  text-align: center;
  padding: 94px 0 84px;
  animation: rise-in 0.68s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.section-doodles {
  position: relative;
  isolation: isolate;
}

.section-doodles .container {
  position: relative;
  z-index: 1;
}

.doodle {
  position: absolute;
  width: min(8vw, 110px);
  max-width: 120px;
  height: auto;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  opacity: 0.2;
  filter: invert(1);
  mix-blend-mode: multiply;
}

html[data-theme="dark"] .doodle {
  filter: none;
  mix-blend-mode: screen;
}

.doodle-mail-1 {
  width: min(9.2vw, 116px);
  top: 12%;
  left: -1%;
  transform: rotate(-10deg) scale(1);
}

.doodle-note-1 {
  width: min(8vw, 100px);
  top: 34%;
  right: -2%;
  transform: rotate(8deg) scale(0.98);
}

.doodle-bulb-1 {
  width: min(8.6vw, 108px);
  top: 70%;
  left: 2%;
  transform: rotate(-16deg) scale(1.02);
}

.doodle-people-1 {
  width: min(10.2vw, 126px);
  top: 14%;
  right: 2%;
  transform: rotate(9deg) scale(1);
}

.doodle-pencil-1 {
  width: min(9vw, 112px);
  top: 54%;
  left: -2%;
  transform: rotate(-24deg) scale(0.95);
}

.doodle-note-2 {
  width: min(8.8vw, 104px);
  bottom: 10%;
  right: 4%;
  transform: rotate(15deg) scale(1.08);
}

.doodle-chart-1 {
  width: min(9.4vw, 118px);
  top: 18%;
  right: -2%;
  transform: rotate(14deg) scale(1);
}

.doodle-book-1 {
  width: min(9.6vw, 120px);
  top: 48%;
  left: 1%;
  transform: rotate(-8deg) scale(1.02);
}

.doodle-pencil-2 {
  width: min(9.6vw, 120px);
  top: 73%;
  right: 3%;
  transform: rotate(-31deg) scale(1.15);
}

.doodle-bulb-2 {
  width: min(8.2vw, 102px);
  top: 30%;
  left: 4%;
  transform: rotate(-12deg) scale(0.9);
}

.doodle-buble-1 {
  width: min(9.8vw, 120px);
  top: 22%;
  left: -1%;
  transform: rotate(18deg) scale(1.05);
}

.doodle-tea-cup-1 {
  width: min(10.4vw, 120px);
  top: 62%;
  right: -1%;
  transform: rotate(-14deg) scale(1.06);
}

.doodle-chart-2 {
  width: min(8.6vw, 106px);
  top: 46%;
  left: 2%;
  transform: rotate(8deg) scale(0.92);
}

.doodle-mail-2 {
  width: min(9vw, 110px);
  top: 24%;
  right: 6%;
  transform: rotate(-14deg) scale(1.12);
}

.interlock-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
}

.panel {
  border-radius: var(--radius-md);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  padding: 24px;
}

.interlock-arrow {
  width: clamp(112px, 14vw, 210px);
  height: auto;
  object-fit: contain;
  justify-self: center;
  animation: arrow-loop 2.1s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

.steps {
  max-width: 940px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.section-steps-with-tea .container {
  position: relative;
}

.steps,
.footer-grid {
  position: relative;
  z-index: 2;
}

.step-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: start;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: var(--white);
  font-weight: 800;
  font-size: 1.06rem;
}

.feature-stack {
  display: grid;
  gap: 16px;
}

.section-features-doodle {
  isolation: isolate;
}

.feature-block {
  display: grid;
  grid-template-columns: 1.22fr 1fr;
  gap: 16px;
  align-items: center;
}

.feature-block:nth-child(even) {
  grid-template-columns: 1fr 1.22fr;
}

.feature-block:nth-child(even) .feature-copy {
  order: 2;
}

.feature-visual {
  min-height: 220px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--card-border);
  background: linear-gradient(160deg, var(--bg-soft), var(--bg-surface));
  color: var(--text-muted);
  font-weight: 800;
  display: grid;
  place-items: center;
}

.feature-visual-image {
  overflow: hidden;
  padding: 0;
  border-radius: 48px;
}

.feature-visual-image img {
  width: 99.6%;
  height: 99.5%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.feature-visual-autofill {
  min-height: 190px;
}

.premium {
  background: var(--dark-navy);
  color: var(--text-light);
}

.premium p,
.premium h2 {
  color: var(--text-light);
}

.premium-label {
  color: var(--orange);
}

.premium-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: center;
}

.premium-orb {
  width: min(300px, 70vw);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  animation: crown-bob 2.6s cubic-bezier(0.42, 0, 0.58, 1) infinite;
}

.form-card {
  margin-top: 20px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.inline-form,
.newsletter-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 10px;
}

.inline-form input,
.inline-form button,
.newsletter-form input,
.newsletter-form button {
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
}

.inline-form input,
.newsletter-form input {
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-main);
}

.inline-form button,
.newsletter-form button {
  border: 0;
  font-weight: 700;
  background: var(--orange);
  color: var(--white);
  cursor: pointer;
}

.inline-form button:hover,
.newsletter-form button:hover {
  background: #cc8638;
}

.status-message,
.footer-status {
  min-height: 1.25rem;
  margin-top: 8px;
  font-size: 0.92rem;
}

.status-message {
  color: #d9f5d3;
}

.final-cta {
  text-align: center;
}

.cta-orb {
  display: block;
  width: min(240px, 58vw);
  height: auto;
  margin: 0 auto 16px;
  border: none;
  border-radius: 0;
  background: none;
  animation: chart-float 2.3s cubic-bezier(0.42, 0, 0.58, 1) infinite;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.feature-card,
.feature-illustration {
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  padding: 20px;
}

.feature-illustration {
  min-height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--text-muted);
  font-weight: 800;
  background: linear-gradient(160deg, var(--bg-soft), var(--bg-surface));
}

.feature-illustration img {
  width: 114%;
  height: clamp(230px, 34vw, 320px);
  object-fit: cover;
  object-position: center;
  border-radius: 32px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  display: block;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
}

.faq-question {
  width: 100%;
  border: 0;
  text-align: left;
  font: inherit;
  font-weight: 700;
  background: var(--faq-bg);
  color: var(--text-main);
  padding: 14px 16px;
  cursor: pointer;
}

.faq-question[aria-expanded="true"] {
  background: var(--faq-bg-open);
}

.faq-answer {
  padding: 0 16px 14px;
}

.dual-circles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.value-circle {
  border-radius: 12px;
  background: var(--value-circle-bg);
  border: 1px solid var(--card-border);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  aspect-ratio: 1.6 / 1;
}

.icon-placeholder {
  width: 64px;
  height: 64px;
  border: 2px solid rgba(36, 54, 76, 0.3);
  border-radius: 8px;
  background: rgba(224, 150, 67, 0.08);
  flex-shrink: 0;
}

.value-circle img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
}

.story-line {
  border: 0;
  height: 3px;
  width: min(560px, 100%);
  margin: 18px 0;
  background: linear-gradient(90deg, var(--orange), var(--red), transparent 94%);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.team-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
  text-align: center;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.team-card h3 {
  margin: 0 0 4px;
  font-weight: 800;
  color: var(--text-main);
}

.avatar {
  width: 110px;
  height: 110px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  border: 2px solid var(--card-border);
}

.team-title {
  color: var(--orange);
  font-weight: 700;
  margin: 0 0 8px;
}

.team-bio {
  font-size: 0.9rem;
  margin: 0 0 12px;
  flex-grow: 1;
}

.team-email {
  display: inline-block;
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.team-email:hover,
.team-email:focus-visible {
  color: #cc8638;
  text-decoration: underline;
}

.site-footer {
  position: relative;
  margin-top: 60px;
  padding: 42px 0 34px;
  background: var(--footer-bg);
  color: var(--footer-text);
}

.footer-grid {
  width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
}

.site-footer h2 {
  color: var(--footer-text);
}

.footer-heading-with-doodle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-mail-doodle {
  width: clamp(42px, 4.2vw, 64px);
  height: auto;
  opacity: 1;
  filter: invert(1) brightness(2.15) contrast(1.2);
  pointer-events: none;
  user-select: none;
}

.site-footer .muted {
  color: rgba(246, 247, 249, 0.84);
}

.footer-status {
  color: #bde8ae;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.social-links a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(246, 247, 249, 0.35);
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  color: var(--text-light);
}

.social-links svg {
  width: 16px;
  height: 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.98);
  }

  70% {
    opacity: 1;
    transform: translateY(-4px) scale(1.01);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes arrow-loop {
  0%,
  100% {
    transform: translateX(0) translateY(0) rotate(0deg) scale(1);
  }

  25% {
    transform: translateX(8px) translateY(-5px) rotate(4deg) scale(1.05);
  }

  50% {
    transform: translateX(14px) translateY(0) rotate(0deg) scale(1.08);
  }

  75% {
    transform: translateX(8px) translateY(5px) rotate(-4deg) scale(1.05);
  }
}

@keyframes crown-bob {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  35% {
    transform: translateY(-12px) rotate(-2deg) scale(1.04);
  }

  60% {
    transform: translateY(-5px) rotate(1deg) scale(1.02);
  }
}

@keyframes chart-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  30% {
    transform: translateY(-10px) scale(1.04) rotate(-1.2deg);
  }

  60% {
    transform: translateY(-4px) scale(1.02) rotate(0.8deg);
  }
}

@keyframes chart-doodle-drift {
  0%,
  100% {
    transform: rotate(14deg) scale(1) translateY(0);
  }

  30% {
    transform: rotate(20deg) scale(1.07) translateY(-8px);
  }

  65% {
    transform: rotate(16deg) scale(1.03) translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .interlock-arrow,
  .premium-orb,
  .cta-orb,
  .doodle-chart-1 {
    animation: none;
  }
}

@media (max-width: 960px) {
  .header-inner {
    grid-template-columns: 1fr auto auto;
  }

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

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--header-border);
    display: none;
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    padding: 14px 4vw 18px;
    justify-content: center;
  }

  .header-cta {
    justify-self: center;
  }

  .interlock-grid,
  .feature-block,
  .feature-block:nth-child(even),
  .premium-grid,
  .feature-grid,
  .dual-circles,
  .team-grid,
  .footer-grid,
  .inline-form,
  .newsletter-form {
    grid-template-columns: 1fr;
  }

  .feature-block:nth-child(even) .feature-copy {
    order: 0;
  }

  .value-circle {
    aspect-ratio: auto;
    min-height: 320px;
  }

  .step-item {
    grid-template-columns: 48px 1fr;
    gap: 10px;
  }

  .step-number {
    width: 48px;
    height: 48px;
    font-size: 0.96rem;
  }

  .doodle {
    opacity: 0.16;
    width: min(15vw, 96px);
  }

  .doodle-mail-1 {
    top: 9%;
    left: -1%;
  }

  .doodle-note-1 {
    top: 31%;
    right: -2%;
    left: auto;
  }

  .doodle-bulb-1 {
    top: 74%;
    left: 2%;
    right: auto;
  }

  .doodle-people-1 {
    top: 7%;
    right: 2%;
  }

  .doodle-pencil-1 {
    top: 57%;
    left: -2%;
  }

  .doodle-note-2 {
    bottom: 10%;
    right: 2%;
    left: auto;
  }

  .doodle-chart-1 {
    top: 13%;
    right: -2%;
  }

  .doodle-book-1 {
    top: 52%;
    left: 1%;
  }

  .doodle-pencil-2 {
    top: 79%;
    right: 3%;
  }

  .doodle-bulb-2 {
    top: 36%;
    left: 3%;
  }

  .doodle-buble-1 {
    top: 17%;
    left: -1%;
  }

  .doodle-tea-cup-1 {
    top: 67%;
    right: -1%;
  }

  .doodle-chart-2 {
    top: 49%;
    left: 2%;
  }

  .doodle-mail-2 {
    top: 20%;
    right: 3%;
  }
}
