/* FizzUp - practice project
   The whole color scheme comes from 4 variables. JavaScript only changes
   data-flavor on <html>; the rules below do the rest. */
:root {
  --bg: #4a1f78;
  --fg: #fff6e0;
  --accent: #ffd23f;
  --can: #6e2fb0;
  --can-dark: #4b1d78;
  --ink: #1b1030;
  --display: 'Anton', Impact, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
}
html[data-flavor='citrus'] { --bg: #f4b400; --fg: #241a00; --accent: #2b6b2f; --can: #3f8f3a; --can-dark: #265c23; --ink: #241a00; }
html[data-flavor='melon']  { --bg: #ef5b6f; --fg: #fff4ec; --accent: #1f5a3a; --can: #1f7a4c; --can-dark: #124a2e; --ink: #3b0f19; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--body); background: var(--bg); color: var(--fg); line-height: 1.6; transition: background 0.5s, color 0.5s; overflow-x: hidden; }
img { display: block; max-width: 100%; }
h1, h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: 0.98; letter-spacing: 0.01em; }
h2 { font-size: clamp(2.2rem, 5.5vw, 4rem); }
a { color: inherit; }

/* ----- Navbar ----- */
.navbar { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 16px 5%; background: var(--bg); transition: background 0.5s; border-bottom: 2px solid currentColor; }
.logo { font-family: var(--display); font-size: 1.8rem; text-decoration: none; letter-spacing: 0.04em; }
.nav-links { display: flex; align-items: center; gap: 28px; font-weight: 600; font-size: 0.92rem; }
.nav-links a { text-decoration: none; }
.nav-links a:not(.nav-cta):hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav-cta { background: var(--accent); color: var(--bg); padding: 8px 18px; border-radius: 6px; transition: transform 0.15s; }
html[data-flavor='citrus'] .nav-cta, html[data-flavor='melon'] .nav-cta { color: #fff; }
.nav-cta:hover { transform: rotate(-3deg) scale(1.05); }
.menu-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; position: relative; color: inherit; cursor: pointer; }
.menu-toggle span { position: absolute; left: 8px; right: 8px; height: 3px; background: currentColor; transition: transform 0.25s; }
.menu-toggle span:first-child { top: 14px; }
.menu-toggle span:last-child { top: 22px; }
.menu-toggle[aria-expanded='true'] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded='true'] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ----- Hero ----- */
.hero { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 30px; padding: 110px 5% 60px; max-width: 1250px; margin: 0 auto; }
.tag { display: inline-block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; border: 2px solid currentColor; padding: 5px 12px; border-radius: 30px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(4.5rem, 13vw, 9.5rem); }
#flavor-word { color: var(--accent); display: inline-block; transition: transform 0.3s; }
.hero-text { max-width: 440px; font-size: 1.1rem; margin: 22px 0 30px; }
.btn { display: inline-block; background: var(--fg); color: var(--bg); text-decoration: none; font-weight: 800; padding: 15px 30px; border-radius: 6px; box-shadow: 5px 5px 0 var(--accent); transition: transform 0.15s, box-shadow 0.15s; }
.btn:hover { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--accent); }

/* ----- CSS can ----- */
.can-stage { position: relative; height: 480px; display: flex; justify-content: center; align-items: center; }
.can-shadow { position: absolute; bottom: 36px; width: 210px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, 0.28); filter: blur(8px); animation: shadow 4s ease-in-out infinite; }
.can { position: relative; width: 200px; height: 390px; animation: float 4s ease-in-out infinite; }
.can-rim { position: absolute; top: 0; left: 6px; right: 6px; height: 28px; border-radius: 50%; background: #d9dde3; border: 3px solid #aeb4bd; z-index: 2; }
.can-body { position: absolute; top: 14px; bottom: 0; left: 0; right: 0; background: var(--can); border-radius: 18px 18px 30px 30px / 14px 14px 26px 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; overflow: hidden; transition: background 0.5s; box-shadow: inset -22px 0 0 rgba(0, 0, 0, 0.16); }
.can-body::before { content: ''; position: absolute; inset: 55% -10% auto -10%; height: 46px; background: var(--accent); transform: rotate(-6deg); transition: background 0.5s; opacity: 0.95; }
.can-brand { position: relative; font-family: var(--display); font-size: 3rem; color: #fff; transform: rotate(-5deg); text-transform: uppercase; letter-spacing: 0.02em; text-shadow: 3px 3px 0 var(--can-dark); }
.can-flavor { position: relative; font-weight: 800; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: #fff; }
.can-size { position: absolute; bottom: 22px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.16em; color: #fff; opacity: 0.85; }
.can-shine { position: absolute; top: 40px; bottom: 30px; left: 22px; width: 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.38); }
.bubble { position: absolute; border: 2.5px solid currentColor; border-radius: 50%; opacity: 0; animation: rise 5s linear infinite; }
.b1 { width: 22px; height: 22px; left: 18%; bottom: 60px; }
.b2 { width: 14px; height: 14px; left: 74%; bottom: 40px; animation-delay: 1.6s; }
.b3 { width: 30px; height: 30px; left: 82%; bottom: 110px; animation-delay: 3s; }
.b4 { width: 12px; height: 12px; left: 8%; bottom: 140px; animation-delay: 2.2s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-18px) rotate(2deg); } }
@keyframes shadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(0.82); opacity: 0.6; } }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 0.9; } 100% { transform: translateY(-260px); opacity: 0; } }

/* ----- Marquee ----- */
.marquee { background: var(--accent); color: var(--bg); overflow: hidden; border-block: 3px solid var(--fg); transform: rotate(-1.2deg); margin: 0 -2%; padding: 10px 0; }
html[data-flavor='citrus'] .marquee, html[data-flavor='melon'] .marquee { color: #fff; }
.marquee-track { display: flex; gap: 28px; width: max-content; font-family: var(--display); font-size: 1.6rem; letter-spacing: 0.06em; animation: slide 22s linear infinite; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ----- Sections ----- */
.section { max-width: 1150px; margin: 0 auto; padding: 100px 5%; }
.section-sub { margin-top: 16px; max-width: 480px; opacity: 0.9; }
.flavor-picker { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.flavor-btn { font: 800 1rem var(--body); color: inherit; background: transparent; border: 2.5px solid currentColor; border-radius: 40px; padding: 12px 24px 12px 16px; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: transform 0.15s, background 0.2s, color 0.2s; }
.flavor-btn:hover { transform: translateY(-3px) rotate(-1deg); }
.flavor-btn.active { background: var(--fg); color: var(--bg); }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; }
[data-flavor='berry'].flavor-btn .dot { background: #6e2fb0; }
[data-flavor='citrus'].flavor-btn .dot { background: #f4b400; }
[data-flavor='melon'].flavor-btn .dot { background: #ef5b6f; }
.flavor-desc { margin-top: 22px; font-size: 1.1rem; min-height: 3.4em; max-width: 520px; }

.glass { display: grid; grid-template-columns: 1.1fr 1fr; grid-template-rows: auto auto; gap: 40px; align-items: center; }
.glass-photo { position: relative; }
.glass-photo img { width: 100%; object-fit: cover; border: 4px solid var(--fg); border-radius: 6px; box-shadow: 10px 10px 0 var(--accent); transition: transform 0.3s; }
.glass-photo.big { grid-row: span 2; }
.glass-photo.big img { aspect-ratio: 4 / 4.6; }
.glass-photo.small img { aspect-ratio: 16 / 10; }
.glass-photo:hover img { transform: rotate(-1deg); }
.glass-photo figcaption { margin-top: 20px; font-size: 0.85rem; font-weight: 600; opacity: 0.85; }
.glass-copy p { margin-top: 16px; max-width: 460px; }
.glass-copy h2 { font-size: clamp(2rem, 4vw, 3rem); }

.label-section h2 { margin-bottom: 36px; }
.label-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.label { width: 100%; border: 4px solid var(--fg); border-collapse: collapse; background: var(--fg); color: var(--ink); transform: rotate(-1.5deg); }
.label caption { caption-side: top; text-align: left; font-weight: 800; font-size: 0.8rem; padding: 12px 16px; background: var(--ink); color: var(--fg); }
.label th, .label td { padding: 12px 16px; border-bottom: 2px solid var(--ink); text-align: left; }
.label td { text-align: right; font-weight: 800; }
.steps { list-style: none; display: grid; gap: 16px; }
.steps li { font-size: 1.1rem; display: flex; gap: 16px; align-items: baseline; }
.steps b { font-family: var(--display); font-size: 2rem; color: var(--accent); font-weight: 400; }

.buy-card { border: 4px solid var(--fg); border-radius: 6px; padding: 60px 8%; text-align: center; box-shadow: 10px 10px 0 var(--accent); }
.buy-card p { max-width: 520px; margin: 18px auto 0; }
.price { font-family: var(--display); font-size: clamp(4rem, 10vw, 7rem); color: var(--accent); line-height: 1; }

.footer { text-align: center; padding: 40px 5% 50px; font-size: 0.85rem; opacity: 0.85; display: grid; gap: 6px; }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s, transform 0.6s; }
.reveal.visible { opacity: 1; transform: none; }
.label.reveal.visible { transform: rotate(-1.5deg); }

/* ----- Responsive ----- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: left; padding-top: 100px; }
  .can-stage { height: 440px; }
  .glass, .label-wrap { grid-template-columns: 1fr; }
  .glass-photo.big { grid-row: auto; }
  .section { padding: 70px 6%; }
}
@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px 6% 26px; background: var(--bg); border-bottom: 2px solid currentColor; display: none; }
  .nav-links.open { display: flex; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }
