/* ==========================================================================
   Unonico — website styles
   Dark theme mirroring the app: Instagram-blue accent on near-black surfaces,
   system font stack (the app ships no custom font), 5px controls / 8px cards.
   ========================================================================== */

:root {
  /* Brand */
  --brand: #3797ef;
  --brand-dark: #2a75c4;
  --on-brand: #ffffff;

  /* Surfaces */
  --bg: #000000;
  --surface: #121212;
  --surface-2: #1a1a1a;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.20);

  /* Text */
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.66);
  --text-dim: rgba(255, 255, 255, 0.45);

  /* Feedback */
  --success: #67ce00;
  --error: #ed4956;

  /* Shape (matches app: buttons/inputs 5px, cards 8px) */
  --radius-sm: 5px;
  --radius: 8px;
  --radius-lg: 16px;

  /* Layout */
  --maxw: 1080px;
  --maxw-prose: 720px;
  --header-h: 60px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Layout ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 72px 0;
}
.section--tight {
  padding: 48px 0;
}
.section-eyebrow {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0 0 16px;
}
.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 60ch;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: var(--on-brand);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* Header / nav ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #000000;
  color: var(--text);
  border: 1px solid var(--border-strong);
  font-weight: 800;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  width: 40px;
  height: 38px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg {
  width: 22px;
  height: 22px;
}

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.btn:hover {
  text-decoration: none;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
}
.btn-primary:hover {
  background: var(--brand-dark);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--surface-2);
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Hero -------------------------------------------------------------------- */
.hero {
  padding: 96px 0 72px;
  background:
    radial-gradient(60% 90% at 50% -10%, rgba(55, 151, 239, 0.18), transparent 70%),
    var(--bg);
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  margin: 0 auto 18px;
  max-width: 16ch;
}
.hero .lead {
  margin: 0 auto;
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
}
.hero .btn-row {
  justify-content: center;
}
.pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
  border: 1px solid rgba(55, 151, 239, 0.4);
  background: rgba(55, 151, 239, 0.08);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

/* Feature grid ------------------------------------------------------------ */
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}
.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.card h3 {
  font-size: 1.15rem;
  margin: 14px 0 8px;
}
.card p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.98rem;
}
.card-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(55, 151, 239, 0.12);
  color: var(--brand);
}
.card-icon svg {
  width: 24px;
  height: 24px;
}

/* Split / callout --------------------------------------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* Prose (legal + long-form) ---------------------------------------------- */
.prose {
  max-width: var(--maxw-prose);
  margin: 0 auto;
}
.prose h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
}
.prose h2 {
  font-size: 1.35rem;
  margin-top: 2em;
  padding-top: 0.4em;
}
.prose h3 {
  font-size: 1.1rem;
  margin-top: 1.6em;
}
.prose p,
.prose li {
  color: var(--text-muted);
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
  margin: 0 0 1em;
}
.prose li {
  margin-bottom: 0.5em;
}
.prose strong {
  color: var(--text);
}
.updated {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 2em;
}
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 2.5em;
}
.toc p {
  font-weight: 600;
  color: var(--text);
  margin: 0 0 10px;
}
.toc ol {
  margin: 0;
  color: var(--text-muted);
}

/* Contact / definition rows ---------------------------------------------- */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 1.5em 0;
}
.contact-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 20px;
}
.contact-card dt {
  color: var(--text-dim);
  font-size: 0.95rem;
}
.contact-card dd {
  margin: 0;
  color: var(--text);
}

/* Footer ------------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 56px 0 40px;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
}
.footer-brand {
  max-width: 320px;
}
.footer-brand .brand {
  margin-bottom: 12px;
}
.footer-cols {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.footer-cols h4 {
  color: var(--text);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 14px;
}
.footer-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-cols li {
  margin-bottom: 10px;
}
.footer-cols a {
  color: var(--text-muted);
}
.footer-cols a:hover {
  color: var(--text);
}
.footer-legal {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.footer-legal address {
  font-style: normal;
}

/* Utilities --------------------------------------------------------------- */
.text-center {
  text-align: center;
}
.mt-0 { margin-top: 0; }
.stack > * + * {
  margin-top: 16px;
}
.eyebrow-center {
  text-align: center;
}
.section-head {
  max-width: 60ch;
  margin: 0 auto 44px;
  text-align: center;
}
.section-head .lead {
  margin: 0 auto;
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 860px) {
  .grid,
  .grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }
  .section {
    padding: 56px 0;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px;
    display: none;
  }
  .nav-links.is-open {
    display: flex;
  }
  .nav-links a {
    padding: 14px 12px;
    border-radius: var(--radius-sm);
  }
  .grid,
  .grid--2 {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 28px 22px;
  }
  .contact-card dl {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }
  .contact-card dd {
    margin-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
