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

/* ---------- VARIABLES ---------- */
:root {
  --bg:              #F4EFE6;
  --text:            #1A1A1A;
  --muted:           #6C6C67;
  --border:          rgba(26, 26, 26, 0.1);
  --transition-fast: 0.2s ease;
}

/* ---------- THEMES ---------- */
:root[data-theme="warm"]    { --bg: #F4EFE6; --text: #1A1A1A; --muted: #6C6C67; --border: rgba(26,26,26,0.10); }
:root[data-theme="dark"]    { --bg: #1A1A1A; --text: #F4EFE6; --muted: #9C9C94; --border: rgba(244,239,230,0.12); }

/* ---------- FONTS (self-hosted, ./fonts/) ---------- */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorantgaramond/CormorantGaramond-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0420, U+0430, U+043C-043E;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibmplexmono/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020, U+0028-0029, U+002B-002C, U+002E, U+0030-0032, U+0034-003A, U+0041, U+0061, U+0063, U+0069, U+006C, U+006F, U+0073-0076, U+00A9, U+00B7, U+0417, U+041E-041F, U+0421, U+0427, U+0430-0435, U+0437-0449, U+044B-044C, U+044E-044F;
}

/* ---------- BASE ---------- */
body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-family: 'IBM Plex Mono', 'Courier New', Courier, monospace;
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ---------- NAVIGATION ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 2rem;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 10;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  background: var(--text);
  color: var(--bg);
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 100px;
  transition: opacity var(--transition-fast), transform var(--transition-fast),
              background-color 0.3s ease, color 0.3s ease;
}

.nav__link:hover  { opacity: 0.7; transform: translateY(-1px); }
.nav__link:active { transform: translateY(0); }

/* ---------- MAIN ---------- */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 120px 2rem 5rem;
  text-align: center;
}

.hero {
  max-width: 760px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- ANIMATION ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeInUp 0.9s ease forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Staggered delays — each selector matches actual HTML classes */
.hero__name     { animation-delay: 0s; }
.hero__subtitle { animation-delay: 0.15s; }
.hero__phone    { animation-delay: 0.3s; }
.hero__services { animation-delay: 0.35s; }
.hero__desc     { animation-delay: 0.4s; }
.footer         { animation-delay: 0.45s; }

/* ---------- HERO ELEMENTS ---------- */
.hero__name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: clamp(80px, 16vw, 160px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.75rem;
}

.hero__subtitle {
  font-size: clamp(13px, 1.6vw, 16px);
  color: var(--muted);
  line-height: 1.9;
  letter-spacing: 0.01em;
  margin-bottom: 0.75rem;
  max-width: 90%;
}

.hero__phone {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 2.25rem;
  background: var(--text);
  color: var(--bg);
  font-family: inherit;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 100px;
  transition: opacity var(--transition-fast), transform var(--transition-fast),
              background-color 0.3s ease, color 0.3s ease;
  margin-bottom: 5rem;
}

.hero__phone:hover  { opacity: 0.7; transform: translateY(-2px); }
.hero__phone:active { transform: translateY(0); opacity: 0.9; }

/* Focus styles for keyboard navigation */
.nav__link:focus-visible,
.hero__phone:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: 100px;
}

.hero__services {
  font-size: clamp(12px, 1.4vw, 14px);
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

.hero__desc {
  font-size: clamp(12px, 1.35vw, 14px);
  color: var(--muted);
  line-height: 2;
  letter-spacing: 0.01em;
  max-width: 620px;
  border-top: 1px solid var(--border);
  padding-top: 2.25rem;
}

/* ---------- FOOTER ---------- */
.footer {
  position: fixed;
  bottom: 1.75rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- THEME SWITCHER ---------- */
.theme-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}

.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--dot-color);
  border: 1.5px solid rgba(128, 128, 128, 0.3);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.theme-dot:hover { transform: scale(1.25); }

.theme-dot.is-active {
  box-shadow: 0 0 0 2px var(--text);
  transform: scale(1.1);
}

.theme-dot:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* ---------- MEDIA QUERIES ---------- */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .nav__link,
  .hero__phone {
    transition: none !important;
  }
}

@media (max-width: 560px) {
  .nav  { padding: 0 1rem; }
  main  { padding: 100px 1.5rem 6rem; }
  .hero__desc { padding-left: 0.5rem; padding-right: 0.5rem; }
}

@media (max-width: 360px) {
  .hero__phone { padding: 0.7rem 1.5rem; font-size: 12px; }
  .hero__name { margin-bottom: 1.2rem; }
}
