/* ─── Base ─────────────────────────────────────────────────────────── */
html {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

body {
  background: var(--color-bg);
  min-height: 100vh;
  cursor: none;
}

/* ─── Grain overlay ─────────────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9990;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ─── Custom cursor ─────────────────────────────────────────────────── */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background: var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s var(--ease-expo),
              height 0.2s var(--ease-expo),
              background 0.2s ease;
  mix-blend-mode: normal;
}

.cursor--hover {
  width: 40px;
  height: 40px;
  background: rgba(125, 195, 27, 0.2);
  border: 1px solid var(--color-accent);
}

.cursor--hidden {
  opacity: 0;
}

@media (pointer: coarse) {
  .cursor { display: none; }
  body { cursor: auto; }
}

/* ─── Nav ───────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--container-pad);
  z-index: 1000;
  transition: background 0.5s var(--ease-expo),
              backdrop-filter 0.5s var(--ease-expo);
}

.nav--scrolled {
  background: rgba(242, 237, 230, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* On light bg: mix-blend-mode:multiply makes the white logo bg invisible */
.nav__logo-img {
  height: 56px;
  width: auto;
  display: block;
  mix-blend-mode: multiply;
  transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
  .nav__logo-img {
    height: 48px;
  }
}

.nav__logo:hover .nav__logo-img {
  opacity: 0.75;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
}

.nav__link {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  transition: color 0.3s ease;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.3s var(--ease-expo);
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-text);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.nav__phone {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: border-color 0.3s ease, color 0.3s ease;
}

.nav__phone:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--color-text);
  transition: transform 0.3s var(--ease-expo), opacity 0.3s ease;
}

.nav__hamburger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav */
.nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 999;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: var(--container-pad);
  gap: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-expo);
}

.nav__mobile.is-open {
  opacity: 1;
  pointer-events: all;
}

.nav__mobile-link {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 300;
  color: var(--color-text);
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}

.nav__mobile-link:hover {
  color: var(--color-accent);
}

/* ─── Section helpers ───────────────────────────────────────────────── */
.section-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--color-accent);
}

/* ─── Container ─────────────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ─── Link style ────────────────────────────────────────────────────── */
.link-accent {
  color: var(--color-accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: opacity 0.3s ease;
}

.link-accent:hover {
  opacity: 0.7;
}

/* ─── Footer — dark closer ──────────────────────────────────────────── */
.footer {
  background: #1A1A18;
  border-top: none;
  padding: 1.75rem var(--container-pad);
  --color-text-muted: rgba(242, 237, 230, 0.45);
  --color-text-dim:   rgba(242, 237, 230, 0.3);
  --color-border:     rgba(242, 237, 230, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__info {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.footer__info a {
  color: var(--color-text-muted);
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.footer__info a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.footer__nav {
  display: flex;
  gap: 1.5rem;
  flex-shrink: 0;
}

.footer__nav-link {
  font-size: 0.72rem;
  color: var(--color-text-dim);
  letter-spacing: 0.04em;
  transition: color 0.25s ease;
}

.footer__nav-link:hover {
  color: var(--color-accent);
}

@media (max-width: 600px) {
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

/* ─── Mobile nav toggle ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__links,
  .nav__phone {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .nav__mobile {
    display: flex;
  }
}

/* ─── Reveal animation base states ─────────────────────────────────── */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
}

.reveal-fade {
  opacity: 0;
}

/* ─── Scrollbar ─────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-text-dim);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* ─── Selection ─────────────────────────────────────────────────────── */
::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}
