/* =========================================================
   STARS HOLLOW / GILMORE GIRLS AUTUMN THEME STYLES
   ========================================================= */

:root {
  --cream: #f6ead2;
  --paper: #fcf5e6;
  --stone: #efdfc0;
  --rust: #b5532a;
  --burg: #6e1f2b;
  --gold: #d49a2a;
  --pine: #3f5a3c;
  --cof: #3b2a20;
  --hand: "Caveat", cursive;
  --disp: "Fraunces", Georgia, serif;
  --body: "Lora", Georgia, serif;
  --ease: cubic-bezier(.22,1,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--cream); color: var(--cof); font: 400 clamp(18px, 1.3vw, 21px)/1.7 var(--body); overflow-x: hidden; }
body.locked { overflow: hidden; height: 100vh; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--disp); font-weight: 700; line-height: 1.05; }
.hand { font-family: var(--hand); font-weight: 700; }
.big { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.2; }
.w { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }
section { padding: clamp(80px, 10vw, 150px) 0; position: relative; }
.eyebrow { font: 700 clamp(28px, 2.6vw, 36px) var(--hand); color: var(--rust); display: block; margin-bottom: 4px; }
h2 { font-size: clamp(2.6rem, 6vw, 5rem); margin-bottom: 18px; letter-spacing: -.01em; }
.lead { max-width: 55ch; opacity: .88; }
.dark { background: var(--pine); color: var(--cream); }
.dark .eyebrow { color: var(--gold); }
.warm { background: var(--stone); }

.plaid { 
  height: 36px; 
  background: repeating-linear-gradient(90deg, rgba(110,31,43,.85) 0 24px, transparent 24px 48px),
              repeating-linear-gradient(0deg, rgba(63,90,60,.8) 0 12px, transparent 12px 24px), var(--paper); 
}

.btn { 
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 32px; 
  border-radius: 999px; background: var(--cream); color: var(--burg); 
  font: 700 18px var(--disp); border: 2px solid var(--cream); cursor: pointer; 
  transition: .5s var(--ease); box-shadow: 0 4px 14px rgba(59,42,32,.15);
}
.btn:hover { background: transparent; color: var(--cream); transform: translateY(-3px); }
.btn.ghost { background: transparent; color: var(--cream); }
.btn.ghost:hover { background: var(--cream); color: var(--burg); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--cof); }
.btn.gold:hover { background: transparent; color: var(--gold); }

/* Floating Coffee Cup Widget with Steam */
.coffee-widget {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 58px; height: 58px; background: var(--burg); color: #fff;
  border-radius: 50%; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(59,42,32,.35); border: 2px solid var(--gold);
  cursor: pointer; transition: transform .3s var(--ease);
}
.coffee-widget:hover { transform: scale(1.1) rotate(5deg); }
.coffee-cup { font-size: 28px; line-height: 1; }
.steam-container { position: absolute; top: -14px; display: flex; gap: 4px; }
.steam { font-family: var(--hand); font-size: 16px; color: var(--gold); opacity: 0; animation: steamRise 2s infinite ease-out; }
.steam.s2 { animation-delay: 0.6s; }
.steam.s3 { animation-delay: 1.2s; }
@keyframes steamRise {
  0% { transform: translateY(6px); opacity: 0; }
  50% { opacity: 0.8; }
  100% { transform: translateY(-12px); opacity: 0; }
}

/* Falling Leaves Animation */
#leaves { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
#leaves i { position: absolute; top: -10vh; font-style: normal; opacity: .85; animation: fall linear infinite; }
@keyframes fall { to { transform: translate3d(var(--dx), 115vh, 0) rotate(var(--r)); } }

/* Gate */
#gate { 
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; text-align: center; 
  padding: 24px; color: var(--cream); 
  background: radial-gradient(ellipse at 50% 25%, #c9622b, #6e1f2b 72%); 
  transition: transform 1.3s var(--ease), opacity 1.1s; 
}
#gate.open { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.gate-card { 
  max-width: 640px; border: 2px dashed rgba(246,234,210,.55); border-radius: 12px; 
  padding: clamp(28px,5vw,64px); background: rgba(59,42,32,.35); 
  backdrop-filter: blur(4px); animation: rise 1.2s var(--ease) both; 
}
.gate-card h1 { font-size: clamp(2.8rem, 8vw, 5.5rem); margin: 8px 0 16px; }
.gate-card p { margin-bottom: 28px; opacity: .95; }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }

/* Nav */
.nav { 
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; 
  justify-content: space-between; align-items: center; gap: 16px; 
  padding: 16px clamp(18px, 4vw, 48px); color: var(--cream); transition: .4s; 
}
.nav.sc { background: rgba(110,31,43,.94); backdrop-filter: blur(10px); padding-block: 10px; }
.nav > a { font-size: 30px; }
.nav div { display: flex; gap: clamp(14px, 2.4vw, 34px); font-size: 16px; }
.nav div a { position: relative; }
.nav div a:after { 
  content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 2px; 
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: .4s var(--ease); 
}
.nav div a:hover:after { transform: scaleX(1); }

/* Hero */
.hero { 
  min-height: 100svh; display: grid; place-items: center; text-align: center; 
  color: var(--cream); padding: 130px 0 90px; overflow: hidden; 
  background: radial-gradient(55% 45% at 82% 14%, rgba(212,154,42,.5), transparent 70%), 
              radial-gradient(40% 40% at 8% 90%, rgba(63,90,60,.45), transparent 70%), 
              linear-gradient(165deg, #6e1f2b, #a4442a 65%, #c9822b); 
}
.hero h1 { font-size: clamp(4.5rem, 18vw, 15rem); letter-spacing: -.04em; line-height: .85; animation: rise 1.4s var(--ease) both .2s; }
.hero .sub { font: italic 500 clamp(2rem, 5vw, 4rem)/1.1 var(--disp); animation: rise 1.4s var(--ease) both .45s; }
.sign { 
  display: inline-block; border: 3px solid var(--cream); border-radius: 8px; 
  padding: 6px 22px; margin-bottom: 30px; transform: rotate(-2deg); 
  font-size: clamp(20px, 2vw, 28px); background: rgba(59,42,32,.3); 
}

/* Photo Wall */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 56px 38px; margin-top: 64px; }
.pol { 
  background: #fffdf7; padding: 14px 14px 12px; box-shadow: 0 14px 34px rgba(59,42,32,.2); 
  transform: rotate(var(--rot)); transition: transform .6s var(--ease); cursor: pointer; 
  position: relative; border: 0; font: inherit; color: inherit; text-align: center; 
}
.pol:hover { transform: rotate(0) scale(1.06) translateY(-8px); z-index: 2; }
.pol:before { 
  content: ""; position: absolute; top: -15px; left: 50%; width: 96px; height: 30px; 
  margin-left: -48px; background: rgba(212,154,42,.55); transform: rotate(-3deg); 
}
.pol img { aspect-ratio: 4/5; width: 100%; object-fit: cover; border-radius: 2px; }
.pol .pol-caption { display: block; font: 700 26px/1.2 var(--hand); margin-top: 10px; color: var(--cof); }
.stack-badge {
  position: absolute; top: 22px; right: 22px; background: rgba(59,42,32,.85); color: #fff;
  font: 700 13px var(--body); padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(4px); z-index: 3;
}
.multi-card:after {
  content: ""; position: absolute; inset: -4px; border: 2px solid var(--gold); border-radius: 4px;
  pointer-events: none; opacity: 0.7;
}

/* Reason Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 24px; margin-top: 52px; }
.rc { perspective: 900px; min-height: 250px; border: 0; background: none; cursor: pointer; }
.rc > div { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s var(--ease); }
.rc.f > div { transform: rotateY(180deg); }
.rc p { 
  position: absolute; inset: 0; backface-visibility: hidden; display: grid; place-items: center; 
  padding: 24px; border-radius: 8px; text-align: center; 
}
.rc .a { background: var(--paper); color: var(--burg); font: 700 3.8rem var(--disp); box-shadow: 0 10px 26px rgba(0,0,0,.25); }
.rc .b { background: var(--gold); color: var(--cof); transform: rotateY(180deg); font: 700 24px/1.3 var(--hand); }
.spark { margin-top: 60px; text-align: center; }
.spark p { margin-top: 22px; min-height: 2.4em; color: var(--gold); }

/* Us & Memories Scrapbook Section */
.us-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 36px; margin-top: 54px;
}
.us-card {
  background: var(--paper); padding: 16px 16px 14px; border-radius: 4px;
  box-shadow: 0 12px 30px rgba(59,42,32,.18); transform: rotate(var(--rot));
  cursor: pointer; transition: transform .5s var(--ease); position: relative;
  border: 1px solid rgba(181,83,42,.2);
}
.us-card:hover { transform: scale(1.05) rotate(0); z-index: 3; }
.us-card img { aspect-ratio: 1/1; object-fit: cover; border-radius: 3px; }
.us-cap { display: block; text-align: center; margin-top: 10px; font-size: 26px; color: var(--burg); }

/* Main Letter */
.letter { 
  background: var(--paper); padding: clamp(30px, 5vw, 70px); max-width: 820px; border-radius: 6px; 
  box-shadow: 0 20px 50px rgba(59,42,32,.22); 
  background-image: repeating-linear-gradient(transparent 0 41px, rgba(181,83,42,.18) 41px 42px); 
  font: 700 clamp(24px, 2.2vw, 30px)/42px var(--hand); margin: 48px 0 0; transform: rotate(-.8deg); 
}
.letter h3 { font: 700 clamp(2.2rem, 3.2vw, 3rem)/1.2 var(--hand); margin-bottom: 16px; color: var(--burg); }
.letter p { margin-bottom: 21px; }
.sign-p { margin-top: 32px; color: var(--rust); }

/* Coupons */
.coupons { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 30px; margin-top: 56px; }
.cp { 
  position: relative; background: var(--gold); color: var(--cof); padding: 30px 30px 26px 36px; 
  border-radius: 10px; border: 3px dashed rgba(59,42,32,.55); transition: .5s var(--ease); 
}
.cp:hover { transform: rotate(-1.2deg) translateY(-6px); }
.cp h3 { font-size: clamp(1.6rem, 2.3vw, 2.1rem); margin-bottom: 8px; }
.cp p { font-size: 17px; margin-bottom: 18px; line-height: 1.5; opacity: 0.95; }
.cp button { 
  font: 700 17px var(--disp); padding: 10px 24px; border-radius: 999px; 
  border: 2px solid var(--cof); background: transparent; cursor: pointer; transition: .4s; 
}
.cp button:hover { background: var(--cof); color: var(--gold); }
.cp.used { filter: saturate(.4); opacity: .75; }
.cp.used h3 { text-decoration: line-through; }

footer { background: var(--cof); color: var(--cream); text-align: center; padding: 70px 20px 80px; }
footer p+p { opacity: .7; font-size: 15px; margin-top: 6px; }

/* Lightbox & Dynamic Carousel Controls */
.lb { position: fixed; inset: 0; z-index: 150; display: none; place-items: center; padding: 20px; background: rgba(59,42,32,.88); overflow: auto; }
.lb.on { display: grid; animation: rise .5s var(--ease); }
.lb .box { position: relative; max-width: min(560px, 100%); width: 100%; }
.lb .lb-pol { transform: rotate(-1deg); cursor: default; }
.lb .x { 
  position: absolute; top: -14px; right: -6px; z-index: 10; width: 44px; height: 44px; 
  border-radius: 50%; border: 0; background: var(--burg); color: var(--cream); 
  font-size: 26px; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.carousel-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.c-btn {
  background: var(--burg); color: #fff; border: 0; width: 38px; height: 38px; border-radius: 50%;
  font-size: 24px; cursor: pointer; transition: background .3s; display: grid; place-items: center;
}
.c-btn:hover { background: var(--rust); }
.c-counter { font: 700 18px var(--hand); color: var(--cof); }

@media(max-width:820px) {
  .nav div a:nth-child(n+3) { display: none; }
}
@media(prefers-reduced-motion:reduce) {
  #leaves { display: none; }
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}