/* ============================================================
   Patisseries De Raina — Design System
   Tokens sourced from Patisseries-De-Raina-Brand-Kit.pdf
   ============================================================ */

:root {
  /* Brand colors */
  --ivory: #FAF3E7;
  --blush: #F4C7D3;
  --cocoa: #3E2418;
  --cocoa-72: rgba(62, 36, 24, .72);
  --cocoa-66: rgba(62, 36, 24, .66);
  --gold: #C6A15B;
  --charcoal: #211C1B;
  --berry: #6E1E2E;
  --sage: #7C8A5C;

  /* Type */
  --font-script: 'Pinyon Script', cursive;
  --font-serif: 'Cormorant Garamond', serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 16px;
  --sp-4: 32px;
  --sp-5: 64px;

  /* Layout */
  --content-max: 1200px;
  --radius: 2px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ivory);
  color: var(--cocoa);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* height:auto is required here: every <img> now carries native width/height
   attributes (for CLS + browser sizing hints before CSS loads), and those
   attributes imply a non-auto height that would otherwise silently override
   the various aspect-ratio values set per-instance below. */
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
::selection { background: var(--blush); color: var(--cocoa); }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

@keyframes rainaFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

[data-reveal] {
  opacity: 0;
}
[data-reveal].is-visible {
  animation: fadeUp .7s ease forwards;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; animation: none; }
  [data-reveal].is-visible { animation: none; }
  .float { animation: none !important; }
}

/* ---------- Scroll performance ----------
   content-visibility skips layout/style/paint work for whatever's off-
   screen. Applied at the section level for short standalone sections
   below the fold, and per-card (see .card/.gallery-figure/.insta-figure
   below) for long grids — a single content-visibility on one giant grid
   wrapper wouldn't help, since the browser can't skip *inside* an element
   that's still partially in view; each card needs to be its own unit. */
.cv-auto {
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  font-size: 13px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 16px;
}

/* ---------- Headings ---------- */
h1, h2, h3, .font-serif { font-family: var(--font-serif); color: var(--cocoa); }

.h1 {
  font-weight: 500;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.03;
  letter-spacing: -.01em;
  margin: 0 0 24px;
}
.h2 {
  font-weight: 500;
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.06;
  margin: 0 0 18px;
}
.h3 {
  font-weight: 600;
  font-size: 24px;
  margin: 0 0 8px;
}
.script-accent {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--gold);
}

.lede {
  font-size: 17px;
  line-height: 1.75;
  color: var(--cocoa-72);
  margin: 0;
}

/* ---------- Ornament divider ---------- */
.ornament {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 8px 32px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--gold);
}
.ornament span.line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(198,161,91,.6));
}
.ornament span.line.left { background: linear-gradient(to left, transparent, rgba(198,161,91,.6)); }
.ornament span.glyph { font-size: 16px; letter-spacing: .4em; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Solid (no backdrop-filter) — blur-under-scroll is repainted every
     frame and is the single biggest cause of sticky-header scroll jank. */
  background: rgba(250,243,231,.97);
  border-bottom: 1px solid rgba(198,161,91,.35);
  transform: translateZ(0);
}
.nav {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo {
  font-family: var(--font-script);
  font-size: 34px;
  line-height: 1;
  color: var(--cocoa);
  padding-top: 6px;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-link {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cocoa);
  transition: color .25s;
  padding: 4px 0;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--gold); }
.nav-cta {
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--cocoa);
  border: 1px solid var(--cocoa);
  padding: 11px 22px;
  transition: all .25s;
}
.nav-cta:hover { background: var(--cocoa); color: var(--ivory); }

.hamburger {
  display: none;
  background: none;
  border: 1px solid rgba(62,36,24,.4);
  color: var(--cocoa);
  width: 44px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 32px 22px;
  border-top: 1px solid rgba(198,161,91,.25);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  padding: 12px 0;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(198,161,91,.2);
}
.mobile-menu a:last-child { border-bottom: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: inline-flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 16px 32px;
  transition: all .3s;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--cocoa); color: var(--ivory); }
.btn-primary:hover { background: var(--berry); }
.btn-ghost { border-color: var(--cocoa); color: var(--cocoa); }
.btn-ghost:hover { background: var(--blush); border-color: var(--blush); }
.btn-gold { background: var(--gold); color: var(--charcoal); font-size: 12.5px; padding: 13px 26px; }
.btn-gold:hover { background: var(--blush); }
.btn-small {
  font-size: 11.5px;
  padding: 10px 20px;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.text-link {
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cocoa);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 4px;
  transition: color .25s;
  display: inline-block;
}
.text-link:hover { color: var(--gold); }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid rgba(198,161,91,.4);
  transition: transform .35s ease, box-shadow .35s ease;
  content-visibility: auto;
  contain-intrinsic-size: 0 420px;
}
.card:hover {
  transform: translateY(-6px);
  /* content-visibility: auto (above) implies paint containment, which
     clips box-shadow at the border box — kept tight/high-fade so that
     containment isn't visually noticeable, instead of a shadow that
     bleeds 50px+ and gets hard-cut at the edge. */
  box-shadow: 0 14px 22px -12px rgba(62,36,24,.45);
}
.card-media { overflow: hidden; background: linear-gradient(155deg, var(--blush), var(--ivory)); }
.card-media img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  transition: transform .8s ease;
}
.card:hover .card-media img { transform: scale(1.06); }
.card-body { padding: 22px 20px 26px; }
.card-body p { font-size: 14px; line-height: 1.6; color: var(--cocoa-66); margin: 0; }

/* ---------- Placeholder photo pattern ---------- */
.placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(155deg, var(--blush), var(--ivory));
  border: 1px solid rgba(198,161,91,.5);
  color: var(--berry);
}
.placeholder svg { width: 38px; height: 38px; opacity: .85; }
.placeholder span {
  font-family: var(--font-body);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cocoa-66);
  text-align: center;
  padding: 0 12px;
}

.photo-frame {
  background: #fff;
  padding: 10px;
  border: 1px solid rgba(198,161,91,.5);
  box-shadow: 0 40px 80px -44px rgba(62,36,24,.5);
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 7vw, 100px) 32px 40px; }
.section-tight { padding: clamp(40px, 5vw, 72px) 32px; }
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(40px, 5vw, 60px);
}
.section-white {
  background: #fff;
  border-top: 1px solid rgba(198,161,91,.3);
  border-bottom: 1px solid rgba(198,161,91,.3);
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(18px, 2.2vw, 30px);
}
.grid-auto-sm {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(12px, 1.4vw, 18px);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: var(--ivory); }
.footer-top {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(52px, 6vw, 88px) 32px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 72px);
  justify-content: space-between;
}
.footer-logo { font-family: var(--font-script); font-size: 44px; line-height: 1; margin: 0 0 18px; }
.footer-label {
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 16px;
  font-weight: 600;
}
.footer-bottom {
  border-top: 1px solid rgba(198,161,91,.25);
}
.footer-bottom-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: .08em;
  color: rgba(250,243,231,.5);
}

/* ---------- Notice banner ---------- */
.notice {
  background: var(--blush);
  border: 1px solid rgba(198,161,91,.5);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--cocoa);
}
.notice strong { color: var(--berry); }

/* ---------- Filter tabs ---------- */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(32px, 4vw, 48px);
}
.filter-tab {
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 10px 18px;
  border: 1px solid rgba(198,161,91,.5);
  background: transparent;
  color: var(--cocoa);
  cursor: pointer;
  transition: all .25s;
}
.filter-tab:hover { border-color: var(--cocoa); }
.filter-tab.is-active { background: var(--cocoa); border-color: var(--cocoa); color: var(--ivory); }

.menu-card { display: flex; flex-direction: column; }
.menu-card.is-hidden { display: none; }

/* ---------- Gallery / Instagram figures ---------- */
.gallery-figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(198,161,91,.35);
  content-visibility: auto;
  contain-intrinsic-size: 0 340px;
}
.gallery-figure img { width: 100%; aspect-ratio: 4/5; object-fit: cover; transition: transform .8s ease; }
.gallery-figure:hover img { transform: scale(1.07); }
.gallery-figure figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 34px 18px 16px;
  background: linear-gradient(to top, rgba(33,28,27,.78), transparent);
  color: var(--ivory);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
}
.insta-figure {
  position: relative;
  display: block;
  overflow: hidden;
  background: #fff;
  content-visibility: auto;
  contain-intrinsic-size: 0 240px;
}
.insta-figure img { width: 100%; aspect-ratio: 1/1; object-fit: cover; opacity: .96; transition: transform .7s ease, opacity .4s; }
.insta-figure:hover img { transform: scale(1.08); opacity: 1; }

/* ---------- Stats ---------- */
.stat { text-align: center; }
.stat svg { width: 30px; height: 30px; color: var(--gold); margin: 0 auto 14px; }
.stat .num { font-family: var(--font-serif); font-size: clamp(30px, 3.4vw, 42px); color: var(--cocoa); font-weight: 600; margin: 0 0 4px; }
.stat .label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--cocoa-66); }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 22px; }
.form-field label {
  display: block;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--cocoa);
  margin-bottom: 8px;
}
.form-field .required { color: var(--berry); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--cocoa);
  background: #fff;
  border: 1px solid rgba(198,161,91,.5);
  padding: 13px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(198,161,91,.2);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input[type="file"] {
  border: 1px dashed rgba(198,161,91,.6);
  padding: 20px 14px;
  cursor: pointer;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: var(--berry);
}
.form-error {
  display: none;
  font-size: 12.5px;
  color: var(--berry);
  margin-top: 6px;
}
.form-field.has-error .form-error { display: block; }

.form-status {
  display: none;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 14px;
  border: 1px solid var(--sage);
  background: rgba(124,138,92,.12);
  color: var(--cocoa);
}
.form-status.is-visible { display: block; }

/* ---------- Accordion ---------- */
.accordion-item {
  border-bottom: 1px solid rgba(198,161,91,.35);
}
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  text-align: left;
  padding: 20px 0;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--cocoa);
}
.accordion-trigger .icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1px solid var(--gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform .3s;
}
.accordion-item.is-open .accordion-trigger .icon { transform: rotate(45deg); }
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.accordion-panel p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--cocoa-72);
  margin: 0 0 22px;
}

/* ---------- Sidebar box ---------- */
.info-box {
  background: #fff;
  border: 1px solid rgba(198,161,91,.4);
  padding: 28px 26px;
}
.info-box + .info-box { margin-top: 20px; }

/* ---------- Utility ---------- */
.flex-center { display: flex; align-items: center; }
.mt-0 { margin-top: 0; }
.text-ivory { color: var(--ivory); }
.bg-blush { background: var(--blush); }
.bg-charcoal { background: var(--charcoal); color: var(--ivory); }

.page-header {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(48px,6vw,80px) 32px clamp(24px,3vw,36px);
  text-align: center;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--cocoa);
  color: var(--ivory);
  padding: 12px 20px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }
