/* Exnesta docs — wide layout, bento home, sidebar legal pages */

:root {
  --bg: #ffffff;
  --surface: #f7f7f8;
  --surface-2: #f3f3f5;
  --ink: #141418;
  --muted: #64686f;
  --muted-2: #9a9ea5;
  --border: rgba(20, 20, 24, 0.1);
  --accent: #ffde02;
  --accent-soft: #fff8cf;
  --accent-ink: #8f7400;
  --violet: #7961b1;
  --violet-soft: #efebf8;
  --blue: #329cfc;
  --red: #f44c4c;
  --radius: 16px;
  --radius-pill: 999px;
  --shadow: 0 18px 48px rgba(20, 20, 24, 0.08);
  --shadow-sm: 0 6px 20px rgba(20, 20, 24, 0.06);
  --font: "SF Pro Text", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --max: 1120px;
  --nav-h: 64px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(20, 20, 24, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 20, 24, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 55% 40% at 8% 0%, rgba(255, 222, 2, 0.22), transparent 55%),
    radial-gradient(ellipse 45% 35% at 92% 8%, rgba(121, 97, 177, 0.14), transparent 50%);
  pointer-events: none;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

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

/* —— Shell —— */

.shell {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.25rem;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand a {
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand img {
  height: 36px;
  width: auto;
  border-radius: 10px;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
}

.nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.nav-pills a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-pills a:hover {
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
}

.nav-pills a[aria-current="page"] {
  color: var(--ink);
  background: var(--accent);
  border-color: rgba(20, 20, 24, 0.08);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* —— Home —— */

.home-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: stretch;
  padding: 1rem 0 2.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 0.85rem;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.home-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.home-hero .lead {
  margin: 0 0 1.5rem;
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 38ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.35rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, filter 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--border);
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.hero-panel-head img {
  height: 52px;
  border-radius: 12px;
}

.status-chip {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--ink);
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.meta-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

.meta-tile span {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 0.25rem;
}

.meta-tile strong {
  font-size: 0.875rem;
  font-weight: 600;
  word-break: break-all;
}

.meta-tile code {
  font-size: 0.8rem;
}

.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.strip-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.strip-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.strip-icon.yellow { background: var(--accent-soft); }
.strip-icon.violet { background: var(--violet-soft); }
.strip-icon.blue { background: rgba(50, 156, 252, 0.12); }

.strip-item h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.strip-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 32ch;
  text-align: right;
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.bento-card {
  grid-column: span 4;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.bento-card:hover {
  border-color: rgba(20, 20, 24, 0.18);
  box-shadow: var(--shadow-sm);
}

.bento-card.wide {
  grid-column: span 8;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg) 55%);
}

.bento-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 0.5rem;
}

.bento-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.bento-card p {
  margin: 0 0 auto;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.bento-link {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.bento-link:hover {
  color: var(--accent-ink);
  text-decoration: none;
}

.faq {
  margin-bottom: 3rem;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  margin-bottom: 0.65rem;
  overflow: hidden;
}

.faq summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.faq summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--muted);
}

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

.faq .faq-body {
  padding: 0 1.15rem 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* —— Legal docs —— */

.page-doc .doc-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
  padding-bottom: 4rem;
}

.doc-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1.25rem);
}

.doc-sidebar-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.doc-sidebar h2 {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.doc-toc {
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-toc a {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border-left: 2px solid transparent;
  line-height: 1.35;
}

.doc-toc a:hover {
  color: var(--ink);
  background: var(--bg);
  text-decoration: none;
}

.doc-toc a.is-active {
  color: var(--ink);
  font-weight: 600;
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.doc-main {
  min-width: 0;
}

.doc-hero {
  margin-bottom: 1.75rem;
}

.doc-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.03em;
}

.doc-meta {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.callout {
  margin: 1.5rem 0;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--violet-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.callout.warn {
  background: var(--accent-soft);
}

.doc-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.doc-section:last-of-type {
  border-bottom: none;
}

.doc-section h2 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.section-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--violet);
  letter-spacing: 0.04em;
}

.doc-section p,
.doc-section li {
  font-size: 0.9375rem;
  color: rgba(20, 20, 24, 0.88);
}

.doc-section ul {
  padding-left: 1.2rem;
}

.doc-section li {
  margin-bottom: 0.4rem;
}

/* —— Support —— */

.support-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1.5rem;
  padding-bottom: 4rem;
  align-items: start;
}

.support-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.info-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.info-card p,
.info-card li {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.info-list li {
  display: flex;
  gap: 0.65rem;
}

.info-list strong {
  color: var(--ink);
  min-width: 4.5rem;
}

.topic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.topic-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
}

.form-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.form-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.form-card .sub {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 0.35rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(143, 116, 0, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 222, 2, 0.28);
  background: var(--bg);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.form-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--muted-2);
}

/* —— Footer —— */

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
}

.footer-grid h3 {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.footer-grid p,
.footer-grid a {
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-links {
  display: grid;
  gap: 0.4rem;
}

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted-2);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: space-between;
}

code {
  font-size: 0.85em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* —— Responsive —— */

@media (max-width: 900px) {
  .home-hero,
  .support-layout,
  .page-doc .doc-layout {
    grid-template-columns: 1fr;
  }

  .doc-sidebar {
    position: static;
  }

  .bento-card,
  .bento-card.wide {
    grid-column: span 12;
  }

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

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

  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head p {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-pills {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
  }

  .nav-pills.is-open {
    display: flex;
  }

  .topbar .shell {
    position: relative;
  }
}
