/*
 * Theme design system
 * Mobile-first, CSS custom properties, reduced motion support
 */

/* ───────────────────────────────
   FONTS (enqueued from Google Fonts via enqueue.php)
   Use --font-serif for headings, --font-sans for UI
──────────────────────────────── */

/* ───────────────────────────────
   CSS VARIABLES
──────────────────────────────── */
:root {
  --color-black: #0A0A0A;
  --color-white: #F5F5F2;
  --color-accent: #E8112D;          /* default accent; can be changed */
  --color-accent-rgb: 232, 17, 45;
  --color-muted: #8A8A8A;

  --color-bg: var(--color-black);
  --color-text: var(--color-white);
  --color-bg-light: var(--color-white);
  --color-text-dark: var(--color-black);

  --font-serif: "Playfair Display", "Fraunces", "Didot", Georgia, serif;
  --font-sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --text-xs:  clamp(0.6875rem, 0.8vw, 0.75rem);   /* 11-12px */
  --text-sm:  clamp(0.75rem, 0.9vw, 0.875rem);    /* 12-14px */
  --text-base: clamp(0.9375rem, 1vw, 1rem);       /* 15-16px */
  --text-lg:  clamp(1.125rem, 1.5vw, 1.5rem);     /* 18-24px */
  --text-xl:  clamp(1.5rem, 3vw, 2.5rem);         /* 24-40px */
  --text-h3:  clamp(2rem, 5vw, 3.5rem);           /* 32-56px */
  --text-h2:  clamp(2.5rem, 7vw, 5rem);           /* 40-80px */
  --text-h1:  clamp(3.5rem, 12vw, 10rem);         /* 56-160px */

  --line-tight: 0.9;
  --line-snug: 1.2;
  --line-normal: 1.5;

  --space-xs: clamp(0.5rem, 1vw, 0.75rem);
  --space-sm: clamp(0.75rem, 1.5vw, 1rem);
  --space-md: clamp(1.5rem, 3vw, 2rem);
  --space-lg: clamp(3rem, 6vw, 5rem);
  --space-xl: clamp(6rem, 12vw, 10rem);

  --container: 1440px;
  --container-wide: 1920px;
  --container-gutter: clamp(1.25rem, 4vw, 4rem);

  --transition-fast: 0.2s ease;
  --transition-base: 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-slow: 0.8s cubic-bezier(0.77, 0, 0.175, 1);

  --z-preloader: 9999;
  --z-cursor: 9000;
  --z-nav: 1000;
  --z-header: 100;
}

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

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

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

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--line-normal);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-loading {
  overflow: hidden;
}

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

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

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: var(--line-tight);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

.uppercase-label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ───────────────────────────────
   LAYOUT
──────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--container-gutter);
}

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

.section {
  position: relative;
  padding: var(--space-xl) 0;
}

.section--light {
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
}

.section--full {
  min-height: 100vh;
  min-height: 100svh;
}

/* ───────────────────────────────
   BUTTONS / LINKS
──────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid currentColor;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.btn:hover,
.btn:focus-visible {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

.btn--accent {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.btn--accent:hover {
  background: transparent;
  color: var(--color-accent);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast);
}

.link-arrow:hover {
  border-bottom-color: currentColor;
}

/* ───────────────────────────────
   HEADER
──────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-header);
  padding: var(--space-sm) 0;
  transition: background var(--transition-base), color var(--transition-base);
}

.site-header.is-scrolled {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(6px);
}

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

.site-logo {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  line-height: 1;
  z-index: calc(var(--z-header) + 1);
}

.site-logo a {
  display: inline-block;
}

.main-navigation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-black);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
  z-index: var(--z-nav);
}

.main-navigation.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  text-align: center;
}

.nav-list a {
  font-family: var(--font-serif);
  font-size: var(--text-h2);
  line-height: 1;
  transition: color var(--transition-fast);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--color-accent);
}

.burger-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: calc(var(--z-nav) + 1);
}

.burger-btn span {
  display: block;
  width: 28px;
  height: 2px;
  background: currentColor;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.burger-btn.active span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.burger-btn.active span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

@media (min-width: 1024px) {
  .main-navigation {
    position: static;
    width: auto;
    height: auto;
    opacity: 1;
    visibility: visible;
    background: transparent;
    justify-content: flex-end;
    z-index: auto;
  }

  .nav-list {
    flex-direction: row;
    gap: var(--space-md);
    text-align: left;
  }

  .nav-list a {
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .burger-btn {
    display: none;
  }
}

/* ───────────────────────────────
   PRELOADER
──────────────────────────────── */
.site-preloader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-black);
  z-index: var(--z-preloader);
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.site-preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-name {
  font-family: var(--font-serif);
  font-size: var(--text-h2);
  color: var(--color-white);
  overflow: hidden;
}

.preloader-name span {
  display: inline-block;
}

.preloader-progress {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  color: var(--color-muted);
}

/* ───────────────────────────────
   CUSTOM CURSOR (desktop only)
──────────────────────────────── */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  z-index: var(--z-cursor);
  transition: transform 0.2s ease, width 0.2s ease, height 0.2s ease, background 0.2s ease;
  mix-blend-mode: difference;
}

.custom-cursor.is-active {
  transform: translate(-50%, -50%) scale(1);
}

.custom-cursor.has-label {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  mix-blend-mode: normal;
}

.custom-cursor__label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-black);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.custom-cursor.has-label .custom-cursor__label {
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .cursor-enabled {
    cursor: none;
  }

  .cursor-enabled a,
  .cursor-enabled button,
  .cursor-enabled [role="button"] {
    cursor: none;
  }
}

/* ───────────────────────────────
   REVEAL ANIMATIONS
──────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ───────────────────────────────
   FORMS
──────────────────────────────── */
.form-field {
  position: relative;
  margin-bottom: var(--space-md);
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245, 245, 242, 0.3);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  padding: var(--space-sm) 0;
  outline: none;
  transition: border-color var(--transition-fast);
  border-radius: 0;
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-bottom-color: var(--color-accent);
}

.form-field label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* ───────────────────────────────
   FOOTER
──────────────────────────────── */
.site-footer {
  padding: var(--space-lg) 0 var(--space-md);
  border-top: 1px solid rgba(245, 245, 242, 0.1);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  text-align: center;
}

.footer-socials {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  justify-content: center;
}

.footer-socials a {
  display: inline-flex;
  width: 24px;
  height: 24px;
  transition: opacity var(--transition-fast);
}

.footer-socials a:hover {
  opacity: 0.6;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--color-muted);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }
}

/* ───────────────────────────────
   UTILITY
──────────────────────────────── */
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-muted); }
.text-center { text-align: center; }

.marquee {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-track {
  display: flex;
  gap: var(--space-md);
  animation: marquee 20s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}
