/* ==========================================================================
   T-FATHER-GENTLEMAN-WATCH: THE GENTLEMAN WATCHMAKER — TIMELESS LEGACY
   ========================================================================== */
:root {
  --bg-dark: #12100e;
  --bg-card: rgba(26, 22, 18, 0.82);
  --bg-card-hover: rgba(38, 32, 26, 0.94);
  --gold-primary: #d4af37;
  --gold-light: #f3e5ab;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --leather-brown: #8b4513;
  --text-main: #fdfbf7;
  --text-muted: #a89f91;
  --border-gold: rgba(212, 175, 55, 0.28);
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Background Gears Canvas */
#gears-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  pointer-events: none;
}

/* Audio Control */
.audio-ctrl {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 50;
}

.audio-btn {
  background: rgba(26, 22, 18, 0.88);
  color: var(--gold-primary);
  border: 1px solid var(--border-gold);
  padding: 0.6rem 1.15rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.audio-btn:hover {
  background: rgba(212, 175, 55, 0.16);
  border-color: var(--gold-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--gold-glow);
}

/* Passcode Modal */
.passcode-modal {
  position: fixed;
  inset: 0;
  background: rgba(12, 10, 8, 0.95);
  backdrop-filter: blur(16px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.passcode-modal.unlocked {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.passcode-card {
  background: linear-gradient(145deg, rgba(32, 26, 20, 0.92), rgba(18, 15, 12, 0.98));
  border: 1.5px solid var(--border-gold);
  border-radius: 1.5rem;
  padding: 2.25rem 1.75rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.7), 0 0 30px var(--gold-glow);
}

.passcode-icon {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 10px var(--gold-primary));
}

.passcode-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  color: var(--gold-primary);
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.passcode-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

.pin-row {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  background: transparent;
  transition: all 0.2s ease;
}

.pin-dot.filled {
  background: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-primary);
  transform: scale(1.15);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  max-width: 260px;
  margin: 0 auto;
}

.key-btn {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 0.85rem;
  font-size: 1.25rem;
  font-weight: 600;
  padding: 0.8rem 0;
  cursor: pointer;
  transition: all 0.18s ease;
}

.key-btn:hover, .key-btn:active {
  background: rgba(212, 175, 55, 0.22);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  transform: scale(1.05);
}

.key-hint {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--gold-light);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Main Container */
.main-wrapper {
  position: relative;
  z-index: 10;
  max-width: 900px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 5rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 2rem 0 3rem;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold-primary);
  font-family: var(--font-serif);
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  padding: 0.45rem 1.15rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
}

.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 6.2vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: #fff;
}

.hero-heading span {
  display: block;
  background: linear-gradient(135deg, #fdfbf7 0%, #d4af37 60%, #b8860b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 16px var(--gold-glow));
}

.hero-desc {
  max-width: 650px;
  margin: 0 auto 2.5rem;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
}

/* Interactive Pocket Watch Stage */
.watch-stage {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.watch-stage:hover {
  transform: scale(1.06);
}

.watch-crown {
  position: absolute;
  top: -14px;
  width: 24px;
  height: 14px;
  background: linear-gradient(to bottom, #d4af37, #8b6b1b);
  border-radius: 4px 4px 0 0;
  border: 1.5px solid #f3e5ab;
  z-index: 5;
}

.watch-case {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #241d17 0%, #120e0a 85%);
  border: 4px solid var(--gold-primary);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 25px var(--gold-glow);
}

.watch-dial {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px dashed rgba(212, 175, 55, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dial-mark {
  position: absolute;
  font-family: var(--font-serif);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold-primary);
}

.mark-12 { top: 4px; }
.mark-3  { right: 6px; }
.mark-6  { bottom: 4px; }
.mark-9  { left: 6px; }

.watch-hand-hour {
  position: absolute;
  top: 28%;
  left: 50%;
  width: 3px;
  height: 38px;
  background: var(--gold-light);
  transform-origin: 50% 100%;
  transform: rotate(45deg);
  border-radius: 2px;
}

.watch-hand-minute {
  position: absolute;
  top: 18%;
  left: 50%;
  width: 2px;
  height: 52px;
  background: var(--gold-primary);
  transform-origin: 50% 100%;
  transform: rotate(180deg);
  border-radius: 1px;
}

.watch-hand-second {
  position: absolute;
  top: 12%;
  left: 50%;
  width: 1px;
  height: 60px;
  background: #ef4444;
  transform-origin: 50% 100%;
  animation: tick-second 60s infinite steps(60);
}

@keyframes tick-second {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.watch-pivot {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--gold-primary);
  border-radius: 50%;
  z-index: 6;
  border: 1.5px solid #120e0a;
}

.stage-caption {
  font-size: 0.85rem;
  color: var(--gold-primary);
  letter-spacing: 0.06em;
  margin-bottom: 3.5rem;
}

/* Quotes Section */
.quotes-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

@media (min-width: 640px) {
  .quotes-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

.quote-box {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 1.25rem;
  padding: 1.75rem;
  position: relative;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

.quote-box::before {
  content: "“";
  position: absolute;
  top: 0.5rem;
  left: 1.2rem;
  font-size: 3.5rem;
  color: rgba(212, 175, 55, 0.18);
  font-family: var(--font-serif);
  line-height: 1;
}

.quote-text {
  font-size: 0.96rem;
  font-style: italic;
  color: #f3e5ab;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 1;
}

.quote-author {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  color: var(--gold-primary);
}

/* Memories Timeline Grid */
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  text-align: center;
  color: var(--gold-primary);
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2.25rem;
}

.memories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 4rem;
}

@media (min-width: 640px) {
  .memories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.memory-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 1.25rem;
  padding: 1.6rem;
  backdrop-filter: blur(10px);
  transition: all 0.28s ease;
  position: relative;
}

.memory-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  border-color: var(--gold-light);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px var(--gold-glow);
}

.mem-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.mem-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 8px var(--gold-glow));
}

.mem-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
}

.mem-era {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: var(--gold-primary);
  margin-bottom: 0.35rem;
}

.mem-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
}

.mem-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Heartfelt Letter Article */
.letter-article {
  background: linear-gradient(170deg, rgba(28, 23, 19, 0.94) 0%, rgba(16, 13, 10, 0.98) 100%);
  border: 1.5px solid var(--border-gold);
  border-radius: 1.5rem;
  padding: clamp(1.75rem, 5vw, 3rem);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(212, 175, 55, 0.15);
  backdrop-filter: blur(14px);
  margin-bottom: 3.5rem;
}

.letter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.letter-date {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: var(--gold-primary);
}

.letter-badge {
  font-size: 0.75rem;
  color: var(--gold-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.letter-salutation {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.5vw, 1.85rem);
  color: #fff;
  margin-bottom: 1.5rem;
}

.letter-body p {
  font-size: clamp(0.96rem, 2.2vw, 1.05rem);
  color: #e2d9cc;
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.letter-ps {
  margin-top: 2rem;
  padding: 1.25rem;
  background: rgba(212, 175, 55, 0.08);
  border-left: 3px solid var(--gold-primary);
  border-radius: 0 0.75rem 0.75rem 0;
  font-size: 0.95rem;
  color: #f3e5ab;
  font-style: italic;
}

.letter-sig {
  margin-top: 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.sig-title {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.sig-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold-primary);
}

/* Apology / Late Banner */
.apology-box {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.16), rgba(139, 69, 19, 0.2));
  border: 1px solid var(--border-gold);
  border-radius: 1.25rem;
  padding: 1.85rem 1.5rem;
  text-align: center;
  margin-bottom: 3.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.apology-badge {
  display: inline-block;
  background: var(--gold-primary);
  color: #12100e;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.9rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.apology-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 3.2vw, 1.7rem);
  color: #f3e5ab;
  margin-bottom: 0.6rem;
}

.apology-subtext {
  color: #e2d9cc;
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Cake Blowout Section */
.cake-section {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 1.5rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-bottom: 3.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
}

.cake-stage {
  margin: 2.5rem auto 2rem;
  display: inline-block;
  cursor: pointer;
  position: relative;
}

.candles-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: -4px;
}

.candle {
  width: 14px;
  height: 48px;
  background: linear-gradient(to bottom, #f3e5ab, #d4af37);
  border-radius: 6px 6px 0 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.flame {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 24px;
  background: radial-gradient(ellipse at bottom, #ffffff 0%, #fef08a 35%, #d97706 75%, transparent 100%);
  border-radius: 50% 50% 20% 20%;
  animation: flicker 1s infinite alternate ease-in-out;
  box-shadow: 0 0 16px #d4af37, 0 0 28px #b45309;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.flame.blown-out {
  opacity: 0;
  transform: translateX(-50%) scale(0.2) translateY(-10px);
}

.cake-tier {
  background: linear-gradient(135deg, #2a221b, #15110d);
  border: 2px solid var(--gold-primary);
  border-radius: 1rem 1rem 0.5rem 0.5rem;
  padding: 1.1rem 2.5rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.1em;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 20px var(--gold-glow);
}

.blow-btn {
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
  color: #12100e;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  padding: 0.9rem 2rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 25px var(--gold-glow);
}

.blow-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.6);
}

.blow-btn.blown {
  background: #383028;
  color: #8c8275;
  box-shadow: none;
  cursor: default;
}

/* Connect / CTA Section */
.cta-section {
  text-align: center;
  padding: 2rem 0;
}

.cta-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.5vw, 1.85rem);
  color: #fff;
  margin-bottom: 0.5rem;
}

.cta-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.btn-wa {
  background: #25d366;
  color: #052310;
}

.btn-wa:hover {
  background: #20ba5a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-ig {
  background: linear-gradient(135deg, #e1306c, #f77737);
  color: #fff;
}

.btn-ig:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(225, 48, 108, 0.4);
}

@keyframes flicker {
  0% { transform: translateX(-50%) rotate(-1deg) scale(1); }
  50% { transform: translateX(-50%) rotate(2deg) scale(1.08); }
  100% { transform: translateX(-50%) rotate(-2deg) scale(0.96); }
}
