/*
 * Obsecura shared brand layer.
 *
 * Single source of truth for design tokens, the page chrome (top bar, header,
 * nav, footer) and the shared surface primitives. Every page links this FIRST
 * and then adds only what is specific to that page.
 *
 * The three pages previously each carried their own copy of these rules and
 * drifted: different logos, three different navs, and the spam classifier was
 * still branded with the old name. Anything that should look the same on every
 * page belongs here, not in a page.
 */

:root {
  --ground: #17130f;
  --surface: #211b16;
  --surface-2: #2b2319;
  --hairline: #3a2f24;
  --ink: #f2e9dd;
  --ink-dim: #ab9c8a;
  --ink-faint: #6f6355;
  --accent: #cc785c;
  --accent-strong: #e08a6a;
  --accent-wash: rgba(204, 120, 92, 0.14);
  --signal: #8fd6c4;
  --signal-wash: rgba(143, 214, 196, 0.12);
  --good: #8fbf87;
  --warn: #d9ab5c;
  --bad: #d97575;
  --serif: ui-serif, "Iowan Old Style", "Sitka Text", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

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

body {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(242, 233, 221, 0.02) 0px,
      rgba(242, 233, 221, 0.02) 1px,
      transparent 1px,
      transparent 3px
    ),
    var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ------------------------------------------------------------ page chrome */

.top-bar {
  background: var(--accent-wash);
  border-bottom: 1px solid var(--hairline);
  height: 36px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--hairline);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  text-decoration: none;
}

.brand-rule {
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
}

/* The mark sits on a cream tile so the key reads as a solid app-style icon
   rather than a shape floating on the dark ground. object-fit keeps the tall
   key centred inside the square tile without distorting it. */
.logo-mark-img {
  height: 48px;
  width: 48px;
  display: block;
  object-fit: contain;
  background: var(--ink);
  border-radius: 12px;
  padding: 7px;
}

nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

nav a { color: var(--ink-dim); text-decoration: none; transition: color 0.15s ease; }
nav a:hover { color: var(--ink); }
nav a.current { color: var(--ink); }

.badge-soon {
  font-size: 0.62rem;
  border: 1px solid var(--hairline);
  color: var(--ink-faint);
  padding: 2px 6px;
  margin-left: 6px;
  letter-spacing: 0.05em;
}

/* ---------------------------------------------------------- models menu */

.nav-dropdown { position: relative; }

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--ink-dim);
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}
.nav-dropdown-trigger:hover,
.nav-dropdown-trigger[aria-expanded="true"] { color: var(--ink); }

.nav-dropdown-trigger .chevron {
  width: 9px;
  height: 9px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.7;
}
.nav-dropdown-trigger[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translate(-50%, -8px) scale(0.97);
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 40;
}
/* bridges the gap so the menu does not close while the pointer crosses it */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -16px; left: 0; right: 0; height: 16px;
}
.nav-dropdown-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.nav-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease;
}
.nav-dropdown-item:hover,
.nav-dropdown-item:focus-visible { background: var(--surface-2); }
.nav-dropdown-item:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }

/* Unreleased entries stay visible but inert - listing something that cannot be
   clicked is clearer than hiding it and clearer than a dead link. */
.nav-dropdown-item.pending {
  cursor: default;
  opacity: 0.55;
}
.nav-dropdown-item.pending:hover { background: none; }

.item-icon {
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--surface-2);
}
.nav-dropdown-item.active .item-icon { color: var(--signal); border-color: var(--signal); }
.nav-dropdown-item.pending .item-icon { color: var(--ink-faint); }

.item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.item-title {
  font-size: 0.86rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
}
.item-desc { font-size: 0.74rem; color: var(--ink-faint); line-height: 1.35; }
.item-current-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--signal); flex: none;
}
.item-soon {
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border: 1px solid var(--hairline);
  color: var(--ink-faint);
  padding: 1px 5px;
  border-radius: 3px;
}

/* -------------------------------------------------------------- layout */

main { max-width: 1040px; margin: 0 auto; padding: 68px 40px 48px; }

.hero { max-width: 700px; margin-bottom: 52px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--signal);
  display: inline-block;
  animation: pulse 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .eyebrow::before { animation: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  line-height: 1.14;
  text-wrap: balance;
  margin-bottom: 20px;
}

.hero p { color: var(--ink-dim); font-size: 1.02rem; max-width: 60ch; }

/* The h1 carries the model name, so the old tagline moves here: still
   prominent, clearly subordinate to the name.
   Qualified as `.hero p.hero-lede` because `.hero p` above is more specific
   than a lone class and would otherwise win on font-size. */
.hero p.hero-lede {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.35;
  color: var(--ink);
  max-width: 46ch;
  margin-bottom: 18px;
  text-wrap: balance;
}
.hero h1 { margin-bottom: 14px; }

.panel { background: var(--surface); padding: 22px; }

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 16px;
}

textarea {
  width: 100%;
  min-height: 260px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--ink);
  padding: 16px;
  font-family: var(--sans);
  font-size: 0.92rem;
  resize: vertical;
}
textarea::placeholder { color: var(--ink-faint); }
textarea:focus { outline: none; border-color: var(--accent); }

button.scan-btn {
  width: 100%;
  margin-top: 16px;
  background: var(--accent);
  color: #1b120c;
  border: none;
  padding: 14px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
button.scan-btn:hover { background: var(--accent-strong); }
button.scan-btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
button.scan-btn:disabled { background: var(--surface-2); color: var(--ink-faint); cursor: not-allowed; }

.info-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.info-card { background: var(--surface); padding: 26px; }
.info-card h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 12px;
}
.info-card p, .info-card li { color: var(--ink-dim); font-size: 0.88rem; }
.info-card ul { padding-left: 18px; margin-top: 6px; }
.info-card li { margin-bottom: 7px; }
.limits-title { color: var(--warn); }

footer {
  border-top: 1px solid var(--hairline);
  padding: 26px 40px;
  text-align: center;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

@media (max-width: 800px) {
  header { padding: 18px 20px; }
  main { padding: 48px 20px 36px; }
  nav { gap: 18px; }
  .info-section { grid-template-columns: 1fr; }
  .nav-dropdown-menu {
    left: auto; right: 0;
    transform: translate(0, -8px) scale(0.97);
    width: 280px;
  }
  .nav-dropdown-menu.open { transform: translate(0, 0) scale(1); }
}
