/* Design System & Custom Styling for Egg Timer Landing Page */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --bg-base: #f9f6f0; /* Soft warm cream */
  --bg-card: rgba(255, 255, 255, 0.75);
  --color-text-main: #2b2520; /* Deep cocoa brown */
  --color-text-muted: #6e645a; /* Warm grey-brown */
  --color-primary: #f28238; /* Warm orange from logo */
  --color-primary-hover: #db6e24;
  --color-secondary: #90d3c9; /* Soft mint teal from logo background */
  --color-secondary-hover: #7bbfb5;
  --color-egg: #fdfcf7; /* White clay egg shell */
  --color-shadow: rgba(43, 37, 32, 0.08);
  
  /* Font Stack */
  --font-main: 'Outfit', sans-serif;
  
  /* Borders & Shadows */
  --border-glass: 1px solid rgba(255, 255, 255, 0.4);
  --shadow-sm: 0 4px 6px -1px var(--color-shadow);
  --shadow-md: 0 10px 25px -5px var(--color-shadow), 0 8px 10px -6px var(--color-shadow);
  --shadow-lg: 0 20px 40px -10px var(--color-shadow);
  --shadow-tactile: 0 15px 30px -10px rgba(242, 130, 56, 0.2), inset 0 -4px 8px rgba(0, 0, 0, 0.1);
  --shadow-egg: 0 20px 40px -15px rgba(43, 37, 32, 0.15), inset -8px -8px 20px rgba(0, 0, 0, 0.05), inset 4px 4px 10px rgba(255, 255, 255, 0.8);
  
  /* Layout */
  --max-width: 1100px;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Dark Mode Overrides (for user preference) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-base: #181412; /* Rich dark espresso */
    --bg-card: rgba(30, 24, 21, 0.7);
    --color-text-main: #f5eeea;
    --color-text-muted: #bab0a6;
    --color-egg: #2a221d;
    --color-shadow: rgba(0, 0, 0, 0.3);
    --border-glass: 1px solid rgba(255, 255, 255, 0.08);
    --shadow-egg: 0 20px 40px -15px rgba(0, 0, 0, 0.4), inset -8px -8px 20px rgba(255, 255, 255, 0.02), inset 4px 4px 10px rgba(0, 0, 0, 0.2);
  }
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-base);
  color: var(--color-text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.25rem;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  color: var(--color-text-muted);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Glassmorphism Containers */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: var(--border-glass);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  box-shadow: var(--shadow-lg);
}

/* Layout Utilities */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 8rem 0;
  position: relative;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition-smooth);
}

header.scrolled {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
  border-bottom: var(--border-glass);
  padding: 0.75rem 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--color-text-main);
  transition: var(--transition-bounce);
}

.logo-container:hover {
  transform: scale(1.03);
}

.logo-container img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-text-muted);
  transition: var(--transition-smooth);
  position: relative;
}

.nav-links a:hover {
  color: var(--color-text-main);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: var(--transition-smooth);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition-bounce);
  gap: 0.75rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #ff9f59);
  color: #ffffff;
  box-shadow: var(--shadow-tactile);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 20px 35px -10px rgba(242, 130, 56, 0.35);
  background: linear-gradient(135deg, var(--color-primary-hover), #ff8d3f);
}

.btn-primary:active {
  transform: translateY(-1px) scale(1.0);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--color-text-main);
  border: var(--border-glass);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  transform: translateY(-3px) scale(1.03);
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

/* Hero Section */
#hero {
  padding-top: 10rem;
  padding-bottom: 6rem;
  display: flex;
  align-items: center;
  min-height: 90vh;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  background: rgba(144, 211, 201, 0.15);
  color: #4a9e92;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(144, 211, 201, 0.25);
  animation: float 4s ease-in-out infinite;
}

.hero-cta {
  display: flex;
  gap: 1.25rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.hero-media {
  display: flex;
  justify-content: center;
  position: relative;
  opacity: 0;
  transform: scale(0.9);
  animation: scaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero-img-wrapper {
  position: relative;
  width: 100%;
  max-width: 380px;
}

.hero-img-wrapper img {
  width: 100%;
  border-radius: 36px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-bounce);
}

.hero-img-wrapper:hover img {
  transform: rotate(2deg) scale(1.02);
}

/* Background blob decorations */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.6;
}

.blob-orange {
  width: 350px;
  height: 350px;
  background: rgba(242, 130, 56, 0.15);
  top: 10%;
  right: -10%;
}

.blob-teal {
  width: 400px;
  height: 400px;
  background: rgba(144, 211, 201, 0.15);
  bottom: -10%;
  left: -15%;
}

/* Features Section */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem auto;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  padding: 3rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feature-icon-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: var(--border-glass);
  font-size: 2rem;
  color: var(--color-primary);
  transition: var(--transition-bounce);
}

.feature-card:hover .feature-icon-wrapper {
  transform: translateY(-8px) rotate(8deg);
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(242, 130, 56, 0.2);
}

/* Interactive Simulator Section */
#simulator {
  background: radial-gradient(circle at center, rgba(144, 211, 201, 0.08) 0%, transparent 70%);
}

.sim-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.sim-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* The Claymation Egg Timer UI */
/* The Claymation Egg Timer UI */
.egg-timer-device {
  width: 300px;
  height: 360px;
  background: var(--color-egg);
  border-radius: 150px 150px 130px 130px;
  box-shadow: var(--shadow-egg);
  position: relative;
  border: 4px solid rgba(43, 37, 32, 0.05);
  transition: var(--transition-bounce);
  padding-top: 45px;
}

.egg-timer-device::before {
  /* Top Knob */
  content: '';
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 20px;
  background: #f28238;
  border-radius: 12px 12px 0 0;
  box-shadow: inset 0 3px 6px rgba(255,255,255,0.4), 0 4px 6px rgba(0,0,0,0.1);
  border-bottom: 4px solid #cc6624;
  z-index: 2;
}

.egg-timer-device::after {
  /* Bottom Stand */
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 24px;
  background: #f28238;
  border-radius: 12px;
  box-shadow: 0 8px 15px rgba(43, 37, 32, 0.15), inset 0 2px 4px rgba(255,255,255,0.3);
  z-index: 2;
}

.dial-outer {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid rgba(43, 37, 32, 0.08);
  background: #fdfcf7;
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.05), 0 4px 8px rgba(255, 255, 255, 0.9);
  position: relative;
  margin: 0 auto;
}

/* Rotating Center Circle containing the pointer */
.dial-center-rotating {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: #fdfcf7;
  border: 2px solid rgba(43, 37, 32, 0.05);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05), inset 0 2px 4px rgba(255,255,255,0.9);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg);
  z-index: 5;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Triangle Pointer positioned on the rotating face */
.dial-pointer {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 14px solid #f28238;
}

/* Static overlays to keep numbers/text perfectly upright */
.dial-center-static {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.timer-digits {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-text-main);
  font-feature-settings: "tnum";
  line-height: 1;
  margin-bottom: 2px;
}

.timer-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
}

.dial-ticks {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 3;
}

/* Ticks positioned exactly relative to the center */
.tick {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 8px;
  background: rgba(43, 37, 32, 0.25);
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-94px);
}

.tick.major {
  width: 3px;
  height: 12px;
  background: var(--color-text-main);
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-92px);
}

/* Text labels 0, 10, 20... around the outer dial */
.tick-label {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-text-muted);
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  /* Rotate outwards to dial border, then counter-rotate numbers to keep them upright */
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-74px) rotate(calc(-1 * var(--angle)));
}

/* Face Smile (Claymation character styling) */
.egg-face {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.egg-eyes {
  display: flex;
  gap: 1.5rem;
}

.eye {
  width: 8px;
  height: 8px;
  background: var(--color-text-main);
  border-radius: 50%;
  animation: blink 4s infinite;
}

.egg-mouth {
  width: 20px;
  height: 10px;
  border-bottom: 3px solid var(--color-text-main);
  border-radius: 0 0 15px 15px;
}

/* Preset Picker UI */
.sim-controls {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.preset-selector {
  display: flex;
  gap: 1rem;
}

.preset-btn {
  flex: 1;
  padding: 1.25rem 1rem;
  border-radius: 20px;
  border: var(--border-glass);
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition-bounce);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.preset-btn:hover {
  transform: translateY(-5px);
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.preset-btn.active {
  background: #ffffff;
  border: 2px solid var(--color-primary);
  box-shadow: 0 10px 20px rgba(242, 130, 56, 0.15);
}

.preset-btn .icon {
  font-size: 1.75rem;
}

.preset-btn .label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text-main);
}

.preset-btn .time {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.action-buttons {
  display: flex;
  gap: 1rem;
}

.action-buttons .btn {
  flex: 1;
}

/* Wiggle animation during timer run, heavy wobble at finish */
@keyframes wiggle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(1deg); }
  75% { transform: rotate(-1deg); }
  100% { transform: rotate(0deg); }
}

@keyframes alarm-shake {
  0% { transform: translate(2px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-2deg); }
  20% { transform: translate(-3px, 0px) rotate(2deg); }
  30% { transform: translate(0px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(2px, 1px) rotate(-2deg); }
  80% { transform: translate(-1px, -1px) rotate(2deg); }
  90% { transform: translate(2px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.boiling {
  animation: wiggle 0.4s ease-in-out infinite;
}

.ringing {
  animation: alarm-shake 0.15s ease-in-out infinite;
}

/* Privacy & Policy / General Subpages */
.subpage-container {
  padding-top: 8rem;
  padding-bottom: 6rem;
  max-width: 800px;
  margin: 0 auto;
}

.privacy-content {
  padding: 3rem;
  margin-top: 2rem;
}

.privacy-content h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-text-main);
}

.privacy-content p {
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.privacy-content ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--color-text-muted);
}

.privacy-content li {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* Footer Section */
footer {
  background: var(--color-text-main);
  color: #fdfcf7;
  padding: 5rem 0 3rem 0;
  font-size: 0.95rem;
}

footer p {
  color: #bab0a6;
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-brand .logo-container {
  color: #ffffff;
}

.footer-brand .logo-container img {
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links h4 {
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #bab0a6;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--color-primary);
  transform: translateX(3px);
  display: inline-block;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Keyframes */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes blink {
  0%, 90%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

/* Responsive Design */
@media (max-width: 900px) {
  h1 { font-size: 2.75rem; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  .hero-badge { margin: 0 auto 1.5rem auto; }
  .hero-cta { justify-content: center; }
  .sim-container {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  .sim-controls {
    order: 2;
  }
  .sim-visual {
    order: 1;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 600px) {
  h1 { font-size: 2.25rem; }
  .nav-links { display: none; } /* Simplified mobile header */
  .section { padding: 5rem 0; }
  .privacy-content { padding: 1.5rem; }
  .preset-selector {
    flex-direction: column;
  }
}
