/* ISAEV — Base styles, reset, typography, utilities */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.5;
}

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

a { color: inherit; }

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

::selection { background: var(--isaev-blue-mist); color: var(--isaev-blue-deep); }

/* ─── Reusable typography ─── */
.eyebrow {
  font-size: 12px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue);
}

.serif { font-family: var(--font-serif); font-weight: 300; }
.italic { font-style: italic; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 17px; font-weight: 400;
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background var(--dur-fast), color var(--dur-fast),
              border-color var(--dur-fast), transform .15s;
  white-space: nowrap;
}
.btn:hover { transform: scale(1.02); }
.btn svg { transition: transform var(--dur-fast); }
.btn:hover svg { transform: translateX(3px); }

.btn-blue {
  background: var(--blue); color: #fff;
}
.btn-blue:hover { background: var(--blue-dark); }

.btn-black {
  background: var(--black); color: #fff;
}
.btn-black:hover { background: #000; }

.btn-white-outline {
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.3);
}
.btn-white-outline:hover { border-color: rgba(255,255,255,.7); color: #fff; }

.btn-outline-dark {
  color: var(--black);
  border: 1px solid rgba(0,0,0,.22);
}
.btn-outline-dark:hover { border-color: var(--black); background: rgba(0,0,0,.04); }

/* ─── Containers ─── */
.container       { max-width: var(--container);        margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--gutter); }
.container-text   { max-width: var(--container-text);   margin: 0 auto; padding: 0 var(--gutter); }

/* ─── Section heads ─── */
.section-head {
  text-align: center; margin-bottom: 64px;
}
.section-head h2 {
  font-family: var(--font-serif); font-weight: 300;
  font-size: clamp(32px, 4vw, 48px);
  color: var(--black); margin-bottom: 14px;
}
.section-head p {
  font-size: 17px; font-weight: 300;
  color: var(--gray);
  max-width: 420px; margin: 0 auto; line-height: 1.65;
}

/* ─── Scroll reveal (used by IntersectionObserver in animations.js) ─── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* ─── Keyframes ─── */
@keyframes up {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── View Transitions API (graceful fallback) ─── */
@view-transition { navigation: auto; }

::view-transition-old(root) {
  animation: 280ms cubic-bezier(.4,0,.2,1) both fade-out;
}
::view-transition-new(root) {
  animation: 360ms cubic-bezier(.4,0,.2,1) both fade-in;
}

@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in  { from { opacity: 0; } }

/* ─── Visually hidden (a11y) ─── */
.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;
}
