/* ============================================================
   Anchor — hero recreation
   ============================================================ */

:root {
  --bg: #f6f4ee;
  --ink: #131313;
  --ink-soft: #2e2c28;
  --muted: #6f6c66;

  --orange: #e87a45;
  --orange-hover: #dd6c35;
  --orange-ink: #3b1c09;

  --dark: #131313;
  --dark-hover: #2b2b2b;

  --panel-radius: 22px;
  --card-radius: 10px;

  --header-h: 96px;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: rgba(232, 122, 69, 0.35); }

img, svg { display: block; }

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

.container {
  width: 100%;
  max-width: 1960px;
  margin-inline: auto;
  padding-inline: clamp(20px, 2.8vw, 56px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1;
  padding: 16px 24px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.22s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
  will-change: transform;
}

.btn:active { transform: scale(0.97); }

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.btn-dark {
  background: var(--dark);
  color: #fff;
}
.btn-dark:hover {
  background: var(--dark-hover);
  transform: translateY(-1px);
}

.btn-orange {
  background: var(--orange);
  color: #fff;
  padding: 17px 26px;
}
.btn-orange:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(221, 108, 53, 0.55);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  padding: 16px 22px;
  border: 1.5px solid rgba(19, 19, 19, 0.18);
}
.btn-secondary:hover {
  border-color: var(--ink);
  background: rgba(19, 19, 19, 0.04);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 13px 16px;
  font-weight: 500;
}
.btn-ghost:hover {
  background: rgba(19, 19, 19, 0.06);
}

/* ------------------------------------------------------------
   Top ribbon
   ------------------------------------------------------------ */

.top-ribbon {
  background: var(--orange);
  color: #fff;
  padding: 12px 20px;
  position: relative;
  z-index: 25;
}

.ribbon-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 40px;
}

.ribbon-list li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: #fff;
  letter-spacing: 0.005em;
}

.ribbon-star {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .ribbon-list { gap: 6px 24px; }
  .ribbon-list li { font-size: 13px; }
  .top-ribbon { padding: 10px 16px; }
}

@media (max-width: 640px) {
  .ribbon-list li:nth-child(3) { display: none; }
}

@media (max-width: 480px) {
  .ribbon-list li:nth-child(2) { display: none; }
  .ribbon-list li { font-size: 12.5px; gap: 8px; }
  .top-ribbon { padding: 9px 14px; }
}

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

.site-header {
  position: relative;
  z-index: 20;
  background: var(--bg);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
}

.brand-logo {
  width: 140px;
  height: auto;
  display: block;
}

.main-nav { margin-inline: auto; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  padding-block: 6px;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.65, 0, 0.35, 1);
}

.nav-link:hover::after { transform: scaleX(1); }

.caret {
  width: 11px;
  height: 7px;
  margin-top: 2px;
  transition: transform 0.25s ease;
}

.nav-link:hover .caret { transform: translateY(2px); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

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

.hero { padding-block: 48px 56px; }

/* Hero: 80px left margin, panel flush to the right viewport edge. */
.hero .container {
  padding-left: clamp(20px, 5.6vw, 80px);
  padding-right: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  align-items: center;
  gap: clamp(36px, 4vw, 88px);
}

.hero-content {
  padding-block: 48px;
  max-width: 720px;
}

.hero-title {
  font-family: var(--font);
  font-size: clamp(40px, 4.4vw, 60px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 9.6em;
  margin-bottom: 34px;
}

.hero-copy {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 40px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-fineprint {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* ------------------------------------------------------------
   Hero visual panel
   ------------------------------------------------------------ */

.hero-visual { min-width: 0; }

.hero-panel {
  position: relative;
  height: clamp(480px, calc(100vh - var(--header-h) - 120px), 840px);
  border-radius: 8px 0 0 8px;
  overflow: hidden;
  background:
    radial-gradient(100% 85% at 12% 100%, #f4b389 0%, rgba(244, 179, 137, 0) 65%),
    radial-gradient(90% 70% at 90% 0%, #f4b389 0%, rgba(244, 179, 137, 0) 60%),
    #e87a45;
  isolation: isolate;
}

/* Film grain on the gradient — two layered SVG noise passes for depth */
.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Fine grain — main noise texture */
.hero-panel::before {
  z-index: 1;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Softer coarse grain — adds tonal warmth */
.hero-panel::after {
  z-index: 1;
  opacity: 0.15;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------
   Scenes — stacked artwork variants inside the panel
   ------------------------------------------------------------ */

.scene {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px;
}

.scene-2 {
  opacity: 0;
  visibility: hidden;
}

/* ------------------------------------------------------------
   Chat card (main artwork)
   ------------------------------------------------------------ */

.chat-card {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: min(48%, 380px);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 30px 60px -20px rgba(80, 32, 12, 0.18),
    0 8px 20px -10px rgba(80, 32, 12, 0.12);
}

.chat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 18px;
  background: #fff;
}

.chat-card-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #131313;
}

.chat-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #dbe6ff;
  border-radius: 10px;
}
.chat-card-icon svg { width: 22px; height: 22px; }

.chat-card-body {
  background: #f4f2ee;
  padding: 22px 22px 26px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-turn { display: flex; flex-direction: column; gap: 6px; }
.chat-turn-user { align-items: flex-end; }
.chat-turn-bot { align-items: flex-start; }

.chat-label {
  font-size: 13px;
  color: #8f8c85;
  padding-inline: 6px;
}

.chat-bubble {
  max-width: 88%;
  padding: 16px 20px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.5;
  color: #131313;
}
.chat-bubble p + p { margin-top: 10px; }

.chat-bubble-user { background: #d5e0fb; }
.chat-bubble-bot  { background: #e8e5df; }

/* Typing indicator */
.chat-bubble-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 14px 16px;
}
.chat-bubble-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8f8c85;
  opacity: 0.5;
  animation: typingDot 1.15s ease-in-out infinite;
}
.chat-bubble-typing span:nth-child(2) { animation-delay: 0.16s; }
.chat-bubble-typing span:nth-child(3) { animation-delay: 0.32s; }

@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%           { transform: translateY(-3px); opacity: 1; }
}

/* ------------------------------------------------------------
   Answer receipt card (floating)
   ------------------------------------------------------------ */

.receipt-card {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  box-shadow:
    0 20px 44px -16px rgba(80, 32, 12, 0.18),
    0 6px 14px -6px rgba(80, 32, 12, 0.10);
  white-space: nowrap;
}

.receipt-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
}
.receipt-icon svg { width: 100%; height: 100%; overflow: visible; }

.receipt-text {
  font-size: 15px;
  font-weight: 500;
  color: #131313;
}
.receipt-text strong { font-weight: 600; }

/* ------------------------------------------------------------
   Scene 2 — Form card
   ------------------------------------------------------------ */

.form-card {
  flex: 0 0 auto;
  width: min(52%, 400px);
  padding: 22px;
  background: #f4f2ee;
  border-radius: 8px;
  box-shadow:
    0 30px 60px -20px rgba(80, 32, 12, 0.18),
    0 8px 20px -10px rgba(80, 32, 12, 0.12);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: #131313;
}

.form-input {
  background: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: #131313;
  line-height: 1.4;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-radios {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-radios li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #a8a5a0;
  font-size: 14px;
}

.form-radios li.is-checked {
  color: #131313;
}

.radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #cfccc7;
  background: #fff;
  flex-shrink: 0;
  position: relative;
}
.is-checked .radio {
  background: #131313;
  border-color: #131313;
}
.is-checked .radio::after {
  content: "";
  position: absolute;
  inset: 3.5px;
  border-radius: 50%;
  background: #fff;
}

.form-reply {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 4px;
}

.form-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #131313;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.form-avatar svg { width: 16px; height: 16px; }

.form-reply-bubble {
  max-width: none;
  flex: 1;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
}

/* ------------------------------------------------------------
   Scene 2 — Benchmark card
   ------------------------------------------------------------ */

.benchmark-card {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  box-shadow:
    0 20px 44px -16px rgba(80, 32, 12, 0.18),
    0 6px 14px -6px rgba(80, 32, 12, 0.10);
  white-space: nowrap;
}

.benchmark-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
}
.benchmark-icon svg { width: 100%; height: 100%; overflow: visible; }

.benchmark-text {
  font-size: 15px;
  font-weight: 500;
  color: #131313;
}
.benchmark-text strong { font-weight: 600; }

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

/* Tablet: hero stacks, panel becomes full-width row below the text */
@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-content {
    padding-block: 32px 8px;
    max-width: 720px;
  }

  .hero-panel { height: clamp(500px, 62vw, 620px); }

  .chat-card { width: min(66%, 460px); }
  .form-card { width: min(60%, 440px); }
}

@media (max-width: 860px) {
  :root { --header-h: 76px; }

  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    margin: 0 16px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.25);
    padding: 12px;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-link {
    justify-content: space-between;
    width: 100%;
    padding: 13px 14px;
    border-radius: 9px;
  }

  .nav-link:hover { background: #f4f2ec; }
  .nav-link::after { display: none; }

  .menu-toggle { display: flex; }

  .brand-logo { width: 118px; }

  .btn-dark { padding: 13px 18px; font-size: 15px; }
  .btn-ghost { display: none; }

  .hero-copy { font-size: 17px; }

  /* Chat card + receipt */
  .chat-card { width: min(74%, 440px); }
  .chat-card-body { padding: 18px 18px 22px; min-height: 300px; }
  .chat-card-head { padding: 16px 18px 14px; }
  .chat-card-title { font-size: 18px; }
  .chat-bubble { font-size: 13px; padding: 12px 16px; }
  .receipt-text { font-size: 13.5px; }
  .receipt-icon { width: 34px; height: 34px; }

  /* Form card + benchmark */
  .form-card {
    width: min(74%, 420px);
    padding: 18px;
    gap: 14px;
  }
  .form-label { font-size: 13px; }
  .form-input { font-size: 13px; padding: 10px 14px; }
  .form-radios { gap: 6px; }
  .form-radios li { font-size: 13px; }
  .radio { width: 16px; height: 16px; }
  .form-reply-bubble { font-size: 13px; padding: 10px 14px; }
  .form-avatar { width: 28px; height: 28px; }
  .form-avatar svg { width: 14px; height: 14px; }
  .benchmark-text { font-size: 13.5px; }
  .benchmark-icon { width: 32px; height: 32px; }
}

/* Cards start wrapping — panel grows to accommodate stacked layout */
@media (max-width: 700px) {
  .hero-panel { height: clamp(560px, 150vw, 640px); }
  .scene { padding: 20px; gap: 14px; }
  .chat-card { width: 84%; }
  .form-card { width: 84%; }
}

@media (max-width: 480px) {
  .hero-title { margin-bottom: 24px; }
  .hero-copy { margin-bottom: 30px; }
  .hero-panel { height: 600px; }
  .chat-card { width: 90%; }
  .form-card { width: 90%; padding: 16px; gap: 12px; }
  .form-card-body { padding: 16px; }
  .receipt-text { font-size: 12.5px; }
  .receipt-card { padding: 10px; }
  .benchmark-card { padding: 10px; }
}

/* Very small mobile — trim chrome, tighten hero, drop the secondary cards */
@media (max-width: 380px) {
  .brand-logo { width: 100px; }
  .btn-dark { padding: 10px 14px; font-size: 14px; }
  .btn-orange { padding: 14px 18px; font-size: 15px; }
  .btn-secondary { padding: 13px 16px; font-size: 15px; }
  .hero-title { font-size: 34px; }
  .hero-copy { font-size: 16px; }
  .hero-fineprint { font-size: 13px; }
  .hero-panel { height: 540px; }
  .receipt-card { padding: 10px; }
}

/* ------------------------------------------------------------
   Motion
   ------------------------------------------------------------ */

/* Initial states are applied only when GSAP is confirmed available
   (html.has-gsap), so content is never stuck hidden if the CDN fails. */
html.has-gsap [data-anim] { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  html.has-gsap [data-anim] { visibility: visible; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
