/* ============================================================
   EYE LOVE FRAMES — BASE STYLES
   Reset, typography scale, utilities
   ============================================================ */

@import url('tokens.css');

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

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-white);
  background-color: var(--color-bg);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

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

/* ── Typography Scale ───────────────────────────────────── */

.t-display {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

.t-h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
}

.t-h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: var(--lh-snug);
}

.t-h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  line-height: var(--lh-snug);
}

.t-h4 {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: var(--lh-snug);
}

.t-body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--color-text-muted);
}

.t-body-lg {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--color-text-muted);
}

.t-label {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-primary-light);
}

.t-muted {
  color: var(--color-text-muted);
}

.t-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout Utilities ───────────────────────────────────── */

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

.container--wide {
  max-width: var(--container-xl);
}

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

.section--sm {
  padding-block: var(--sp-12);
}

.section--lg {
  padding-block: clamp(var(--sp-20), 8vw, var(--sp-32));
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-2 { gap: var(--sp-2); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }

/* ── Section Header ─────────────────────────────────────── */

.section-header {
  text-align: center;
  margin-bottom: var(--sp-16);
}

.section-header .t-label {
  margin-bottom: var(--sp-4);
}

.section-header .t-h2 {
  margin-bottom: var(--sp-4);
}

.section-header p {
  max-width: 56ch;
  margin-inline: auto;
  color: var(--color-text-muted);
}

/* ── Divider Line ───────────────────────────────────────── */

.divider-line {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--gradient-brand);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.9s var(--ease-out);
}

.divider-line.is-visible {
  transform: scaleX(1);
}

/* ── Accessibility ──────────────────────────────────────── */

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

:focus-visible {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4, 1rem);
  z-index: 10000;
  background: var(--color-bg-raised, #1a1a1a);
  color: var(--color-white, #fff);
  padding: var(--sp-3, 0.75rem) var(--sp-5, 1.25rem);
  border-radius: 0 0 var(--radius-md, 8px) var(--radius-md, 8px);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--dur-fast, 0.15s) var(--ease-out, ease);
}

.skip-link:focus {
  top: 0;
}

/* ── Anchor scroll offset — clears fixed nav ────────────── */
[id] {
  scroll-margin-top: calc(var(--nav-height) + var(--sp-4));
}

/* ── Responsive Breakpoints ─────────────────────────────── */

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding-block: var(--sp-12); }
  .section--lg { padding-block: var(--sp-16); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .container { padding-inline: var(--sp-4); }
  .section-header { margin-bottom: var(--sp-10); }
}

/* ── Mobile tap targets ─────────────────────────────────── */
@media (max-width: 768px) {
  /* Hero CTA buttons stack vertically and go full width on small screens */
  .hero__ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .hero__ctas .btn {
    width: 100%;
    min-height: 52px;
    justify-content: center;
  }
  /* General button min tap height on mobile */
  .btn--sm {
    min-height: 44px;
  }
}
