/* ================================================
   COFFEE BAR CHE — style.css
   Variables, Reset, Typography, Global Utilities
   ================================================ */

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

/* ── CSS Custom Properties ─────────────────────── */
:root {
  --color-primary:   #C9503A;
  --color-primary-outline: #b34430;
  --color-secondary: #6BB3D3;
  --color-bg:        #FAF5EE;
  --color-text:      #2C2C2C;
  --color-accent:    #E8793A;
  --color-muted:     #888880;
  --color-light:     #F0EBE3;
  --color-white:     #FFFFFF;
  --color-border:    #DDD8D0;

  --font-display: 'Oswald', sans-serif;
  --font-body:    'Inter', sans-serif;

  --grid-line: rgba(107, 179, 211, 0.18);
  --grid-bg:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      var(--grid-line) 39px,
      var(--grid-line) 40px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 39px,
      var(--grid-line) 39px,
      var(--grid-line) 40px
    );

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.16);

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;

  --transition: 0.25s ease;

  --container:  1160px;
  --nav-height: 72px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
}

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

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

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font: inherit;
  border: none;
  outline: none;
  background: none;
}

/* ── Typography ────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--color-text);
}

p:last-child {
  margin-bottom: 0;
}

.overline {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
}

/* ── Layout ────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.container--narrow {
  max-width: 920px;
}

.section {
  padding-block: 80px;
}

.section--grid {
  background: var(--grid-bg), var(--color-bg);
}

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

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark p {
  color: var(--color-bg);
}

/* ── Grid helpers ──────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ── Flex helpers ──────────────────────────────── */
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-col    { display: flex; flex-direction: column; }
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

/* ── Spacing ───────────────────────────────────── */
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* ── Text utilities ────────────────────────────── */
.text-center  { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-secondary{ color: var(--color-secondary); }
.text-muted   { color: var(--color-muted); }
.text-upper   { text-transform: uppercase; letter-spacing: 0.1em; }

/* ── Divider ───────────────────────────────────── */
.divider {
  width: 48px;
  height: 3px;
  background: var(--color-primary);
  margin-block: 20px;
}

.divider--center {
  margin-inline: auto;
}

/* ── Page header ───────────────────────────────── */
.page-header {
  background: var(--grid-bg), var(--color-light);
  padding-block: 64px 48px;
  margin-top: var(--nav-height);
  text-align: center;
  border-bottom: 2px solid var(--color-border);
}

.page-header .overline {
  margin-bottom: 8px;
}

/* ── Scroll reveal utility ─────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 3000;
  background: var(--color-primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.skip-link:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

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