/* ==========================================================================
   Base theme — Febus AI
   Imports tokens, sets the dark base, and defines shared chrome
   (nav, buttons, footer, reveal). Section/component styles live in
   components.css. Borders are 0.5px; no gradients/shadows/glow.
   ========================================================================== */
@import "tokens.css";

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-bright);
  line-height: 1.15;
  font-weight: 500;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.125rem, 5.5vw, 3.375rem); line-height: 1.12; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.625rem, 3.5vw, 2.125rem); line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 1.1875rem; font-weight: 600; }

p { margin: 0 0 1rem; color: var(--ink-dim); }
em { color: var(--accent-2); font-style: normal; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ink-bright); }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space);
}

.section { padding-block: var(--section-y); }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.625rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  border: 0.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); color: var(--accent-ink); }
.btn-teal { background: var(--teal); color: var(--accent-ink); }
.btn-teal:hover { background: #7ddbb9; color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink-faint); background: var(--bg-soft); color: var(--ink); }

/* --- Sticky blurred nav -------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 14, 18, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 0.5px solid var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
}
.nav__logo img { height: 26px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 1.5rem; }
.nav__links a { color: var(--ink-dim); font-size: 0.875rem; }
.nav__links a:hover { color: var(--ink-bright); }
.nav__links .btn { padding: 0.5rem 1.1rem; font-size: 0.875rem; }
.nav__lang a { color: var(--ink-dim); font-weight: 500; }
.nav__lang a.is-active { color: var(--ink-bright); }

/* Hamburger — hidden on desktop, shown on mobile. */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav__toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  margin-inline: auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 720px) {
  /* No-JS fallback: links stay visible and wrap. The .js flag switches to the
     collapsible panel only when the toggle can actually work. */
  .nav__links { flex-wrap: wrap; }
  .nav__links a { padding-block: 0.5rem; }

  .js .nav__toggle { display: flex; }
  .js .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.75rem var(--space) 1.25rem;
    background: var(--bg-soft);
    border-bottom: 0.5px solid var(--line);
    display: none;
  }
  .js .nav__links.is-open { display: flex; }
  .js .nav__links .btn { margin-top: 0.5rem; }
  .js .nav__lang { margin-top: 0.5rem; }
}

/* --- Footer -------------------------------------------------------------- */
.footer {
  border-top: 0.5px solid var(--line);
  padding-block: 2rem;
  font-size: 0.8125rem;
  color: var(--ink-faint);
}
.footer a { color: var(--ink-dim); }
.footer a:hover { color: var(--ink-bright); }
.footer__legal { color: var(--ink-faint); font-size: 0.8125rem; margin-top: 1rem; }

/* --- Page-load reveal ---------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal var(--reveal) var(--ease) forwards;
}
.reveal[data-delay="1"] { animation-delay: 80ms; }
.reveal[data-delay="2"] { animation-delay: 160ms; }
.reveal[data-delay="3"] { animation-delay: 240ms; }
@keyframes reveal {
  to { opacity: 1; transform: none; }
}
