/*
  Jayna.ai marketing site styles.
  Inputs: static HTML semantic classes.
  Processing: responsive layout, product visuals, use-case filters, and states.
  Outputs: dependency-free CSS for S3/CloudFront deployment.
*/

:root {
  color-scheme: light;
  --ink: #171821;
  --muted: #636878;
  --soft: #f6f7fb;
  --panel: #ffffff;
  --line: #e4e7ef;
  --violet: #6d3ee8;
  --violet-dark: #362184;
  --blue: #2563eb;
  --green: #198754;
  --teal: #0f766e;
  --amber: #b7791f;
  --red: #c2413b;
  --shadow: 0 22px 70px rgba(23, 24, 33, 0.12);
  --shadow-soft: 0 12px 32px rgba(23, 24, 33, 0.08);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--soft);
  line-height: 1.5;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(228, 231, 239, 0.88);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(100% - 32px, var(--max));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 760;
  font-size: 22px;
  letter-spacing: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--violet-dark);
  color: #fff;
  box-shadow: 0 12px 28px rgba(54, 33, 132, 0.22);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4b5060;
  font-size: 15px;
  font-weight: 650;
}

.nav-links a {
  padding: 10px 13px;
  border-radius: 8px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: #f0edf8;
  color: var(--violet-dark);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -6px;
}

.hamburger::after {
  top: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 760;
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 12px 26px rgba(109, 62, 232, 0.24);
}

.btn-secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.section {
  padding: 88px 0;
}

.section-tight {
  padding: 56px 0;
}

.wrap {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100svh - 72px);
  padding: 76px 0 54px;
  background:
    linear-gradient(90deg, rgba(247, 248, 251, 0.92), rgba(247, 248, 251, 0.76)),
    repeating-linear-gradient(0deg, transparent 0, transparent 27px, rgba(47, 51, 72, 0.04) 28px),
    repeating-linear-gradient(90deg, transparent 0, transparent 27px, rgba(47, 51, 72, 0.04) 28px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(460px, 1.14fr);
  align-items: center;
  gap: 58px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: currentColor;
}

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

h1 {
  margin-bottom: 22px;
  max-width: 860px;
  font-size: clamp(46px, 7.2vw, 92px);
  line-height: 0.94;
  letter-spacing: 0;
}

.page-hero h1 {
  font-size: clamp(42px, 6vw, 76px);
  max-width: 980px;
}

.lead {
  max-width: 760px;
  color: #555a69;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.42;
}

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

.signal-row {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  overflow: hidden;
}

.signal {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.signal:last-child {
  border-right: 0;
}

.signal strong {
  display: block;
  margin-bottom: 4px;
  font-size: 22px;
}

.signal span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.product-stage {
  position: relative;
  min-height: 610px;
}

.workflow-board {
  position: relative;
  padding: 24px;
  min-height: 610px;
  border: 1px solid rgba(225, 228, 236, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.workflow-board::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 23px, rgba(64, 68, 91, 0.045) 24px),
    repeating-linear-gradient(90deg, transparent 0, transparent 23px, rgba(64, 68, 91, 0.045) 24px);
  pointer-events: none;
}

.board-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f2f4f8;
  color: #5f6575;
  font-size: 12px;
  font-weight: 760;
}

.pill.green {
  background: #e9f7ef;
  color: var(--green);
}

.flow-path {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 34px;
}

.flow-path::before {
  content: "";
  position: absolute;
  top: 90px;
  bottom: 95px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: #b9c0ce;
}

.node {
  position: relative;
  width: min(86%, 340px);
  border: 1px solid #dfe3eb;
  border-left: 5px solid var(--violet);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.node.small {
  width: min(78%, 290px);
}

.node-head {
  padding: 15px 18px 13px;
  background: #f5f1ff;
}

.node-head span {
  display: block;
  color: var(--violet);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.node-head strong {
  font-size: 20px;
}

.node-body {
  padding: 15px 18px;
  color: #656b7a;
  font-weight: 630;
}

.node.blue {
  border-left-color: var(--blue);
}

.node.blue .node-head {
  background: #eef4ff;
}

.node.blue .node-head span {
  color: var(--blue);
}

.node.green {
  border-left-color: var(--green);
}

.node.green .node-head {
  background: #edf9f2;
}

.node.green .node-head span {
  color: var(--green);
}

.floating-panel {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 20px;
  width: min(48%, 310px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.floating-panel h3 {
  padding: 16px 16px 12px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: #687083;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field-list {
  list-style: none;
  margin: 0;
  padding: 12px 16px 16px;
}

.field-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #eef0f5;
  color: #555c6d;
  font-size: 14px;
  font-weight: 650;
}

.field-list li:last-child {
  border-bottom: 0;
}

.field-list code {
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.section-title {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(280px, 0.3fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 34px;
}

.section-title h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.section-title p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(23, 24, 33, 0.03);
}

.card.pad {
  padding: 24px;
}

.card h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.1;
}

.card p {
  color: var(--muted);
}

.card-tag {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f0edf8;
  color: var(--violet-dark);
  font-size: 12px;
  font-weight: 780;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  gap: 42px;
  align-items: center;
}

.dark-band {
  background: #151720;
  color: #fff;
}

.dark-band .lead,
.dark-band .section-title p,
.dark-band .card p {
  color: #b9bfce;
}

.dark-band .card {
  background: #20232f;
  border-color: #343849;
}

.metric-stack {
  display: grid;
  gap: 12px;
}

.metric {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid #343849;
  border-radius: var(--radius);
  background: #20232f;
}

.metric strong {
  color: #8ddbb6;
  font-size: 28px;
}

.usecase-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mini-case {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.mini-case strong {
  display: block;
  margin-bottom: 8px;
}

.mini-case span {
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  padding: 72px 0 48px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.product-rail {
  display: grid;
  gap: 18px;
}

.rail-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.rail-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f0edf8;
  color: var(--violet);
  font-weight: 900;
}

.diagram {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.timeline {
  display: grid;
  gap: 14px;
}

.event {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf0f5;
}

.event:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.event time {
  color: var(--teal);
  font-size: 13px;
  font-weight: 780;
}

.event strong {
  display: block;
}

.event span {
  color: var(--muted);
  font-size: 14px;
}

.usecase-tools {
  position: sticky;
  top: 72px;
  z-index: 10;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 251, 0.94);
  backdrop-filter: blur(16px);
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px 220px;
  gap: 12px;
}

.search-input,
.filter-select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.case-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.case-card[hidden] {
  display: none;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.case-meta span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #f2f4f8;
  color: #596071;
  font-size: 11px;
  font-weight: 780;
}

.case-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.12;
}

.case-card p {
  margin: 0;
  color: var(--muted);
}

.case-structured {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #edf0f5;
  color: #505769;
  font-size: 13px;
  font-weight: 680;
}

.no-results {
  display: none;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
}

.cta-band {
  padding: 54px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 40px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-weight: 650;
}

.muted {
  color: var(--muted);
}

.voice-strip {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.utterance {
  max-width: 84%;
  padding: 14px 16px;
  border-radius: 8px;
  background: #f0edf8;
  color: var(--violet-dark);
  font-weight: 650;
}

.utterance.user {
  margin-left: auto;
  background: #f2f4f8;
  color: var(--ink);
}

.structured-output {
  margin-top: 8px;
  padding: 16px;
  border-radius: 8px;
  background: #151720;
  color: #d8f7e7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  overflow: auto;
}

@media (max-width: 980px) {
  .nav {
    min-height: 66px;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    top: 66px;
    left: 16px;
    right: 16px;
    display: none;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow-soft);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-actions .btn-secondary {
    display: none;
  }

  .hero-grid,
  .split,
  .section-title,
  .footer-grid,
  .cta-band {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .cards,
  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .usecase-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .product-stage,
  .workflow-board {
    min-height: 560px;
  }
}

@media (max-width: 640px) {
  .brand span {
    font-size: 18px;
  }

  .hero,
  .page-hero {
    padding-top: 46px;
  }

  .section {
    padding: 58px 0;
  }

  .signal-row,
  .cards,
  .case-grid,
  .usecase-preview {
    grid-template-columns: 1fr;
  }

  .signal {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .signal:last-child {
    border-bottom: 0;
  }

  .workflow-board {
    padding: 16px;
  }

  .floating-panel {
    position: relative;
    width: 100%;
    right: auto;
    bottom: auto;
    margin-top: 20px;
  }

  .flow-path::before {
    bottom: 35px;
  }

  .node,
  .node.small {
    width: 100%;
  }

  .cta-band {
    padding: 28px;
  }
}
