/* ============================================
   MAIN.CSS — Reset, Variables, Typography
   New Cuisine by Netti
   ============================================ */

/* Sitka Display – lokal (woff2) */
@font-face {
  font-family: 'Sitka Display';
  src: url('../fonts/Sitka-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Sitka Display';
  src: url('../fonts/Sitka-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Sitka Display';
  src: url('../fonts/Sitka-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Sitka Display';
  src: url('../fonts/Sitka-BoldItalic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* DM Sans – Google Fonts (Body) – loaded via <link> in HTML for non-blocking behavior */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Colors – Brand */
  --color-bg:           #FAFAF8;
  --color-bg-alt:       #F2F5F3;
  --color-bg-dark:      #2C3329;
  --color-primary:      #576B5B;
  --color-primary-dark: #3D5040;
  --color-primary-light:#7A9480;
  --color-secondary:    #AEBEB1;
  --color-secondary-dark:#8EA89A;
  --color-accent:       #E9BF83;
  --color-accent-dark:  #C9A060;
  --color-text:         #1E2420;
  --color-text-mid:     #4A5A4F;
  --color-text-light:   #8A9E93;
  --color-white:        #FFFFFF;
  --color-border:       #D5DDD8;

  /* Typography */
  --font-heading: 'Sitka Display', Georgia, serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Font Sizes */
  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-md:   1.125rem;  /* 18px */
  --text-lg:   1.25rem;   /* 20px */
  --text-xl:   1.5rem;    /* 24px */
  --text-2xl:  2rem;      /* 32px */
  --text-3xl:  2.5rem;    /* 40px */
  --text-4xl:  3.5rem;    /* 56px */
  --text-5xl:  5rem;      /* 80px */
  --text-6xl:  7rem;      /* 112px */

  /* Spacing (8pt grid) */
  --space-1:  0.25rem;  /* 4px */
  --space-2:  0.5rem;   /* 8px */
  --space-3:  0.75rem;  /* 12px */
  --space-4:  1rem;     /* 16px */
  --space-5:  1.25rem;  /* 20px */
  --space-6:  1.5rem;   /* 24px */
  --space-8:  2rem;     /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */

  /* Border Radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(30, 36, 32, 0.08);
  --shadow-md:  0 4px 16px rgba(30, 36, 32, 0.10);
  --shadow-lg:  0 8px 32px rgba(30, 36, 32, 0.14);
  --shadow-xl:  0 20px 60px rgba(30, 36, 32, 0.18);

  /* Transitions */
  --transition-fast:   150ms ease-out;
  --transition-base:   250ms ease-out;
  --transition-slow:   400ms ease-out;

  /* Layout */
  --max-width:     1280px;
  --content-width: 860px;
  --nav-height:    72px;
}

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

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

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

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

/* Headings use Cormorant Garamond */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-text);
}

h1 { font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl)); font-weight: 300; letter-spacing: -0.02em; }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); font-weight: 300; }
h3 { font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl)); font-weight: 400; }
h4 { font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl)); font-weight: 400; }

p {
  font-size: var(--text-md);
  line-height: 1.75;
  color: var(--color-text-mid);
  max-width: 65ch;
}

/* Utility text classes */
.text-display {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-5xl), 9vw, 10rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
}

.text-serif {
  font-family: var(--font-heading);
}

.text-italic {
  font-style: italic;
}

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

.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-accent { color: var(--color-accent); }
.text-white { color: var(--color-white); }
.text-light { color: var(--color-text-light); }
.text-label--dim { color: rgba(255, 255, 255, 0.45); }

.mt-12 { margin-top: var(--space-12); }

/* ============================================
   UTILITIES
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* Divider ornament */
.ornament {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  justify-content: center;
  margin: var(--space-8) 0;
}

.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--color-border);
}

.ornament span {
  color: var(--color-primary);
  font-size: var(--text-xl);
  line-height: 1;
}

/* Fade-in animation (controlled by JS Intersection Observer) */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-dark);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) var(--color-bg-alt);
}

/* ============================================
   SCROLL-UP BUTTON
   ============================================ */
.scroll-up {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  z-index: 200;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--transition-base), transform var(--transition-base), background var(--transition-fast);
  pointer-events: none;
}

.scroll-up.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.scroll-up:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-lg);
}

.scroll-up svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
