/* HaughtAI styles.
 *
 * Plain CSS, served as-is. No build step, no preprocessor, no bundler -- the
 * target machine has no Node.js, and a build step would be a hard blocker.
 *
 * MOBILE FIRST. Every rule outside a `min-width` media query is the phone
 * layout; wider screens only add. The design language is dark ("SaaS Noir"),
 * built from four ideas:
 *
 *   - Barely-there UI: thin type, generous space, very few borders.
 *   - Liquid glass: translucent panels with a soft blur and a hairline sheen.
 *   - Bento grid: content in modular tiles that reflow from one column up.
 *   - Editorial headlines: light italic display type with tight tracking.
 *
 * No JavaScript anywhere on this site, so every effect here is CSS-only.
 * Autoplaying video is a plain <video> element, and `prefers-reduced-motion`
 * swaps the hero video for its poster image rather than trying to pause it.
 */

:root {
  /* --- Palette (unchanged; the design system is built on top of it) ----- */
  --bg: #0f1218;
  --bg-raised: #161b24;
  --bg-card: #1a212c;
  --border: #2a3342;
  --border-strong: #3a4658;
  --text: #e8ecf2;
  --text-muted: #8b97ab;
  --accent: #6c8cff;
  --accent-text: #0b0e14;
  --good: #3fb27f;
  --warn: #d9a441;
  --danger: #d95757;

  /* --- Glass ------------------------------------------------------------ */
  --glass: rgba(22, 27, 36, 0.55);
  --glass-strong: rgba(13, 16, 22, 0.72);
  --glass-line: rgba(255, 255, 255, 0.08);
  --sheen: rgba(255, 255, 255, 0.05);
  --accent-soft: rgba(108, 140, 255, 0.16);

  /* --- Shape and depth -------------------------------------------------- */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.95);
  --shadow-soft: 0 12px 30px -22px rgba(0, 0, 0, 0.9);

  --wrap: 1120px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Anchor targets stop below the sticky header instead of underneath it. The
 * header is two rows on a phone, so the offset is larger there. */
section[id] { scroll-margin-top: 7rem; }

body {
  margin: 0;
  background: var(--bg);
  /* Two very soft accent glows keep the page from reading as flat black. */
  background-image:
    radial-gradient(60rem 40rem at 15% -10%, rgba(108, 140, 255, 0.10), transparent 60%),
    radial-gradient(50rem 36rem at 100% 0%, rgba(63, 178, 127, 0.06), transparent 55%);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 620; }
h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 4vw, 1.8rem); letter-spacing: -0.015em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }

/* Editorial display type: only on the marketing page, so the application
 * screens keep their compact headings. */
.display {
  font-weight: 320;
  font-style: italic;
  letter-spacing: -0.025em;
}
.display-xl {
  font-size: clamp(2.4rem, 10vw, 4.6rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-bottom: 0.6em;
  max-width: 18ch;
}

a { color: var(--accent); }
a:hover { text-decoration: none; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: #0b0e14;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 640px; }
.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-text);
  padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* --- Header ------------------------------------------------------------- */

.site-header {
  /* Sticky so the anchor nav is reachable from anywhere in the long page. */
  position: sticky; top: 0; z-index: 30;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--glass-line);
}

/* Phone: brand and actions on one row, the section nav scrolls beneath.
 * `minmax(0, auto)` on the action column lets it shrink and wrap its buttons
 * rather than pushing the wordmark off the screen on a narrow phone. */
.header-inner {
  display: grid;
  grid-template-columns: 1fr minmax(0, auto);
  grid-template-areas:
    "brand actions"
    "nav nav";
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.wordmark {
  grid-area: brand;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
  white-space: nowrap;
}
.wordmark-dot {
  width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* A horizontal strip, not a collapsed menu: with no JavaScript there is no
 * disclosure widget to open, and a scroll strip always works. */
.site-nav {
  grid-area: nav;
  display: flex; gap: 0.25rem;
  margin: 0 -1.25rem; padding: 0 1.25rem 0.15rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  flex: none;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { color: var(--text); background: var(--sheen); }

/* Fade the trailing edge of the strip so it reads as scrollable rather than
 * as a nav that has been cut off. Desktop has no overflow, so it is scoped. */
@media (max-width: 819px) {
  /* The three signed-in actions wrap to two lines on a phone. Centring the
   * wordmark against that block leaves it floating between the rows, so
   * top-align it with the first row instead (the nudge matches a button's
   * height, which makes the single-action case look centred too). */
  .header-inner { align-items: start; }
  .wordmark { padding-top: 0.25rem; }

  .site-nav {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 2.5rem), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 2.5rem), transparent 100%);
  }
}

.header-actions {
  grid-area: actions;
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}
/* Smaller controls in the bar on a phone, tight enough that the three
 * signed-in actions stay on one line on a 360px screen; full size from the
 * tablet break up. */
.header-actions .button { padding: 0.35rem 0.6rem; font-size: 0.8125rem; }
.inline-form { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; flex-wrap: wrap; }
/* The key-name field gives up space first; the button keeps its label. */
.inline-form input[type="text"] { flex: 1 1 8rem; min-width: 0; }

@media (min-width: 820px) {
  .header-actions .button { padding: 0.55rem 1rem; font-size: 0.9375rem; }
  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav actions";
    min-height: 4.5rem;
    padding-top: 0; padding-bottom: 0;
  }
  .site-nav {
    margin: 0; padding: 0;
    justify-content: center;
    overflow: visible;
  }
}

/* --- Buttons ------------------------------------------------------------ */

.button {
  display: inline-block;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--bg-raised);
  color: var(--text);
  font: inherit; font-size: 0.9375rem; font-weight: 550;
  text-decoration: none; cursor: pointer;
  /* A button label is one line. Wrapping it inside a pill turns the control
   * into an unreadable blob. */
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.button:hover { background: #1e2532; border-color: #4a576d; }
.button:active { transform: translateY(1px); }

.button-primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-text);
  box-shadow: 0 10px 30px -14px rgba(108, 140, 255, 0.9);
}
.button-primary:hover { background: #829bff; border-color: #829bff; }

.button-quiet { background: transparent; border-color: transparent; color: var(--text-muted); }
.button-quiet:hover { background: var(--sheen); color: var(--text); }

.button-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.button-danger:hover { background: rgba(217, 87, 87, 0.12); }

.button-large { padding: 0.8rem 1.6rem; font-size: 1rem; }
.button-block { display: block; text-align: center; }

.button-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

/* --- Text bits ---------------------------------------------------------- */

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.7rem; font-weight: 600;
  color: var(--accent); margin: 0 0 0.9rem;
}

.lede { font-size: 1.0625rem; color: var(--text-muted); max-width: 62ch; }

.tick-list { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.tick-list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.4rem; color: var(--text-muted); }
.tick-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--good); font-weight: 700; }

.prose p, .prose li { max-width: 68ch; }
.prose h2 { margin-top: 2rem; }

/* --- Notices ------------------------------------------------------------ */

.notice {
  border: 1px solid var(--glass-line);
  border-left: 3px solid var(--accent);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin: 1.25rem 0;
}
.notice p:last-child { margin-bottom: 0; }
.notice-warn { border-left-color: var(--warn); }
.notice-good { border-left-color: var(--good); }

.key-value { word-break: break-all; background: #0b0e14; padding: 0.6rem 0.75rem; border-radius: 6px; border: 1px solid var(--border); }

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 4rem 0 3.5rem;
  border-bottom: 1px solid var(--glass-line);
}

.hero-bg { position: absolute; inset: 0; z-index: -1; }

/* The looping video is decorative; its <source> file is a placeholder
 * (static/video/hero_loop.mp4) and is replaced with real footage later. */
.hero-video {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.6;
}
/* Three passes: fade into the page at the bottom, hold the text column dark on
 * the left, and add one soft accent glow. Between them the video can stay at a
 * visible opacity without the headline losing contrast. */
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 18, 24, 0.25) 0%, rgba(15, 18, 24, 0.82) 60%, var(--bg) 100%),
    linear-gradient(90deg, rgba(15, 18, 24, 0.8) 0%, rgba(15, 18, 24, 0.2) 65%, transparent 100%),
    radial-gradient(40rem 30rem at 20% 20%, rgba(108, 140, 255, 0.22), transparent 70%);
}

.hero-inner { max-width: 760px; }
.hero-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1.75rem 0 0; }

.hero-badges {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  list-style: none; margin: 1.75rem 0 0; padding: 0;
}
.hero-badges li {
  font-size: 0.8125rem; color: var(--text-muted);
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-pill);
  background: var(--sheen);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

@media (min-width: 820px) {
  .hero { padding: 7rem 0 6rem; }
  .hero-actions { gap: 0.75rem; }
}

/* No motion allowed: drop the video and show its poster as a still backdrop. */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero-bg {
    background: url("../img/logo_placeholder_hero.6dcddc2865e5.png") center / cover no-repeat;
  }
  .hero-bg .hero-scrim { backdrop-filter: none; }
}

/* --- Sections ----------------------------------------------------------- */

.section { padding: 3.25rem 0; border-bottom: 1px solid var(--glass-line); }
.section-alt { background: rgba(22, 27, 36, 0.45); }
.section-head { max-width: 62ch; margin-bottom: 2rem; }
.section-head .lede { margin-bottom: 0; }

@media (min-width: 820px) {
  .section { padding: 5.5rem 0; }
  .section-head { margin-bottom: 2.75rem; }
}

/* --- Bento grid --------------------------------------------------------- */

.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.tile {
  position: relative;
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-line);
  background: linear-gradient(160deg, rgba(26, 33, 44, 0.92), rgba(15, 18, 24, 0.78));
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
  box-shadow: var(--shadow);
  overflow: hidden;
}
/* The liquid-glass highlight: a hairline of light along the top edge. */
.tile::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.tile-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-line);
  background: #0b0e14;
  aspect-ratio: 16 / 10;
}
.tile-media video,
.tile-media img { display: block; width: 100%; height: 100%; object-fit: cover; }

.tile-body { display: flex; flex-direction: column; justify-content: center; flex: 1; }
.tile-kicker {
  text-transform: uppercase; letter-spacing: 0.13em;
  font-size: 0.68rem; font-weight: 600; color: var(--accent);
  margin: 0 0 0.5rem;
}
.tile-title { font-size: 1.2rem; margin: 0 0 0.4rem; font-weight: 560; letter-spacing: -0.01em; }
.tile-text { color: var(--text-muted); font-size: 0.9375rem; margin: 0; }

.tile-accent { border-color: rgba(108, 140, 255, 0.4); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0.25rem 0 0; padding: 0; }
.chip {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-line);
  background: var(--sheen);
  font-size: 0.8125rem; color: var(--text-muted);
}

/* Tablet: two columns. */
@media (min-width: 700px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .span-3, .span-4, .span-6 { grid-column: span 2; }
}

/* Desktop: six columns, so tiles can be 1/6, 1/3, 1/2 or 2/3 wide. */
@media (min-width: 1000px) {
  .bento { grid-template-columns: repeat(6, 1fr); gap: 1.25rem; }
  .span-2 { grid-column: span 2; }
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
  .span-6 { grid-column: span 6; }
  .tile { padding: 1.6rem; }
}

/* --- Pricing ------------------------------------------------------------ */

.pricing { padding: 3.25rem 0; border-bottom: 1px solid var(--glass-line); }

.plan-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 1.25rem; margin: 2rem 0 1rem;
}

.plan {
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(26, 33, 44, 0.9), rgba(15, 18, 24, 0.75));
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  padding: 1.6rem;
}
.plan-featured {
  border-color: rgba(108, 140, 255, 0.45);
  box-shadow: 0 30px 70px -40px rgba(108, 140, 255, 0.9);
}
.plan-badge {
  display: inline-block; font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--accent); margin: 0 0 0.6rem; font-weight: 650;
}
.plan-price { font-size: 1.9rem; font-weight: 340; font-style: italic; letter-spacing: -0.02em; margin: 0 0 1rem; }
.pricing-note { margin-top: 1rem; }

@media (min-width: 700px) {
  .plan-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}
@media (min-width: 820px) {
  .pricing { padding: 5.5rem 0; }
}

/* --- Closing ------------------------------------------------------------ */

.closing { padding: 4rem 0 5rem; }
.closing-inner { max-width: 640px; }

@media (min-width: 820px) {
  .closing { padding: 6rem 0 7rem; }
}

/* --- Panels and cards --------------------------------------------------- */

.panel-page { padding: 2.5rem 0 4.5rem; }

.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem; margin: 2rem 0;
}

.card {
  border: 1px solid var(--glass-line); border-radius: var(--radius);
  background: var(--bg-card); padding: 1.5rem;
  display: flex; flex-direction: column;
}
.card h2 { font-size: 1.2rem; margin-bottom: 0.25rem; }
.card .button { margin-top: auto; align-self: flex-start; }
/* A locked card is dimmed but still readable: the user needs to know what they
 * are missing in order to want it. */
.card-locked { opacity: 0.72; }

.locked-reason { color: var(--warn); font-size: 0.9375rem; margin: 1rem 0 0; }

.feature-states { list-style: none; margin: 1rem 0 1.25rem; padding: 0; font-size: 0.9375rem; }
.feature-states li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.4rem 0; border-bottom: 1px solid var(--border);
}
.feature-states li:last-child { border-bottom: 0; }
.feature-states .state { color: var(--text-muted); font-size: 0.875rem; white-space: nowrap; }
.feature-states li.on .state { color: var(--good); }
.feature-states li.off .state { color: var(--text-muted); }

/* --- Account page ------------------------------------------------------- */

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2.5rem; margin-bottom: 2rem; }

.facts { margin: 0 0 1rem; }
.facts dt { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-top: 1rem; }
.facts dd { margin: 0.2rem 0 0; }

.pill {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--bg-raised);
  font-size: 0.875rem;
}

.small-heading { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 1.5rem 0 0.25rem; }

.table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.9375rem; }
.table th, .table td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
.table th { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; }

.danger-heading { color: var(--danger); margin-top: 3rem; }

.dev-login { border-top: 1px solid var(--border); margin-top: 2rem; padding-top: 1.5rem; }
.dev-login h2 { font-size: 1rem; color: var(--text-muted); }

input[type="text"] {
  padding: 0.5rem 0.7rem; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--bg);
  color: var(--text); font: inherit; font-size: 0.9375rem;
}

label { color: var(--text-muted); font-size: 0.875rem; }

/* --- Footer ------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--glass-line); padding: 2.5rem 0; margin-top: 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; flex-wrap: wrap; }
.footer-brand .muted { margin: 0.25rem 0 0; font-size: 0.875rem; }
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer nav a { color: var(--text-muted); text-decoration: none; font-size: 0.9375rem; }
.site-footer nav a:hover { color: var(--text); text-decoration: underline; }

/* --- Accessibility ------------------------------------------------------ */

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
