/* ==========================================================
   main.css — Cedar Stone Bistro
   Global design system: fonts, variables, reset, typography,
   layout, header, navigation, footer, utilities, animations.
   ========================================================== */

/* ──────────────────────────────────────────
   FONTS
────────────────────────────────────────── */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/assets/fonts/Cormorant_Garamond/CormorantGaramond-Regular.woff2')
    format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/assets/fonts/Cormorant_Garamond/CormorantGaramond-Italic.woff2')
    format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/assets/fonts/Cormorant_Garamond/CormorantGaramond-Bold.woff2')
    format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ──────────────────────────────────────────
   CUSTOM PROPERTIES
────────────────────────────────────────── */
:root {
  --cs-bg: #070409;
  --cs-bg-2: #120817;
  --cs-bg-3: #1b0d22;
  --cs-purple: #831c91;
  --cs-purple-soft: #b55bc7;
  --cs-purple-glow: rgba(131, 28, 145, 0.38);
  --cs-gold: #d7b56d;
  --cs-gold-deep: #8f6a2e;
  --cs-gold-glow: rgba(215, 181, 109, 0.22);
  --cs-cream: #f5e9d0;
  --cs-white: #ffffff;
  --cs-muted: #e8dff0;
  --cs-line: rgba(255, 255, 255, 0.12);
  --cs-line-gold: rgba(215, 181, 109, 0.28);

  --font-main: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-display: var(--font-main);

  --container-max: 1320px;
  --container-px: 1.5rem;
  --header-height: 80px;

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

  --transition: 0.22s ease;
  --transition-slow: 0.45s ease;
}

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

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

body {
  background: var(--cs-bg);
  background: -webkit-linear-gradient(to bottom, var(--cs-bg), var(--cs-bg-2));
  background: linear-gradient(to bottom, var(--cs-bg), var(--cs-bg-2));
  color: var(--cs-white);
  font-family: var(--font-main);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: var(--font-main);
  background: none;
  border: none;
}

address {
  font-style: normal;
}

[hidden] {
  display: none !important;
}

#main-content {
  display: block;
}

/* ──────────────────────────────────────────
   CUSTOM SCROLLBAR
────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--cs-bg-2);
}
::-webkit-scrollbar-thumb {
  background: var(--cs-purple);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cs-purple-soft);
}

/* ──────────────────────────────────────────
   FOCUS & ACCESSIBILITY
────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--cs-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--cs-purple);
  color: var(--cs-white);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1.4rem;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

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

/* ──────────────────────────────────────────
   TYPOGRAPHY
────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-main);
  font-weight: 700;
  line-height: 1.15;
  color: var(--cs-white);
}

h1 {
  font-size: clamp(2.75rem, 5.5vw, 5rem);
}
h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}
h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}
h4 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}
h5 {
  font-size: 1.5rem;
}
h6 {
  font-size: 1.125rem;
}

p {
  font-size: 1.2rem;
  line-height: 1.75;
  color: var(--cs-muted);
}

p + p {
  margin-top: 1rem;
}

strong {
  font-weight: 700;
  color: var(--cs-white);
}

em {
  font-style: italic;
  color: var(--cs-gold);
}

small {
  font-size: 0.875rem;
}

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

.section {
  padding-block: 5rem;
}

@media (max-width: 767px) {
  .section {
    padding-block: 3.5rem;
  }
}

/* ──────────────────────────────────────────
   BUTTONS
────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.875rem 2rem;
  font-family: var(--font-main);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.btn--primary {
  background: var(--cs-purple);
  color: var(--cs-white);
  border-color: var(--cs-purple);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--cs-purple-soft);
  border-color: var(--cs-purple-soft);
  box-shadow: 0 4px 32px var(--cs-purple-glow);
  color: var(--cs-white);
}

.btn--outline {
  background: transparent;
  color: var(--cs-gold);
  border-color: var(--cs-gold);
}
.btn--outline:hover,
.btn--outline:focus-visible {
  background: var(--cs-gold-glow);
  box-shadow: 0 0 24px var(--cs-gold-glow);
  color: var(--cs-gold);
}

.btn--ghost {
  background: transparent;
  color: var(--cs-muted);
  border-color: var(--cs-line);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  color: var(--cs-white);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 767px) {
  .btn {
    min-height: 56px;
    padding: 1rem 1.75rem;
    font-size: 1.2rem;
  }
}

/* ──────────────────────────────────────────
   SCROLL REVEAL
────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}
[data-reveal='left'] {
  transform: translateX(-32px);
}
[data-reveal='right'] {
  transform: translateX(32px);
}
[data-reveal='scale'] {
  transform: scale(0.94);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ──────────────────────────────────────────
   HEADER
────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 4, 9, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--cs-line);
  transition: background var(--transition);
}

/* Prevent body scroll when mobile nav is open */
body:has(.nav--open) {
  overflow: hidden;
}

/* ──────────────────────────────────────────
   NAVIGATION — shared
────────────────────────────────────────── */
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 1.5rem;
}

.nav__logo-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.nav__logo-link img {
  height: 46px;
  width: auto;
}

/* Nav link base */
.nav__link,
.nav__dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  font-family: var(--font-main);
  font-size: 1.1375rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cs-muted);
  border-radius: var(--radius-sm);
  border: none;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    color var(--transition),
    background var(--transition);
  text-decoration: none;
}

.nav__link:hover,
.nav__dropdown-toggle:hover,
.nav__link:focus-visible,
.nav__dropdown-toggle:focus-visible {
  color: var(--cs-white);
  background: rgba(255, 255, 255, 0.06);
}

.nav__link--active {
  color: var(--cs-gold) !important;
}

/* Dropdown caret */
.nav__caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  flex-shrink: 0;
  margin-top: 2px;
  transition: transform var(--transition);
}

.nav__dropdown-toggle[aria-expanded='true'] .nav__caret {
  transform: rotate(180deg);
}

/* Nav actions */
.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex-shrink: 0;
}

.nav__cta {
  min-height: 42px;
  padding: 0.5rem 1.375rem;
  font-size: 0.875rem;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.07);
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cs-white);
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease,
    width 0.3s ease;
}

.nav-toggle--active .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle--active .nav-toggle__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle--active .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ──────────────────────────────────────────
   NAVIGATION — mobile (< 1024px)
────────────────────────────────────────── */
@media (max-width: 1023px) {
  .nav-toggle {
    display: flex;
  }

  .nav__list {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--cs-bg);
    background: -webkit-linear-gradient(
      to bottom,
      var(--cs-bg),
      var(--cs-bg-3)
    );
    background: linear-gradient(to bottom, var(--cs-bg), var(--cs-bg-3));
    z-index: 98;
    overflow-y: auto;
    padding: 2.5rem 1.5rem 3rem;
  }

  .nav--open .nav__list {
    display: flex;
  }

  .nav__link,
  .nav__dropdown-toggle {
    font-size: 1.5rem;
    padding: 0.75rem 1.5rem;
    color: var(--cs-white);
    letter-spacing: 0.06em;
    width: 100%;
    justify-content: center;
  }

  .nav__item--has-dropdown {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Always show dropdown on mobile */
  .nav__dropdown {
    position: static;
    transform: none;
    visibility: visible;
    opacity: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--cs-line);
    box-shadow: none;
    border-radius: var(--radius-md);
    padding: 0.375rem 0;
    margin-top: 0.375rem;
    width: 100%;
    max-width: 300px;
  }

  .nav__dropdown-link {
    font-size: 1.4rem;
    text-align: center;
    padding: 0.625rem 1rem;
    display: block;
    color: var(--cs-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 700;
    transition:
      color var(--transition),
      background var(--transition);
  }

  .nav__dropdown-link:hover,
  .nav__dropdown-link:focus-visible {
    color: var(--cs-white);
    background: rgba(255, 255, 255, 0.06);
  }

  .nav__dropdown-link.nav__link--active {
    color: var(--cs-gold);
  }

  .nav__cta {
    display: none;
  }
}

/* ──────────────────────────────────────────
   NAVIGATION — desktop (≥ 1024px)
────────────────────────────────────────── */
@media (min-width: 1024px) {
  .nav__list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    flex: 1;
  }

  .nav__item--has-dropdown {
    position: relative;
  }

  .nav__dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: var(--cs-bg-3);
    border: 1px solid var(--cs-line);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    box-shadow:
      0 8px 48px rgba(0, 0, 0, 0.65),
      0 0 0 1px var(--cs-line);
    visibility: hidden;
    opacity: 0;
    transition:
      opacity var(--transition),
      visibility var(--transition);
    z-index: 50;
  }

  .nav__item--has-dropdown:hover .nav__dropdown,
  .nav__item--has-dropdown:focus-within .nav__dropdown,
  .nav__dropdown-toggle[aria-expanded='true'] + .nav__dropdown {
    visibility: visible;
    opacity: 1;
  }

  .nav__dropdown-link {
    display: block;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cs-muted);
    border-radius: var(--radius-sm);
    transition:
      color var(--transition),
      background var(--transition);
  }

  .nav__dropdown-link:hover,
  .nav__dropdown-link:focus-visible {
    color: var(--cs-white);
    background: rgba(255, 255, 255, 0.07);
  }

  .nav__dropdown-link.nav__link--active {
    color: var(--cs-gold);
  }
}

/* ──────────────────────────────────────────
   FOOTER
────────────────────────────────────────── */
.site-footer {
  background: var(--cs-bg-2);
  background: -webkit-linear-gradient(
    to bottom,
    var(--cs-bg-2),
    var(--cs-bg-3)
  );
  background: linear-gradient(to bottom, var(--cs-bg-2), var(--cs-bg-3));
  border-top: 1px solid var(--cs-line);
  margin-top: auto;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-block: 4rem;
}

@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

@media (min-width: 1024px) {
  .site-footer__inner {
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 4rem;
  }
}

.site-footer__logo-link {
  display: inline-block;
  margin-bottom: 1.25rem;
}

.site-footer__logo-link img {
  height: 54px;
  width: auto;
}

.site-footer__tagline {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cs-gold);
  margin-bottom: 1rem;
}

.site-footer__address {
  font-size: 1.1375rem;
  color: var(--cs-muted);
  line-height: 1.75;
}

.site-footer__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.site-footer__nav-heading {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cs-gold);
  margin-bottom: 1rem;
}

.site-footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.site-footer__nav a {
  font-size: 1.1375rem;
  color: var(--cs-muted);
  transition: color var(--transition);
}

.site-footer__nav a:hover {
  color: var(--cs-white);
}

.site-footer__contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.site-footer__contact-link {
  font-size: 1.1375rem;
  color: var(--cs-muted);
  transition: color var(--transition);
}

.site-footer__contact-link:hover {
  color: var(--cs-gold);
}

.site-footer__cta {
  min-height: 44px;
  padding: 0.625rem 1.375rem;
  font-size: 0.875rem;
}

.site-footer__bottom {
  border-top: 1px solid var(--cs-line);
  padding-block: 1.5rem;
}

.site-footer__bottom .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer__bottom p {
  font-size: 1.1rem;
  color: rgba(232, 223, 240, 0.4);
  margin: 0;
}

@media (max-width: 767px) {
  .site-footer__bottom .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}
