/* ==========================================================================
   CAVIARÉ - ORDER PAGE
   Stylesheet

   TABLE OF CONTENTS:
   1.  CSS Variables
   2.  Global Reset & Base Styles  (incl. subtle background weave)
   3.  Reusable Utility Classes
   4.  Navigation Bar
   5.  Page Header  (incl. subtle diagonal twill)
   6.  Order Section
   7.  Product Summary  (incl. raised box shadow)
   8.  Order Form  (incl. border radius)
   9.  Confirmation Message
   10. Footer Section  (incl. full-bleed background image with zoom-out reveal)
   11. Responsive Media Queries
   12. Accessibility — Reduced Motion
   13. Scroll Reveal Animations
   ========================================================================== */

/* ==========================================================================
   1. CSS VARIABLES
   ========================================================================== */
:root {
  --espresso: #2a1d15;
  --cream: #f3eee6;
  --ivory: #fffff0;
  --linen: #f5f1ea;

  --gold: #c6a87c;
  --gold-deep: #8a6f47;

  --text-light: var(--ivory);
  --text-dark: var(--espresso);

  --font-serif: "Cormorant Garamond", serif;
  --font-sans: "Montserrat", sans-serif;

  --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  --deep: #1a110c;
  --card-panel: rgba(26, 17, 12, 0.5);

  /* --- Signature substrates (match index.css / menu.css) --- */
  --linen-weave-light:
    repeating-linear-gradient(
      90deg,
      rgba(74, 52, 42, 0.020) 0px,
      rgba(74, 52, 42, 0.020) 1px,
      transparent 1px,
      transparent 4px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(74, 52, 42, 0.014) 0px,
      rgba(74, 52, 42, 0.014) 1px,
      transparent 1px,
      transparent 4px
    );

  /* Fine diagonal twill — used as the subtle background design */
  --twill-light:
    repeating-linear-gradient(
      45deg,
      rgba(74, 52, 42, 0.022) 0px,
      rgba(74, 52, 42, 0.022) 1px,
      transparent 1px,
      transparent 12px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(74, 52, 42, 0.014) 0px,
      rgba(74, 52, 42, 0.014) 1px,
      transparent 1px,
      transparent 12px
    );

  /* Cream twill for the dark page-header band */
  --twill-dark:
    repeating-linear-gradient(
      45deg,
      rgba(245, 241, 234, 0.028) 0px,
      rgba(245, 241, 234, 0.028) 1px,
      transparent 1px,
      transparent 12px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(245, 241, 234, 0.018) 0px,
      rgba(245, 241, 234, 0.018) 1px,
      transparent 1px,
      transparent 12px
    );

  --grain:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.29  0 0 0 0 0.20  0 0 0 0 0.16  0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ==========================================================================
   2. GLOBAL RESET & BASE STYLES
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background-color: var(--cream);
  line-height: 1.8;
  overflow-x: hidden;
  background-image:
    var(--grain),
    var(--twill-light),
    var(--linen-weave-light);
  background-size:
    140px 140px,
    auto,
    auto,
    auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 400;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   3. REUSABLE UTILITY CLASSES
   ========================================================================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-tag {
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: block;
  font-weight: 500;
}

.section-title {
  font-size: 2.8rem;
  margin-bottom: 1.5rem;
  color: var(--espresso);
  line-height: 1.2;
}

.section-title-sm {
  font-size: 1.8rem;
  line-height: 1.15;
}

.dropcap {
  font-family: "Cinzel Decorative", serif;
  font-weight: 700;
  font-size: 1.35em;
  letter-spacing: 0;
  line-height: 1;
  display: inline-block;
  vertical-align: -0.06em;
  margin-right: 0.06em;
  text-transform: none;
  color: var(--gold);
}

.nav-links a .dropcap {
  font-size: 1.4em;
  color: var(--gold);
  vertical-align: -0.07em;
  margin-right: 0.08em;
}

/* ==========================================================================
   4. NAVIGATION BAR
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(42, 29, 21, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition);
  border-bottom: 1px solid rgba(198, 168, 124, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  line-height: 1.1;
  margin-bottom: 2px;
}

.nav-slogan {
  font-family: var(--font-sans);
  font-size: 0.5rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-serif);
  font-weight: 500;
  font-style: normal;
  color: var(--ivory);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: var(--transition);
  position: relative;
  line-height: 1.3;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--gold);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--gold);
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.5rem;
}

/* ==========================================================================
   5. PAGE HEADER
   ========================================================================== */
.page-header {
  padding: 12rem 0 5rem;
  background-color: var(--espresso);
  text-align: center;
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--twill-dark);
  pointer-events: none;
  z-index: 0;
}

.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(198, 168, 124, 0.1) 0%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 1;
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-header .section-title {
  color: var(--cream);
  font-size: 3.5rem;
}

.page-header p {
  color: var(--ivory);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
  opacity: 0.8;
}

/* ==========================================================================
   6. ORDER SECTION
   ========================================================================== */
.order-section {
  padding: 8rem 0;
  background-color: transparent;
}

.order-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 5rem;
  align-items: flex-start;
}

/* ==========================================================================
   7. PRODUCT SUMMARY
   ========================================================================== */
.order-summary {
  background: #ffffff;
  border: 1px solid rgba(198, 168, 124, 0.3);
  padding: 3rem;
  position: sticky;
  top: 120px;
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px rgba(245, 241, 234, 0.6),
    0 2px 6px -2px rgba(42, 29, 21, 0.14),
    0 14px 28px -14px rgba(42, 29, 21, 0.22),
    0 40px 80px -40px rgba(42, 29, 21, 0.32);
  transition: var(--transition);
}

.order-summary .section-tag {
  margin-bottom: 1rem;
}

.order-summary h3 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--espresso);
  margin-bottom: 0.5rem;
}

.order-summary .price {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--gold);
  display: block;
  margin-bottom: 1.5rem;
}

.order-summary p {
  font-size: 0.95rem;
  color: #5a4a40;
  margin-bottom: 1.5rem;
}

.order-summary ul {
  list-style: none;
  margin-bottom: 2rem;
}

.order-summary ul li {
  font-size: 0.85rem;
  color: #5a4a40;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-summary ul li::before {
  content: "◆";
  color: var(--gold);
  font-size: 0.5rem;
}

/* ==========================================================================
   8. ORDER FORM
   ========================================================================== */
.order-form-container {
  padding-top: 1rem;
}

.order-form-container .section-tag {
  margin-bottom: 1rem;
}

.order-form-container h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--espresso);
  margin-bottom: 1rem;
}

.order-form-container > p {
  font-size: 1rem;
  color: #5a4a40;
  margin-bottom: 3rem;
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--espresso);
  margin-bottom: 0.6rem;
  font-weight: 500;
}

.order-form input,
.order-form textarea,
.order-form select {
  width: 100%;
  padding: 1rem 1.2rem;
  background: transparent;
  border: 1px solid rgba(198, 168, 124, 0.4);
  border-radius: 4px;
  color: var(--espresso);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.order-form input:focus,
.order-form textarea:focus,
.order-form select:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 240, 0.5);
  box-shadow: 0 0 0 3px rgba(198, 168, 124, 0.08);
}

.order-form input::placeholder,
.order-form textarea::placeholder {
  color: rgba(42, 29, 21, 0.35);
  font-weight: 300;
}

.order-form textarea {
  resize: vertical;
  min-height: 130px;
  border-radius: 4px;
}

.order-form select {
  cursor: pointer;
  appearance: none;
  border-radius: 4px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C6A87C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  padding-right: 2.5rem;
}

.order-form button {
  display: block;
  width: 100%;
  padding: 1.3rem 2.5rem;
  background-color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 4px;
  color: var(--espresso);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 1rem;
}

.order-form button .dropcap {
  color: var(--ivory);
}

.order-form button:hover {
  background-color: transparent;
  color: var(--gold);
}

.order-form button:hover .dropcap {
  color: var(--gold);
}

/* ==========================================================================
   9. CONFIRMATION MESSAGE
   ========================================================================== */
.confirmation-message {
  display: none;
  background: #ffffff;
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 4rem 3rem;
  text-align: center;
  animation: fadeIn 0.6s ease-out;
}

.confirmation-message.show {
  display: block;
}

.confirmation-message .section-tag {
  margin-bottom: 1rem;
}

.confirmation-message h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--espresso);
  margin-bottom: 1rem;
}

.confirmation-message p {
  font-size: 1rem;
  color: #5a4a40;
  margin-bottom: 1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   10. FOOTER SECTION
   ========================================================================== */
.footer {
  background-color: var(--deep);
  background-image:
    linear-gradient(
      45deg,
      rgba(198, 168, 124, 0.035) 25%,
      transparent 25%,
      transparent 75%,
      rgba(198, 168, 124, 0.035) 75%,
      rgba(198, 168, 124, 0.035)
    ),
    linear-gradient(
      -45deg,
      rgba(198, 168, 124, 0.035) 25%,
      transparent 25%,
      transparent 75%,
      rgba(198, 168, 124, 0.035) 75%,
      rgba(198, 168, 124, 0.035)
    );
  background-size:
    48px 48px,
    48px 48px;
  background-position:
    0 0,
    24px 24px;
  padding: 6rem 0 2rem;
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

.footer .container {
  position: relative;
  z-index: 1;
}

.footer-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.footer-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  will-change: opacity, transform, filter;
}

.footer-bg-reveal {
  opacity: 0;
  transform: scale(1.08);
  filter: brightness(0.6) saturate(0.9);
}

.footer.is-revealed .footer-bg-reveal {
  animation: footerZoomOut 2.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.05s forwards;
}

@keyframes footerZoomOut {
  0% {
    opacity: 0;
    transform: scale(1.08);
    filter: brightness(0.6) saturate(0.9);
  }
  60% {
    opacity: 1;
    transform: scale(1.02);
    filter: brightness(0.92) saturate(1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1) saturate(1);
  }
}

.footer-bg-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(26, 17, 12, 0.82) 0%,
    rgba(26, 17, 12, 0.72) 30%,
    rgba(26, 17, 12, 0.78) 70%,
    rgba(26, 17, 12, 0.88) 100%
  );
  pointer-events: none;
  will-change: opacity, transform;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
  text-align: left;
}

.footer-brand .nav-logo {
  font-size: 2rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  display: block;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--cream);
  max-width: 350px;
  margin-bottom: 1.5rem;
}

.footer-brand .slogan {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold);
  font-size: 1.1rem;
}

.footer-column h4 {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 0.8rem;
}

.footer-column ul li a {
  font-size: 0.9rem;
  color: var(--cream);
  transition: var(--transition);
}

.footer-column ul li a:hover {
  color: var(--gold);
  padding-left: 5px;
}

.footer-column p {
  font-size: 0.9rem;
  color: var(--cream);
  margin-bottom: 0.8rem;
}

.footer-column a.email-link {
  color: var(--gold);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-column a.email-link:hover {
  color: #d4b991;
}

.footer-social {
  display: flex;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(198, 168, 124, 0.28);
  color: rgba(198, 168, 124, 0.85);
  transition: var(--transition);
  border-radius: 50%;
}

.footer-social-link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  transition: var(--transition);
}

.footer-social-link:hover {
  color: var(--gold);
  border-color: rgba(198, 168, 124, 0.75);
  transform: translateY(-2px);
  box-shadow:
    0 6px 18px -6px rgba(198, 168, 124, 0.35),
    0 0 0 1px rgba(198, 168, 124, 0.15);
}

.footer-social-link:hover svg {
  transform: scale(1.08);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(198, 168, 124, 0.18);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--cream);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
}

/* ==========================================================================
   11. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 900px) {
  .order-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .order-summary {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    text-align: left;
  }

  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 1rem;
  }

  .footer-brand p {
    margin: 0 auto 1.5rem;
  }
}

@media (max-width: 768px) {
  .nav-brand {
    align-items: flex-start;
    text-align: left;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--espresso);
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--gold);
    gap: 1.5rem;
  }

  .nav-links.active {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    line-height: 2;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-column ul li a:hover {
    padding-left: 0;
  }

  .footer-social {
    justify-content: center;
  }
}

/* ==========================================================================
   12. ACCESSIBILITY — REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .footer-bg-reveal,
  .footer.is-revealed .footer-bg-reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ==========================================================================
   13. SCROLL REVEAL ANIMATIONS
   ========================================================================== */

[data-reveal],
[data-line],
[data-waterfall] {
  opacity: 0;
  will-change: opacity, transform;
}

[data-reveal].is-visible,
[data-line].is-visible,
[data-waterfall].is-visible {
  opacity: 1;
}

[data-reveal="up"] {
  transform: translateY(35px);
  transition:
    opacity 0.9s cubic-bezier(0.25, 0.8, 0.25, 1),
    transform 1s cubic-bezier(0.25, 0.8, 0.25, 1);
  transition-delay: var(--reveal-delay, 0s);
}

[data-reveal="up"].is-visible {
  transform: translateY(0);
}

[data-reveal="left"] {
  transform: translateX(-60px);
  transition:
    opacity 1s cubic-bezier(0.25, 0.8, 0.25, 1),
    transform 1.1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-reveal="left"].is-visible {
  transform: translateX(0);
}

[data-reveal="right"] {
  transform: translateX(60px);
  transition:
    opacity 1s cubic-bezier(0.25, 0.8, 0.25, 1),
    transform 1.1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-reveal="right"].is-visible {
  transform: translateX(0);
}

[data-line] {
  transform: translateY(20px);
  opacity: 0;
  transition:
    opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1),
    transform 0.9s cubic-bezier(0.25, 0.8, 0.25, 1);
  transition-delay: var(--line-delay, 0s);
}

[data-line].is-visible {
  transform: translateY(0);
  opacity: 1;
}

[data-waterfall] {
  transform: translateY(28px);
  opacity: 0;
  transition:
    opacity 0.85s cubic-bezier(0.25, 0.8, 0.25, 1),
    transform 0.95s cubic-bezier(0.25, 0.8, 0.25, 1);
  transition-delay: var(--waterfall-delay, 0s);
}

[data-waterfall].is-visible {
  transform: translateY(0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-line],
  [data-waterfall] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}