/* Age Calculator — deep emerald green + gold luxury, cream cards, premium */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-950: #04231b;
  --green-900: #0b3d2e;
  --green-800: #14532d;
  --green-700: #1a6b41;
  --gold: #c9a227;
  --gold-bright: #d4af37;
  --gold-light: #e9ce7a;
  --gold-dark: #8a6d1f;
  --cream: #fffbf2;
  --ink: #152a20;
  --muted: #5c6b60;
  --card-bg: rgba(255, 251, 242, 0.97);
}

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background: linear-gradient(135deg, var(--green-950) 0%, var(--green-900) 45%, var(--green-800) 85%, var(--green-700) 130%);
  background-size: 200% 200%;
  animation: gradientShift 18s ease infinite;
  overflow-x: hidden;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.bg-glow {
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(233,206,122,0.16), transparent 60%),
    radial-gradient(700px 400px at 90% 100%, rgba(201,162,39,0.20), transparent 60%);
}

.site-header { text-align: center; padding: 2.5rem 1rem 0.5rem; position: relative; }
.logo {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 700; color: var(--gold-light); letter-spacing: 1px;
}
.tagline { color: rgba(255,251,242,0.88); font-size: clamp(1rem, 3vw, 1.15rem); margin-top: 0.35rem; }

.container {
  width: 100%; max-width: 760px; margin: 0 auto;
  padding: 1.25rem 1rem 2rem; position: relative;
  display: flex; flex-direction: column; gap: 1.25rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: 20px;
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: 0 20px 50px rgba(2, 24, 17, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.card.glass {
  background: rgba(255, 251, 242, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(201, 162, 39, 0.7);
}
.card h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 4.5vw, 2rem); margin-bottom: 1.1rem; color: var(--green-900);
}
.card h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 4vw, 1.6rem); margin-bottom: 0.9rem; color: var(--green-900);
}

.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: 1.05rem; margin-bottom: 0.4rem; }
.field .optional { font-weight: 400; color: var(--muted); font-size: 0.9rem; }
.field input[type="date"] {
  width: 100%; font-size: 1.1rem; padding: 0.8rem 0.9rem;
  border: 2px solid #ddd0a4; border-radius: 12px; background: #fff; color: var(--ink);
}
.field input[type="date"]:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,0.25); }

.btn-gradient {
  width: 100%; border: none; cursor: pointer;
  font-size: 1.15rem; font-weight: 700; color: var(--green-950);
  padding: 0.95rem 1.5rem; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold-light), var(--gold-bright));
  background-size: 200% 100%;
  transition: background-position 0.5s ease, transform 0.15s ease;
  box-shadow: 0 10px 25px rgba(201, 162, 39, 0.45);
}
.btn-gradient:hover { background-position: 100% 0; }
.btn-gradient:active { transform: scale(0.98); }

.error { color: #b91c1c; font-weight: 600; margin-top: 0.8rem; font-size: 1rem; }

.results { margin-top: 1.5rem; border-top: 2px dashed rgba(201,162,39,0.6); padding-top: 1.25rem; }
.age-headline { text-align: center; margin-bottom: 1.1rem; }
.age-label { display: block; color: var(--muted); font-size: 1rem; margin-bottom: 0.25rem; }
.age-big {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 5vw, 2rem); font-weight: 800; line-height: 1.3;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
.stat {
  background: linear-gradient(160deg, #fffdf6, #fbf3dc);
  border: 1px solid #e7d9a8; border-radius: 14px;
  padding: 1rem 0.75rem; text-align: center;
}
.stat-value { display: block; font-size: clamp(1.15rem, 4vw, 1.5rem); font-weight: 800; color: var(--green-900); word-break: break-word; }
.stat-label { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }
.countdown { text-align: center; margin-top: 1.1rem; font-size: 1.1rem; font-weight: 700; color: var(--green-800); }

.steps { margin-left: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; font-size: 1.02rem; line-height: 1.55; }

details { border-top: 1px solid #efe3bc; padding: 0.85rem 0; }
details:first-of-type { border-top: none; }
summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; color: var(--green-900); }
details p { margin-top: 0.5rem; line-height: 1.6; color: #33473c; }

.site-footer { text-align: center; padding: 0.5rem 1rem 2.25rem; color: rgba(255,251,242,0.88); position: relative; }
.site-footer nav { margin-bottom: 0.6rem; }
.site-footer a { color: var(--gold-light); font-weight: 600; text-decoration: none; margin: 0 0.9rem; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { font-size: 0.9rem; }

@media (max-width: 480px) {
  .result-grid { grid-template-columns: 1fr; }
  .btn-gradient { font-size: 1.05rem; padding: 0.85rem 1rem; }
}
@media (min-width: 481px) and (max-width: 1024px) {
  .container { max-width: 640px; }
}
