/* ═══════════════════════════════════════
   NeuroBlocks — Premium Design System
   ═══════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  color-scheme: light;

  /* Palette — warm, sophisticated */
  --charcoal:    #1a1a2e;
  --charcoal-l:  #2d2d44;
  --warm-white:  #faf9f7;
  --cream:       #f5f0eb;
  --stone:       #e8e2da;
  --taupe:       #8a8178;
  --muted:       #6b6560;

  /* Accents */
  --gold:        #c9a84c;
  --gold-light:  #dfc278;
  --rose:        #c47d7d;
  --sage:        #7a9e7e;

  /* Surfaces */
  --bg:          var(--warm-white);
  --card:        #ffffff;
  --line:        var(--stone);
  --line-subtle: #eee9e3;

  /* Typography */
  --font-serif:  "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans:   "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Spacing & sizing */
  --max-w:       1200px;
  --max-w-narrow: 720px;
  --header-h:    72px;
  --radius:      12px;
  --radius-sm:   8px;

  /* Effects */
  --shadow-sm:   0 1px 3px rgba(26, 26, 46, 0.04);
  --shadow-md:   0 4px 24px rgba(26, 26, 46, 0.06);
  --shadow-lg:   0 12px 48px rgba(26, 26, 46, 0.08);
  --shadow-xl:   0 24px 64px rgba(26, 26, 46, 0.12);

  /* Transitions */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --duration:    0.35s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  width: 100%;
}

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

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Skip Link ── */
.skip-link {
  position: absolute;
  left: 1.5rem;
  top: 1.5rem;
  z-index: 100;
  transform: translateY(-200%);
  background: var(--charcoal);
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: transform 0.25s var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
}

/* ═══════════════════════════════════
   Header / Navigation
   ═══════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: rgba(250, 249, 247, 0.85);
  backdrop-filter: saturate(1.6) blur(20px);
  -webkit-backdrop-filter: saturate(1.6) blur(20px);
  border-bottom: 1px solid var(--line-subtle);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 1.5rem;
}

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

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3) 0 10%, transparent 11%),
    linear-gradient(135deg, var(--gold), var(--rose));
  flex-shrink: 0;
}
.brand-mark.small {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
}
.nav-links a:hover {
  color: var(--charcoal);
  background: rgba(0,0,0,0.03);
}
.nav-link-subtle {
  font-weight: 400 !important;
  font-size: 0.8125rem !important;
}

/* ═══════════════════════════════════
   Hero Section
   ═══════════════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--charcoal);
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.hero-image-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.72) contrast(1.05);
  transform: scale(1.02);
  transition: transform 8s var(--ease);
}
.hero:hover .hero-image {
  transform: scale(1.04);
}

.hero-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26, 26, 46, 0.15) 0%,
    rgba(26, 26, 46, 0.05) 40%,
    rgba(26, 26, 46, 0.45) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  z-index: 2;
  width: var(--max-w);
  max-width: calc(100% - 3rem);
  padding: 0 0 clamp(3rem, 8vw, 5.5rem);
  color: #fff;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
  white-space: nowrap;
}
.hero-label::before {
  content: "";
  width: 20px;
  height: 1.5px;
  background: var(--gold);
  border-radius: 1px;
}

.hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(3.2rem, 7vw, 6.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.hero-copy {
  max-width: 42rem;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.65;
  margin-bottom: 2rem;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0.7rem 1.6rem;
  background: #fff;
  color: var(--charcoal);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  border-radius: 100px;
  border: none;
  transition: background var(--duration) var(--ease), transform 0.2s var(--ease);
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0.7rem 1.6rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

/* ═══════════════════════════════════
   Divider
   ═══════════════════════════════════ */
.divider {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0;
}
.divider span {
  display: block;
  width: var(--max-w);
  max-width: calc(100% - 3rem);
  margin: 0 auto;
  height: 1px;
  background: var(--line-subtle);
}

/* ═══════════════════════════════════
   Sections
   ═══════════════════════════════════ */
.section {
  padding: clamp(4rem, 10vw, 7rem) 0;
}

.section-inner {
  width: var(--max-w);
  max-width: calc(100% - 3rem);
  margin: 0 auto;
}

.section-header {
  max-width: var(--max-w-narrow);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.section-label::before {
  content: "";
  width: 20px;
  height: 1.5px;
  background: var(--gold);
  border-radius: 1px;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
  color: var(--charcoal);
}

.section-desc {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Feature Cards ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  padding: 2rem;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), transform 0.25s var(--ease);
}
.feature-card:hover {
  border-color: var(--stone);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, var(--warm-white));
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
  color: var(--charcoal);
}
.feature-card p {
  font-size: 0.925rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Privacy / Legal Cards ─ */
.legal-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.legal-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 2rem;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), transform 0.25s var(--ease);
}
.legal-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.legal-card-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--gold) 8%, var(--warm-white));
  color: var(--gold);
}
.legal-card-icon svg {
  width: 22px;
  height: 22px;
}

.legal-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--charcoal);
}
.legal-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ═══════════════════════════════════
   Footer
   ═══════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--line-subtle);
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.7);
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.8rem 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
}

.footer-nav {
  display: flex;
  gap: 0.25rem;
}
.footer-nav a {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
}
.footer-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.footer-copy {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ═══════════════════════════════════
   Legal Pages
   ═══════════════════════════════════ */
.legal-main {
  width: var(--max-w-narrow);
  max-width: calc(100% - 3rem);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.legal-header {
  margin-bottom: 3rem;
}

.legal-header .hero-label {
  color: var(--gold);
}
.legal-header .hero-label::before {
  background: var(--gold);
}

.legal-main h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--charcoal);
}

.legal-date {
  font-size: 0.875rem;
  color: var(--taupe);
  font-weight: 500;
}

.legal-doc {
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
}

.legal-intro {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

.legal-doc h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.legal-doc h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal-l);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-doc p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

.legal-doc ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.legal-doc li {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 0.35rem;
}
.legal-doc li::marker {
  color: var(--stone);
}

.legal-contact {
  margin-top: 0.5rem;
}
.legal-contact a {
  color: var(--gold);
  font-weight: 500;
  transition: color var(--duration) var(--ease);
}
.legal-contact a:hover {
  color: var(--gold-light);
}

/* ── Responsive ─ */
@media (max-width: 1100px) {
  .hero-content h1 {
    font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  }
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 7vw, 3.5rem);
  }
}

@media (max-width: 820px) {
  .legal-cards {
    grid-template-columns: 1fr;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    padding: 1rem 0;
    gap: 0.75rem;
  }

  .nav-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .hero-actions {
    flex-direction: column;
  }
  .btn-primary,
  .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .footer-nav {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
