/* ============================================================
   AYDUS TECHNOLOGIES — Design System
   ============================================================ */

/* ── Custom Properties (Light Mode) ──────────────────────── */
:root {
  --bg:            #F9F8F6;
  --surface:       #FFFFFF;
  --border:        #E5E3DF;
  --text:          #0F0F0D;
  --text-muted:    #6B6860;
  --accent:        #D4500A;
  --accent-hover:  #B84308;

  --font:          'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;

  --nav-h:         64px;
  --max-w:         1120px;
  --pad-x:         clamp(1.25rem, 5vw, 2rem);

  --ease:          cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0D0C0B;
    --surface:       #161512;
    --border:        #2A2825;
    --text:          #F0EDE8;
    --text-muted:    #8C8880;
    --accent:        #E86020;
    --accent-hover:  #F07030;
  }
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

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

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* ── Focus ───────────────────────────────────────────────── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Reduced Motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

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

/* ── Layout Container ────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* ── Navigation ──────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav.scrolled {
  border-color: var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.15s;
}
.nav-logo:hover { opacity: 0.7; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 0.375rem;
  border-radius: 4px;
  transition: background 0.15s;
}
.nav-toggle:hover { background: var(--border); }

/* ── Mobile Nav ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .nav-links {
    display: none;
    position: fixed;
    inset: var(--nav-h) 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.25rem; }
  .nav-toggle { display: flex; }
}

/* ── Main ────────────────────────────────────────────────── */
main { padding-top: var(--nav-h); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.6875rem 1.375rem;
  border-radius: 4px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  padding-block: clamp(5rem, 12vw, 9rem) clamp(5rem, 10vw, 8rem);
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-headline {
  font-size: clamp(2.75rem, 7.5vw, 5.75rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  max-width: 14ch;
  margin-bottom: 1.75rem;
}

.hero-body {
  font-size: clamp(1rem, 2.2vw, 1.1875rem);
  color: var(--text-muted);
  max-width: 50ch;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* ── Sections (shared) ───────────────────────────────────── */
.section {
  padding-block: clamp(4rem, 9vw, 7rem);
  border-bottom: 1px solid var(--border);
}

.section-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: clamp(1.625rem, 3.5vw, 2.5rem);
  margin-bottom: 1.5rem;
}

.section-body {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 58ch;
  line-height: 1.75;
}
.section-body + .section-body { margin-top: 1rem; }

/* ── Pillars ─────────────────────────────────────────────── */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 3rem 3.5rem;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.pillar-num {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.875rem;
}

.pillar-title {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.625rem;
  line-height: 1.3;
}

.pillar-body {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Text links (inline) ─────────────────────────────────── */
.text-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.text-link:hover { text-decoration-color: var(--text); }

/* ── CTA Section ─────────────────────────────────────────── */
.cta-section {
  padding-block: clamp(5rem, 11vw, 9rem);
}

.cta-title {
  font-size: clamp(2rem, 5vw, 3.75rem);
  max-width: 20ch;
  margin-bottom: 1.25rem;
}

.cta-body {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 46ch;
  line-height: 1.7;
  margin-bottom: 2.25rem;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding-block: 2.25rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-links,
.footer-social {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.footer-links a,
.footer-social a {
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-links a:hover,
.footer-social a:hover { color: var(--text); }

/* ── Cookie Banner ───────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  inset: auto var(--pad-x) 1.5rem;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.375rem 1.5rem;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.06);
  display: none;
}

.cookie-banner.visible { display: block; }

.cookie-banner p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.cookie-banner a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-actions {
  display: flex;
  gap: 0.625rem;
}

.btn-accept,
.btn-decline {
  padding: 0.5rem 1.125rem;
  font-size: 0.875rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  border: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-accept {
  background: var(--accent);
  color: #FFFFFF;
}
.btn-accept:hover { background: var(--accent-hover); }

.btn-decline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-decline:hover { color: var(--text); border-color: var(--text-muted); }

/* ── Legal Pages ─────────────────────────────────────────── */
.legal-wrap {
  padding-block: clamp(3rem, 7vw, 5rem) clamp(4rem, 9vw, 7rem);
}

.legal-content {
  max-width: 720px;
}

.legal-content h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 0.5rem;
}

.legal-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.legal-content h2 {
  font-size: 1.1875rem;
  margin-top: 2.75rem;
  margin-bottom: 0.875rem;
}

.legal-content p,
.legal-content li {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 0.875rem;
}

.legal-content ul,
.legal-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 1.5rem;
  font-size: 0.9rem;
}

.legal-content th,
.legal-content td {
  text-align: left;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  line-height: 1.5;
}

.legal-content th {
  background: color-mix(in srgb, var(--border) 30%, transparent);
  font-weight: 600;
  color: var(--text);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

/* ── 404 Page ────────────────────────────────────────────── */
.not-found {
  min-height: calc(100vh - var(--nav-h) - 1px);
  display: flex;
  align-items: center;
  padding-block: 5rem;
}

.not-found-inner {
  max-width: 480px;
}

.not-found-code {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.not-found h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 1rem;
}

.not-found p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* ── Utility ─────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
