/* ========================================
   CRITICAL CSS - Above the fold styles
   ======================================== */

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

/* Typography - Critical fonts */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/playfairdisplay/v36/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvXDXbtM.woff2) format('woff2');
}

/* Base styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lora', Georgia, serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #f5f3f0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: #060606;
  color: #fff;
  padding: 1rem 2rem;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  border-radius: 0 0 4px 4px;
  z-index: 9999;
  transition: top 0.3s ease;
}

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

/* Header - Critical */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(245, 243, 240, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(6, 6, 6, 0.1);
}

.header__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo - Critical */
.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: #060606;
}

.logo__icon {
  width: 48px;
  height: 54px;
  object-fit: contain;
  display: block;
}

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

.logo__text-primary {
  font-family: 'Playfair Display', serif;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.logo__text-secondary {
  font-family: 'Inter', sans-serif;
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.7;
}

/* Navigation toggle - Critical for mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle__line {
  display: block;
  width: 100%;
  height: 2px;
  background: #060606;
  transition: all 0.3s ease;
}

/* Hero - Critical styles */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 2rem 4rem;
  overflow: hidden;
}

.hero__content {
  text-align: center;
  max-width: 900px;
  position: relative;
  z-index: 2;
}

.hero__logo-wrapper {
  width: 200px;
  height: 226px;
  margin: 0 auto 2rem;
}

.hero__logo {
  width: 100%;
  height: 100%;
}

.hero__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: #060606;
}

.hero__title-line {
  display: block;
}

.hero__title-line--accent {
  font-weight: 600;
}

.hero__subtitle {
  font-family: 'Lora', serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #444;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Buttons - Critical */
.hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: #060606;
  color: #fff;
}

.btn--primary:hover {
  background: #333;
  transform: translateY(-2px);
}

.btn--secondary {
  background: transparent;
  color: #060606;
  border: 2px solid #060606;
}

.btn--secondary:hover {
  background: #060606;
  color: #fff;
}

/* Background layers */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero__layer {
  position: absolute;
  inset: 0;
  opacity: 0.03;
}

.hero__layer--back {
  background: radial-gradient(ellipse at top, #060606, transparent 70%);
}

.hero__layer--mid {
  background: radial-gradient(ellipse at bottom right, #060606, transparent 50%);
}

.hero__layer--front {
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23060606' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Mobile responsive - Critical */
@media (max-width: 768px) {
  /* Header / mobile menu: see main.css §2 */

  .hero {
    padding: 100px 1rem 3rem;
  }
  
  .hero__logo-wrapper {
    width: 150px;
    height: 170px;
  }
  
  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.75rem;
  }
}

/* Header hidden state */
.header.is-hidden {
    transform: translateY(-100%);
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn--primary {
    background: #d4af37;
    color: #060606;
}

.btn--primary:hover {
    background: #c4a030;
    transform: translateY(-2px);
}

.btn--large {
    padding: 1.25rem 2.5rem;
    font-size: 1rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

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