:root {
  --ink: #10110d;
  --paper: #f6edd8;
  --paper-strong: #fff8e8;
  --graphite: #2c3027;
  --muted: #747464;
  --acid: #d8ff4f;
  --mint: #7dffc4;
  --orange: #ff8f3d;
  --red: #ff5b51;
  --blue: #6ec7ff;
  --line: rgba(16, 17, 13, 0.14);
  --shadow: 0 28px 80px rgba(16, 17, 13, 0.2);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 12%, rgba(216, 255, 79, 0.42), transparent 28rem),
    radial-gradient(circle at 80% 4%, rgba(255, 143, 61, 0.35), transparent 24rem),
    linear-gradient(135deg, #fbf2d7 0%, #cfe9d0 48%, #f4b56e 100%);
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(16, 17, 13, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 17, 13, 0.08) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
}

.orb {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(4px);
  opacity: 0.55;
  animation: float 11s ease-in-out infinite;
}

.orb-one {
  width: 21rem;
  height: 21rem;
  right: -7rem;
  top: 12rem;
  background: var(--acid);
}

.orb-two {
  width: 16rem;
  height: 16rem;
  left: -6rem;
  bottom: 8rem;
  background: var(--blue);
  animation-delay: -5s;
}

.hero,
main,
.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 24px 0 34px;
}

.topbar,
.brand,
.status-pill,
.hero-grid,
.ai-card,
.ai-metrics,
.section,
.dashboard,
.tax-terminal,
.tax-stack,
.receipt-shell,
.settlement-row,
.copy-box,
.stats-grid,
.ledger-card,
.pipeline-steps {
  display: grid;
}

.topbar {
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 52px;
}

.brand {
  width: max-content;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 15px;
  background: var(--acid);
  box-shadow: 6px 6px 0 var(--ink);
  font-family: "Archivo Black", Impact, sans-serif;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.status-pill,
.eyebrow,
.ai-card-header,
.receipt-meta,
.person-card span,
.person-card em,
.stat-card span,
.terminal-bar,
.tax-stack span,
.pipeline-steps span {
  font-family: "JetBrains Mono", "Courier New", monospace;
}

.brand small {
  color: var(--muted);
  font-size: 0.74rem;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.66);
  backdrop-filter: blur(14px);
  font-size: 0.82rem;
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #27d96c;
  box-shadow: 0 0 0 0 rgba(39, 217, 108, 0.8);
  animation: pulse 1.8s infinite;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.78fr);
  gap: 32px;
  align-items: stretch;
}

.hero-copy {
  padding: clamp(32px, 7vw, 72px);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xl);
  background: rgba(246, 237, 216, 0.68);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-copy,
.ai-card,
.section,
.panel,
.person-card,
.stat-card,
.ledger-card,
.tax-terminal,
.tax-stack article,
.pipeline-steps div {
  min-width: 0;
}

.hero-copy::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  bottom: -70px;
  border: 2px solid rgba(16, 17, 13, 0.18);
  border-radius: 48px;
  rotate: 18deg;
  background: rgba(255, 255, 255, 0.18);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--graphite);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 7.3ch;
  margin-bottom: 22px;
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: clamp(4rem, 8vw, 6.7rem);
  line-height: 0.82;
  letter-spacing: -0.08em;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 12px;
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

h3 {
  margin-bottom: 4px;
  font-size: 1.1rem;
}

.lead {
  max-width: 58ch;
  color: var(--graphite);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.button:active {
  transform: translate(0, 0);
  box-shadow: none;
}

.button.primary {
  background: var(--acid);
}

.button.ghost {
  background: rgba(255, 248, 232, 0.8);
}

.button.full {
  width: 100%;
}

.ai-card {
  gap: 22px;
  padding: 26px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-xl);
  background: #11140f;
  color: var(--paper-strong);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.ai-card::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(216, 255, 79, 0.18);
  border-radius: 26px;
  pointer-events: none;
}

.ai-card-header,
.receipt-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.ai-card-header strong {
  color: var(--acid);
}

.scanner {
  min-height: 340px;
  display: grid;
  place-items: end start;
  padding: 24px;
  border-radius: 26px;
  background:
    linear-gradient(rgba(216, 255, 79, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 255, 79, 0.12) 1px, transparent 1px),
    radial-gradient(circle at 42% 34%, rgba(125, 255, 196, 0.28), transparent 12rem),
    #181d15;
  background-size: 28px 28px, 28px 28px, auto, auto;
  position: relative;
  overflow: hidden;
}

.scanner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 34% 28%, rgba(216, 255, 79, 0.16), transparent 9rem),
    linear-gradient(90deg, rgba(17, 20, 15, 0.64), transparent 22%, transparent 78%, rgba(17, 20, 15, 0.72));
  pointer-events: none;
  z-index: 2;
}

.scan-glow {
  position: absolute;
  inset: 0;
  height: 84px;
  background: linear-gradient(transparent, rgba(216, 255, 79, 0.2), transparent);
  animation: scan 3.8s ease-in-out infinite;
  z-index: 4;
}

.receipt-scan-stage {
  position: absolute;
  inset: 22px 18px 86px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  pointer-events: none;
}

.receipt-photo {
  position: relative;
  min-height: 0;
  height: 100%;
  margin: 0;
  border: 1px solid rgba(216, 255, 79, 0.28);
  border-radius: 14px;
  background: rgba(255, 248, 232, 0.08);
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 248, 232, 0.08) inset,
    0 0 34px rgba(125, 255, 196, 0.14);
  overflow: hidden;
}

.receipt-photo::before,
.receipt-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.receipt-photo::before {
  background:
    linear-gradient(120deg, rgba(216, 255, 79, 0.22), transparent 26%, transparent 68%, rgba(110, 199, 255, 0.14)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
  opacity: 0.52;
  z-index: 1;
}

.receipt-photo::after {
  border: 1px dashed rgba(216, 255, 79, 0.38);
  border-radius: inherit;
  box-shadow: 0 0 28px rgba(216, 255, 79, 0.18) inset;
  z-index: 2;
}

.receipt-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: grayscale(0.16) sepia(0.16) contrast(1.08) brightness(0.72);
  opacity: 0.82;
  transform: scale(1.03);
}

.receipt-photo-billiard img {
  object-position: 52% 46%;
}

.receipt-photo-vietquan img {
  object-position: 50% 38%;
}

.receipt-photo figcaption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  padding: 6px 8px;
  border: 1px solid rgba(216, 255, 79, 0.3);
  border-radius: 999px;
  background: rgba(17, 20, 15, 0.7);
  color: var(--acid);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.receipt-photo-billiard {
  transform: rotate(-4deg) translateY(12px);
}

.receipt-photo-vietquan {
  transform: rotate(4deg) translateY(-4px);
}

.scanner p {
  width: min(100%, 25rem);
  margin: 0;
  color: rgba(255, 248, 232, 0.8);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  line-height: 1.55;
  position: relative;
  z-index: 5;
  padding: 10px 12px;
  border: 1px solid rgba(216, 255, 79, 0.18);
  border-radius: 14px;
  background: rgba(17, 20, 15, 0.72);
  backdrop-filter: blur(4px);
}

.ai-metrics {
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.ai-metrics div,
.stat-card,
.panel,
.section,
.ledger-card,
.pipeline-steps div {
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  background: rgba(255, 248, 232, 0.76);
  box-shadow: 10px 10px 0 rgba(16, 17, 13, 0.14);
}

.ai-metrics div {
  border-color: rgba(255, 248, 232, 0.2);
  background: rgba(255, 248, 232, 0.08);
  box-shadow: none;
  padding: 16px;
}

.ai-metrics strong {
  display: block;
  color: var(--acid);
  font-size: 1.45rem;
}

.ai-metrics span {
  color: rgba(255, 248, 232, 0.68);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
}

main {
  display: grid;
  gap: 24px;
  padding-bottom: 36px;
}

.section,
.panel {
  padding: clamp(22px, 4vw, 34px);
  backdrop-filter: blur(18px);
}

.intro-panel {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 24px;
  align-items: center;
}

.people-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.person-card {
  min-width: 112px;
  flex: 1;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.36);
  position: relative;
  overflow: hidden;
}

.person-card.vip {
  border: 2px solid var(--ink);
  background:
    linear-gradient(135deg, rgba(216, 255, 79, 0.88), rgba(255, 143, 61, 0.58)),
    var(--paper-strong);
  box-shadow: 6px 6px 0 rgba(16, 17, 13, 0.18);
}

.person-card.vip::after {
  content: "70k";
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 7px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: #11140f;
  color: var(--acid);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 800;
}

.person-card strong {
  display: block;
  font-size: 1.15rem;
}

.person-card span,
.person-card em {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.person-card em {
  margin-top: 6px;
  font-style: normal;
}

.person-card.vip span,
.person-card.vip em {
  color: rgba(16, 17, 13, 0.7);
}

.person-card.protected {
  border: 2px solid var(--ink);
  background:
    linear-gradient(135deg, rgba(110, 199, 255, 0.74), rgba(125, 255, 196, 0.7)),
    var(--paper-strong);
  box-shadow: 6px 6px 0 rgba(16, 17, 13, 0.14);
}

.person-card.protected::after {
  content: "0 EUR";
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 7px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: #11140f;
  color: var(--mint);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 800;
}

.person-card.protected span,
.person-card.protected em {
  color: rgba(16, 17, 13, 0.7);
}

.tax-panel {
  grid-template-columns: minmax(0, 0.86fr) minmax(340px, 1.14fr);
  gap: 24px;
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(17, 20, 15, 0.94), rgba(44, 48, 39, 0.92)),
    var(--ink);
  color: var(--paper-strong);
  overflow: hidden;
  position: relative;
}

.tax-panel::after {
  content: "70K";
  position: absolute;
  right: -0.1em;
  bottom: -0.32em;
  color: rgba(216, 255, 79, 0.08);
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: clamp(7rem, 18vw, 15rem);
  letter-spacing: -0.08em;
  pointer-events: none;
}

.tax-panel .eyebrow {
  color: var(--acid);
}

.tax-copy {
  position: relative;
  z-index: 1;
}

.tax-copy p:not(.eyebrow) {
  color: rgba(255, 248, 232, 0.76);
  font-size: 1.05rem;
  line-height: 1.6;
}

.tax-terminal {
  align-content: start;
  border: 2px solid rgba(255, 248, 232, 0.2);
  border-radius: 26px;
  background:
    linear-gradient(rgba(216, 255, 79, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 255, 79, 0.08) 1px, transparent 1px),
    rgba(255, 248, 232, 0.06);
  background-size: 22px 22px;
  box-shadow: none;
  position: relative;
  z-index: 1;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 248, 232, 0.18);
  color: rgba(255, 248, 232, 0.7);
  font-size: 0.78rem;
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}

.terminal-bar span:nth-child(2) {
  background: var(--orange);
}

.terminal-bar span:nth-child(3) {
  background: var(--mint);
}

.terminal-bar strong {
  margin-left: auto;
  color: var(--acid);
}

.tax-stack {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
}

.tax-stack article {
  min-height: 176px;
  padding: 18px;
  border: 1px solid rgba(255, 248, 232, 0.18);
  border-radius: 20px;
  background: rgba(17, 20, 15, 0.74);
}

.tax-stack span {
  color: rgba(255, 248, 232, 0.58);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.tax-stack strong {
  display: block;
  margin: 14px 0 10px;
  color: var(--acid);
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.55rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.tax-stack p {
  margin-bottom: 0;
  color: rgba(255, 248, 232, 0.68);
}

.dashboard {
  grid-template-columns: minmax(320px, 0.9fr) minmax(340px, 1.1fr);
  gap: 24px;
  align-items: start;
}

.panel-heading p:not(.eyebrow) {
  color: var(--graphite);
  line-height: 1.55;
}

.receipt-list,
.settlement-list,
.ledger-grid {
  display: grid;
  gap: 16px;
}

.receipt-shell {
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.36);
}

.receipt-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.receipt-total {
  padding: 9px 12px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--mint);
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  white-space: nowrap;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

select,
input,
textarea {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper-strong);
  color: var(--ink);
  outline: none;
}

select,
input {
  height: 46px;
  padding: 0 12px;
}

textarea {
  min-height: 146px;
  resize: vertical;
  padding: 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.5;
}

.settlement-row {
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.4);
}

.settlement-row.protected-row {
  border: 2px solid var(--ink);
  background:
    linear-gradient(135deg, rgba(110, 199, 255, 0.32), rgba(125, 255, 196, 0.36)),
    rgba(255, 255, 255, 0.5);
}

.settlement-row.protected-row .arrow {
  color: var(--mint);
}

.avatar-line {
  display: flex;
  gap: 10px;
  align-items: center;
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--orange);
  font-weight: 900;
}

.arrow {
  display: grid;
  min-width: 84px;
  place-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  background: #11140f;
  color: var(--acid);
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
}

.copy-box {
  gap: 12px;
  margin-top: 18px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.stat-card {
  padding: 24px;
}

.stat-card.accent {
  background: var(--acid);
}

.stat-card.tax-stat {
  background:
    linear-gradient(135deg, rgba(255, 143, 61, 0.88), rgba(216, 255, 79, 0.82)),
    var(--orange);
}

.stat-card.papa-stat {
  background:
    linear-gradient(135deg, rgba(110, 199, 255, 0.82), rgba(125, 255, 196, 0.86)),
    var(--mint);
}

.stat-card strong {
  display: block;
  margin: 8px 0 10px;
  font-family: "Archivo Black", Impact, sans-serif;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(2.2rem, 4.2vw, 3.55rem);
  line-height: 0.85;
  letter-spacing: -0.07em;
}

.stat-card.accent strong {
  font-size: clamp(2.35rem, 4vw, 3.35rem);
  letter-spacing: -0.08em;
  white-space: nowrap;
}

.stat-card p {
  margin-bottom: 0;
  color: var(--graphite);
}

.ledger-grid {
  grid-template-columns: repeat(2, 1fr);
}

.ledger-card {
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.ledger-card::before,
.ledger-card::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #dfe7cb;
}

.ledger-card::before {
  left: 22%;
}

.ledger-card::after {
  right: 22%;
}

.ledger-card ul {
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.ledger-card li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(16, 17, 13, 0.28);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88rem;
}

.pipeline {
  background: #11140f;
  color: var(--paper-strong);
}

.pipeline .eyebrow {
  color: var(--acid);
}

.pipeline-steps {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.pipeline-steps div {
  min-height: 190px;
  padding: 22px;
  border-color: rgba(255, 248, 232, 0.22);
  background: rgba(255, 248, 232, 0.08);
  box-shadow: none;
}

.pipeline-steps span {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--acid);
}

.pipeline-steps p {
  margin-bottom: 0;
  color: rgba(255, 248, 232, 0.68);
}

.footer {
  padding: 12px 0 32px;
  color: var(--graphite);
  text-align: center;
}

.footer p {
  margin-bottom: 0;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  width: min(360px, calc(100% - 40px));
  padding: 16px 18px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--acid);
  box-shadow: 8px 8px 0 var(--ink);
  font-weight: 800;
  transform: translateY(140%);
  transition: transform 240ms ease;
}

.toast.show {
  transform: translateY(0);
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(39, 217, 108, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(39, 217, 108, 0);
  }
}

@keyframes scan {
  0%,
  100% {
    transform: translateY(-80%);
  }
  50% {
    transform: translateY(360%);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(18px, -22px, 0) rotate(8deg);
  }
}

@media (max-width: 900px) {
  .topbar,
  .hero-grid,
  .intro-panel,
  .tax-panel,
  .dashboard,
  .stats-grid,
  .ledger-grid,
  .pipeline-steps {
    grid-template-columns: 1fr;
  }

  .topbar {
    justify-items: start;
    margin-bottom: 26px;
  }

  .status-pill {
    width: 100%;
    justify-content: center;
  }

  .scanner {
    min-height: 260px;
  }
}

@media (max-width: 560px) {
  .hero,
  main,
  .footer {
    width: min(100% - 20px, 1180px);
  }

  .hero {
    padding-top: 12px;
  }

  h1 {
    font-size: clamp(2.9rem, 13vw, 3.35rem);
    line-height: 0.84;
    letter-spacing: -0.075em;
  }

  .hero-copy,
  .ai-card,
  .section,
  .panel {
    border-radius: 24px;
  }

  .hero-copy,
  .ai-card {
    padding: 22px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .ai-metrics,
  .field-row,
  .settlement-row,
  .tax-stack {
    grid-template-columns: 1fr;
  }

  .scanner {
    min-height: 230px;
    padding: 22px;
  }

  .receipt-scan-stage {
    inset: 18px 14px 88px;
    gap: 8px;
  }

  .receipt-photo {
    border-radius: 12px;
  }

  .receipt-photo figcaption {
    left: 6px;
    right: 6px;
    bottom: 6px;
    padding: 5px 6px;
    font-size: 0.52rem;
  }

  .scanner p {
    font-size: 0.82rem;
  }

  .arrow {
    width: max-content;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
