@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:wght@400;600;700&display=swap');

@layer reset, base, tokens, components, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; padding: 0; }
  img, picture, video, canvas, svg { display: block; max-width: 100%; }
  input, button, textarea, select { font: inherit; }
  p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
}

@layer tokens {
  :root {
    --color-bg: oklch(0.98 0.01 80); 
    --color-surface: oklch(1 0 0);
    --color-text: oklch(0.20 0.02 265);
    --color-text-muted: oklch(0.45 0.02 265);
    --color-accent-yellow: oklch(0.85 0.15 80);
    --color-accent-red: oklch(0.55 0.22 25);
    
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;
    
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    
    --radius: 0.5rem;
  }
}

@layer base {
  body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    line-height: 1.2;
    margin-bottom: var(--space-md);
  }

  h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 3.5rem); }
  h2 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem); }

  p { margin-bottom: var(--space-lg); }

  a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
  }
  a:hover {
    color: var(--color-accent-red);
  }
}

@layer components {
  /* Navigation */
  header {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid oklch(0.90 0.01 80);
    background-color: var(--color-bg);
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .logo img {
    height: 60px;
    object-fit: contain;
  }

  nav ul {
    list-style: none;
    display: flex;
    gap: var(--space-lg);
    align-items: center;
  }

  nav a {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
  }

  nav a:hover, nav a.active {
    color: var(--color-accent-red);
    border-bottom: 2px solid var(--color-accent-yellow);
  }

  /* Footer */
  footer {
    margin-top: auto;
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    border-top: 1px solid oklch(0.90 0.01 80);
    background-color: var(--color-surface);
  }

  /* Main container */
  main {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg);
    width: 100%;
  }

  /* Hero Section */
  .hero {
    display: grid;
    gap: var(--space-xl);
    align-items: center;
    container-type: inline-size;
  }

  @container (width > 600px) {
    .hero {
      grid-template-columns: 1fr 1fr;
    }
  }

  .hero-content h1 {
    font-weight: 700;
  }

  .hero-content p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
  }

  .hero-image {
    border-radius: var(--radius);
    box-shadow: 0 10px 30px oklch(0 0 0 / 0.1);
    overflow: hidden;
  }

  .hero-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  /* Buttons */
  .btn {
    display: inline-block;
    padding: var(--space-md) var(--space-lg);
    background-color: var(--color-accent-yellow);
    color: var(--color-text);
    font-weight: 600;
    border-radius: var(--radius);
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .btn:hover {
    background-color: var(--color-accent-red);
    color: white;
    transform: translateY(-2px);
  }

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

  .btn-outline:hover {
    background-color: var(--color-accent-red);
    color: white;
  }

  /* Card */
  .card {
    background-color: var(--color-surface);
    padding: var(--space-lg);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px oklch(0 0 0 / 0.05);
    margin-bottom: var(--space-lg);
  }

  /* Grid Layout */
  .grid {
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  
  /* Details/Accordion */
  details {
    background: var(--color-surface);
    padding: var(--space-md);
    border-radius: var(--radius);
    margin-bottom: var(--space-md);
    border: 1px solid oklch(0.90 0.01 80);
    box-shadow: 0 2px 4px oklch(0 0 0 / 0.05);
  }
  
  summary {
    font-weight: 600;
    cursor: pointer;
    font-size: 1.1rem;
    outline: none;
    list-style: none; /* Hide default triangle in some browsers */
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--color-accent-red);
    transition: transform 0.3s ease;
  }

  details[open] summary::after {
    transform: rotate(45deg);
  }
  
  details[open] summary {
    margin-bottom: var(--space-md);
    color: var(--color-accent-red);
  }
}

@layer utilities {
  .text-center { text-align: center; }
  .mt-lg { margin-top: var(--space-lg); }
  .mb-lg { margin-bottom: var(--space-lg); }
  .mb-xl { margin-bottom: var(--space-xl); }
  .font-serif { font-family: var(--font-serif); }
  .shadow-md { box-shadow: 0 4px 12px oklch(0 0 0 / 0.1); }
  .rounded { border-radius: var(--radius); }
}

/* View Transitions */
@view-transition {
  navigation: auto;
}
