/* Atu — atuagent.com
   "warm paper & ink" — tokens mirrored from atuagent-app/src/app/globals.css
   One font everywhere: Geist. */

:root {
  --background: oklch(0.981 0.004 95);
  --foreground: oklch(0.24 0.032 257);
  --card: oklch(0.997 0.002 95);
  --primary: oklch(0.54 0.085 176);
  --primary-hover: oklch(0.48 0.08 176);
  --primary-foreground: oklch(0.985 0.004 95);
  --muted: oklch(0.955 0.006 95);
  --muted-foreground: oklch(0.5 0.022 250);
  --accent: oklch(0.937 0.024 168);
  --accent-foreground: oklch(0.36 0.06 182);
  --border: oklch(0.905 0.011 120);
  --ring: oklch(0.6 0.09 176);
  --brand-from: oklch(0.79 0.083 155);
  --brand-to: oklch(0.61 0.088 178);
  --radius: 0.625rem;

  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --col: 1080px;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.wrap {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 1.5rem;
}

::selection {
  background: var(--accent);
  color: var(--accent-foreground);
}

/* ---------- Type ---------- */

h1 {
  font-size: clamp(2.75rem, 6.5vw, 4.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.text-gradient {
  background: linear-gradient(100deg, var(--brand-from), var(--brand-to));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius);
  padding: 0.625rem 1.125rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--background) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 4rem;
}

.logo-link img {
  height: 1.65rem;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

.site-nav a:hover {
  color: var(--foreground);
}

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

.hero {
  padding: 6.5rem 0 4rem;
  text-align: center;
}

.hero h1 {
  max-width: 17ch;
  margin: 0 auto;
}

.hero-sub {
  max-width: 38rem;
  margin: 1.5rem auto 0;
  font-size: 1.125rem;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-note {
  margin-top: 1rem;
  min-height: 1.4em;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Waitlist form */
.waitlist-form {
  display: flex;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 2.25rem;
}

.waitlist-form input[type="email"] {
  font: inherit;
  font-size: 0.9375rem;
  width: min(20rem, 100%);
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
}

.waitlist-form input[type="email"]::placeholder {
  color: var(--muted-foreground);
}

.waitlist-form input[type="email"]:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 1px;
  border-color: var(--ring);
}

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  border: 0;
  padding: 0;
}

/* ---------- Product mock ---------- */

.mock-section {
  padding: 1.5rem 0 0;
}

.mock-section .wrap {
  position: relative;
}

.mock-section .wrap::before {
  content: "";
  position: absolute;
  inset: -12% 2%;
  background: radial-gradient(
    55% 55% at 50% 42%,
    oklch(0.79 0.083 155 / 26%),
    oklch(0.61 0.088 178 / 10%) 55%,
    transparent 75%
  );
  z-index: -1;
}

.browser {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  background: var(--card);
  box-shadow:
    0 1px 2px oklch(0.24 0.032 257 / 5%),
    0 24px 64px -24px oklch(0.24 0.032 257 / 18%);
  overflow: hidden;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--muted);
}

.browser-dots {
  display: flex;
  gap: 0.375rem;
}

.browser-dots span {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--border);
}

.browser-url {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.app {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 430px;
  text-align: left;
}

.app-sidebar {
  border-right: 1px solid var(--border);
  padding: 1rem 0.75rem;
  background: oklch(0.966 0.007 110);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.25rem 0.5rem 1rem;
}

.app-brand img {
  height: 1.25rem;
  width: auto;
}

.app-nav {
  list-style: none;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.app-nav li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.5rem;
  border-radius: 0.4rem;
}

.app-nav svg {
  width: 0.9375rem;
  height: 0.9375rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.75;
  flex-shrink: 0;
}

.app-nav li.active {
  background: oklch(0.922 0.022 165);
  color: oklch(0.32 0.06 185);
  font-weight: 500;
}

.app-nav li.active svg {
  opacity: 1;
}

.app-main {
  padding: 1.375rem 1.5rem;
}

.app-page-title {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.app-page-sub {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

/* Ticket layout: timeline + details rail */
.ticket-layout {
  display: grid;
  grid-template-columns: 1fr 185px;
  gap: 2rem;
  align-items: start;
}

.ticket-head {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding-bottom: 1.125rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-foreground);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.ticket-title {
  flex: 1;
  min-width: 0;
}

.ticket-rail {
  border-left: 1px solid var(--border);
  padding: 0.25rem 0 0.25rem 1.5rem;
}

.ticket-rail dl > div {
  padding: 0.5rem 0;
}

.ticket-rail dt {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
}

.ticket-rail dd {
  font-size: 0.8125rem;
  margin-top: 0.1rem;
}

/* Timeline */
.timeline {
  list-style: none;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: calc(4.5rem + 0.875rem + 0.21875rem);
  top: 0.9rem;
  bottom: 0.9rem;
  width: 1px;
  background: var(--border);
}

.timeline li {
  display: grid;
  grid-template-columns: 4.5rem 0.4375rem 1fr;
  align-items: baseline;
  gap: 0.875rem;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
}

.tl-dot {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: var(--card);
  border: 1.5px solid var(--muted-foreground);
  align-self: start;
  margin-top: 0.4rem;
}

.timeline .tl-done .tl-dot {
  background: var(--primary);
  border-color: var(--primary);
}

.timeline .tl-done .tl-text {
  font-weight: 500;
}

.tl-time {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted-foreground);
  text-align: right;
}

.tl-actor {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  margin-right: 0.375rem;
  background: var(--accent);
  color: var(--accent-foreground);
}

.tl-actor.tl-psa {
  background: var(--muted);
  color: var(--muted-foreground);
}

.tl-text {
  color: var(--foreground);
}

.tl-note {
  display: block;
  margin-top: 0.5rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  border-top-left-radius: 0.2rem;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 0.78125rem;
  line-height: 1.5;
  max-width: 34rem;
}

.pill {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.125rem 0.55rem;
  background: var(--accent);
  color: var(--accent-foreground);
}

/* ---------- Integration marquee ---------- */

.integrations {
  padding: 3.5rem 0 4.5rem;
}

.integrations .wrap {
  text-align: center;
}

.integrations-label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.logo-marquee {
  overflow: hidden;
  margin-top: 1.75rem;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.logo-track {
  display: flex;
  width: max-content;
  animation: marquee 55s linear infinite;
}

.logo-marquee:hover .logo-track {
  animation-play-state: paused;
}

.logo-set {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 3.25rem;
  padding-right: 3.25rem;
}

.logo-set li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--muted-foreground);
  filter: grayscale(1);
  opacity: 0.72;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.logo-set li:hover {
  filter: none;
  opacity: 1;
  color: var(--foreground);
}

.logo-set img {
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 0.3rem;
  object-fit: contain;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-track {
    animation: none;
    width: auto;
    flex-wrap: wrap;
    justify-content: center;
  }

  .logo-set[aria-hidden] {
    display: none;
  }

  .logo-set {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 1rem;
    padding-right: 0;
  }

  .logo-marquee {
    mask-image: none;
    -webkit-mask-image: none;
  }
}

/* ---------- Statement ---------- */

.statement {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.statement h2 {
  max-width: 22ch;
  margin: 0 auto;
}

.statement-sub {
  max-width: 36rem;
  margin: 1.25rem auto 0;
  font-size: 1.0625rem;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: 52rem;
  margin: 3.5rem auto 0;
  text-align: left;
}

.step {
  border-top: 2px solid var(--primary);
  padding-top: 1rem;
}

.step h3 {
  margin-bottom: 0.25rem;
}

.step p {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

/* ---------- Pricing + FAQ ---------- */

.section-plain {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.price-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 62rem;
  margin: 3rem auto 0;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  background: var(--card);
  overflow: hidden;
  text-align: left;
  box-shadow: 0 16px 48px -24px oklch(0.24 0.032 257 / 12%);
}

.price-table {
  padding: 2.25rem 2.5rem;
}

.price-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.price-table dl div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}

.price-table dl div:last-child {
  border-bottom: none;
}

.price-table dd {
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.muted-val {
  color: var(--muted-foreground);
  font-weight: 400;
}

.price-hero {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent-foreground);
}

.price-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 2.25rem 2.5rem;
  border-left: 1px solid var(--border);
  background: linear-gradient(150deg, oklch(0.937 0.024 168 / 55%), transparent 70%);
}

.price-side h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.price-side p {
  margin: 0.875rem 0 1.5rem;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  max-width: 26rem;
}

.faq {
  max-width: 44rem;
  margin: 2.75rem auto 0;
  text-align: left;
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  padding: 1.125rem 0;
  font-weight: 500;
  font-size: 1rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--muted-foreground);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  padding: 0 0 1.125rem;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  max-width: 40rem;
}

/* ---------- Waitlist dialog ---------- */

.waitlist-dialog {
  margin: auto;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  background: var(--card);
  color: var(--foreground);
  padding: 2.25rem 2rem 1.75rem;
  width: min(26rem, calc(100vw - 2rem));
  text-align: center;
  box-shadow: 0 24px 64px -24px oklch(0.24 0.032 257 / 30%);
}

.waitlist-dialog::backdrop {
  background: oklch(0.24 0.032 257 / 30%);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.waitlist-dialog h2 {
  font-size: 1.375rem;
}

.dialog-sub {
  margin-top: 0.375rem;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

.waitlist-dialog .waitlist-form {
  flex-direction: column;
  margin-top: 1.5rem;
}

.waitlist-dialog .waitlist-form input[type="email"] {
  width: 100%;
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover {
  background: var(--muted);
  color: var(--foreground);
}

/* ---------- CTA band ---------- */

.cta-band {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.cta-band h2 {
  max-width: 20ch;
  margin: 0 auto;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-line {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer-line img {
  height: 1.25rem;
  width: auto;
}

.footer-line a {
  margin-left: auto;
}

.footer-line a:hover {
  color: var(--accent-foreground);
}

/* ---------- Reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal,
  .reveal-late {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .reveal-late {
    animation-delay: 0.15s;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

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

@media (max-width: 820px) {
  .hero {
    padding-top: 4.5rem;
  }

  .app {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    display: none;
  }

  .ticket-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .ticket-rail {
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 0.75rem 0 0;
  }

  .ticket-rail dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .price-card {
    grid-template-columns: 1fr;
  }

  .price-side {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .statement,
  .cta-band {
    padding: 4rem 0;
  }
}

@media (max-width: 640px) {
  .timeline::before {
    display: none;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }

  .tl-time,
  .tl-dot {
    display: none;
  }

  .waitlist-form {
    flex-direction: column;
    align-items: center;
  }
}
