/* ==========================================================================
   GEDHome 2.0 — Base, Accessibility, Typography & Ambient Texture
   ========================================================================== */

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

html {
  background: var(--bg-obsidian);
  color: var(--ink-light);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: clip;
}

html.lenis, html.lenis body {
  height: auto;
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--bg-obsidian);
  color: var(--ink-light);
  line-height: 1.6;
}

[hidden] {
  display: none !important;
}

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

img {
  height: auto;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Accessible Skip Link */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: var(--bg-obsidian);
  font-weight: 700;
  border-radius: var(--r-xs);
  transition: top var(--dur-fast);
}

.skip-link:focus {
  top: 1rem;
}

/* Visible Keyboard Focus (WCAG 2.2 AA) */
:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
}

/* Layout Containers */
.container {
  width: min(var(--container-max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.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;
}

/* Architectural Progress Line */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  z-index: var(--z-progress);
  pointer-events: none;
}

.scroll-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-hi));
  transform-origin: left;
}

/* Subtle Architectural Concrete Grain (static lightweight noise) */
.ambient-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-grain);
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Shared Architectural Typography */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.kicker::before {
  content: '';
  width: 24px;
  height: 1px;
  background: currentColor;
}

.kicker--dark {
  color: var(--gold-deep);
}

.section-heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-2xl);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.section-intro {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.65;
  max-width: 52ch;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(1.5rem, 3vw, 3.5rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 4.5vw, 4.2rem);
}

/* Buttons — Architectural Precision */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.55rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--r-xs);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast) var(--ease-arch);
}

.btn--sm {
  padding: 0.62rem 1.15rem;
  font-size: 0.82rem;
}

.btn--block {
  width: 100%;
}

.btn--gold {
  background: var(--gold);
  color: var(--bg-obsidian);
}

.btn--gold:hover {
  background: var(--gold-hi);
}

.btn--ghost-light {
  background: rgba(12, 11, 10, 0.42);
  color: var(--ink-light);
  border-color: var(--line-dark-strong);
  backdrop-filter: blur(8px);
}

.btn--ghost-light:hover {
  border-color: var(--gold);
  color: var(--gold-hi);
}

.btn--ghost-dark {
  background: transparent;
  color: var(--ink-dark);
  border-color: var(--line-light-strong);
}

.btn--ghost-dark:hover {
  background: var(--ink-dark);
  color: var(--ink-light);
}

.btn--whatsapp {
  background: var(--wa);
  color: #ffffff;
}

.btn--whatsapp:hover {
  background: var(--wa-hover);
}

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

@media (max-width: 960px) {
  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
  }
}
