/* ==========================================================================
   Bambina Pizzeria
   Swiss Grid System + Alternative Art Direction
   ========================================================================== */

/* --------------------------------------------------------------------------
   Font Faces
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Mollica';
  src: url('./fonts/Mollica-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'F37Kookie';
  src: url('./fonts/F37Kookie-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'F37Kookie';
  src: url('./fonts/F37Kookie-Medium.otf') format('opentype');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'F37Kookie';
  src: url('./fonts/F37Kookie-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'GTAmericaMono';
  src: url('./fonts/GT-America-Mono-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'GTAmericaMono';
  src: url('./fonts/GT-America-Mono-Medium.otf') format('opentype');
  font-weight: 500;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --cream: #F6EDD6;
  --red: #C6342A;
  --green: #355C41;

  /* Grid Unit: 8px baseline */
  --unit: 0.5rem;

  /* Spacing Scale */
  --s1: calc(var(--unit) * 1);   /* 8px */
  --s2: calc(var(--unit) * 2);   /* 16px */
  --s3: calc(var(--unit) * 3);   /* 24px */
  --s4: calc(var(--unit) * 4);   /* 32px */
  --s5: calc(var(--unit) * 5);   /* 40px */
  --s6: calc(var(--unit) * 6);   /* 48px */
  --s8: calc(var(--unit) * 8);   /* 64px */
  --s10: calc(var(--unit) * 10); /* 80px */
  --s12: calc(var(--unit) * 12); /* 96px */

  /* Type Scale - 1.25 ratio aligned to baseline */
  --t-xs: 0.75rem;    /* 12px / 16px line */
  --t-sm: 0.875rem;   /* 14px / 24px line */
  --t-base: 1rem;     /* 16px / 24px line */
  --t-lg: 1.25rem;    /* 20px / 32px line */
  --t-xl: 1.5rem;     /* 24px / 32px line */
  --t-2xl: 2rem;      /* 32px / 40px line */
  --t-3xl: 3rem;      /* 48px / 56px line */
  --t-4xl: 4rem;      /* 64px / 72px line */
  --t-5xl: 6rem;      /* 96px / 104px line */
  --t-6xl: 8rem;      /* 128px / 136px line */
}

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

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

body {
  font-family: 'GTAmericaMono', monospace;
  font-size: var(--t-base);
  line-height: 1.5;
  color: var(--green);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

/* Page content - starts hidden, JS fades in */
.page-content {
  opacity: 0;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s2) var(--s3);
  background: var(--green);
  color: var(--cream);
  z-index: 100;
}

.header-logo {
  font-family: 'Mollica', serif;
  font-size: var(--t-lg);
  transition: opacity 0.2s ease;
}

.header-logo:hover {
  opacity: 0.7;
}

.header-nav {
  display: flex;
  gap: var(--s3);
}

.header-link {
  font-family: 'GTAmericaMono', monospace;
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: var(--s1) var(--s2);
  border: 1px solid var(--cream);
  transition: all 0.2s ease;
}

.header-link:hover {
  background: var(--cream);
  color: var(--green);
}

.header-current {
  font-family: 'GTAmericaMono', monospace;
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.6;
}

@media (min-width: 768px) {
  .header {
    padding: var(--s2) var(--s5);
  }

  .header-logo {
    font-size: var(--t-xl);
  }
}

@media (min-width: 1200px) {
  .header {
    padding: var(--s3) var(--s8);
  }
}

/* ==========================================================================
   HOME PAGE - Split Layout
   ========================================================================== */
.page-home {
  --header-height: 56px;
  padding-top: var(--header-height);
}

.split {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100dvh - var(--header-height));
}

.split-left,
.split-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--s3);
  min-height: calc(50vh - var(--header-height) / 2);
  min-height: calc(50dvh - var(--header-height) / 2);
}

/* Left Panel - Brand */
.split-left {
  background: var(--green);
  color: var(--cream);
}

/* Right Panel - Info */
.split-right {
  background: var(--cream);
  color: var(--green);
}

.split-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: var(--s4);
}

.split-content--center {
  justify-content: center;
  align-items: center;
  padding-bottom: 0;
}

/* Logo */
.logo-wrap {
  width: 100%;
  max-width: 280px;
  padding: var(--s2);
}

.logo-img {
  display: block;
  width: 100%;
  height: auto;
}

.statement {
  font-family: 'F37Kookie', sans-serif;
  font-size: var(--t-xl);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

/* Footer - Home */
.split-footer {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.contact {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

/* Desktop - Split Horizontal */
@media (min-width: 768px) {
  .page-home {
    --header-height: 64px;
  }

  .split {
    flex-direction: row;
  }

  .split-left,
  .split-right {
    width: 50%;
    min-height: calc(100vh - var(--header-height));
    min-height: calc(100dvh - var(--header-height));
    padding: var(--s5);
  }

  .logo-wrap {
    max-width: 360px;
  }

  .statement {
    font-size: var(--t-2xl);
  }
}

@media (min-width: 1200px) {
  .page-home {
    --header-height: 72px;
  }

  .split-left,
  .split-right {
    padding: var(--s8);
  }

  .logo-wrap {
    max-width: 420px;
  }

  .statement {
    font-size: var(--t-3xl);
  }

  .contact {
    flex-direction: row;
    gap: var(--s4);
  }
}

@media (min-width: 1600px) {
  .logo-wrap {
    max-width: 520px;
  }
}

/* ==========================================================================
   MENU PAGE - Grid System
   ========================================================================== */
.page-menu {
  /* 8-column grid system */
  --cols: 4;
  --gutter: var(--s2);
  --margin: var(--s3);
  --header-height: 56px;
  padding-top: var(--header-height);
}

@media (min-width: 768px) {
  .page-menu {
    --cols: 8;
    --margin: var(--s5);
    --header-height: 64px;
  }
}

@media (min-width: 1200px) {
  .page-menu {
    --cols: 12;
    --margin: var(--s8);
    --header-height: 72px;
  }
}

/* Menu Main */
.menu-main {
  padding: var(--s5) var(--margin);
  max-width: 1400px;
  margin: 0 auto;
}

/* Menu Section */
.menu-section {
  margin-bottom: var(--s6);
}

.menu-section:last-child {
  margin-bottom: 0;
}

.section-head {
  font-family: 'Mollica', serif;
  font-size: var(--t-2xl);
  font-weight: 400;
  color: var(--red);
  margin-bottom: var(--s3);
  padding-bottom: var(--s1);
  border-bottom: 1px solid var(--red);
}

/* Menu Grid - Field System */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s3);
}

@media (min-width: 640px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s3) var(--s4);
  }

  .menu-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .menu-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Menu Item */
.item {
  padding-bottom: var(--s2);
  border-bottom: 1px solid rgba(53, 92, 65, 0.2);
}

@media (min-width: 640px) {
  .item {
    border-bottom: none;
    padding-bottom: 0;
  }
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s2);
  margin-bottom: var(--s1);
}

.item-name {
  font-family: 'F37Kookie', sans-serif;
  font-size: var(--t-base);
  font-weight: 600;
}

.item-price {
  font-family: 'GTAmericaMono', monospace;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--red);
  white-space: nowrap;
}

.item-ing {
  font-family: 'GTAmericaMono', monospace;
  font-size: var(--t-xs);
  line-height: 1.6;
  opacity: 0.75;
}

/* Featured Section */
.menu-section--featured {
  background: var(--red);
  color: var(--cream);
  padding: var(--s4);
  margin-left: calc(var(--margin) * -1);
  margin-right: calc(var(--margin) * -1);
  padding-left: var(--margin);
  padding-right: var(--margin);
}

.menu-section--featured .section-head {
  color: var(--cream);
  border-bottom-color: rgba(246, 237, 214, 0.4);
}

.menu-section--featured .item-price {
  color: var(--cream);
}

.menu-section--featured .item-ing {
  opacity: 0.85;
}

@media (min-width: 768px) {
  .menu-section--featured {
    margin-left: 0;
    margin-right: 0;
    padding: var(--s5);
  }
}

/* Menu Footer */
.menu-footer {
  padding: var(--s3) var(--margin);
  border-top: 1px solid var(--green);
  margin-top: var(--s6);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
}

.footer-note {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

/* ==========================================================================
   Utility
   ========================================================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
