/* ─────────────────────────────────────────────
   MyDailyCaps — Shared Stylesheet
   Design tokens mirror the Android app's Color.kt, Type.kt, and Theme.kt exactly.
   ───────────────────────────────────────────── */

/* Roboto matches Android's FontFamily.Default (system font on Android) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* ── Design tokens — source of truth: Android Color.kt + Theme.kt ── */
:root {
  /* Green palette — forest green brand identity */
  --color-primary:             #2E7D32;   /* Green40  — primary CTA */
  --color-primary-dark:        #1B5E20;   /* Green20  — hover, dark accent */
  --color-primary-medium:      #388E3C;   /* Green60  — secondary accent */
  --color-primary-light:       #81C784;   /* Green80  — light green */
  --color-secondary-container: #C8E6C9;   /* Green90  — chip / badge bg */
  --color-primary-container:   #E8F5E9;   /* Green95  — card tint / section bg */

  /* Neutrals — high contrast for readability (accessibility-first) */
  --color-on-background:  #1A1A1A;   /* Neutral10 — near-black body text */
  --color-on-surface-mid: #424242;   /* Neutral30 — secondary text */
  --color-outline:        #757575;   /* Neutral60 — placeholder / caption */
  --color-outline-var:    #E0E0E0;   /* Neutral90 — subtle dividers */
  --color-surface-var:    #F5F5F5;   /* Neutral95 — surface variant / chips */
  --color-background:     #FFFFFF;   /* White     — page / card background */
  --color-surface:        #FFFFFF;

  /* Status (left-stripe indicators & badges — matches Android) */
  --color-status-taken:    #2E7D32;   /* green */
  --color-status-due:      #E65100;   /* deep orange */
  --color-status-upcoming: #1565C0;   /* blue */
  --color-status-missed:   #B71C1C;   /* red */

  /* Error */
  --color-error:           #B3261E;
  --color-error-container: #FFEDEB;

  /* ── Convenience aliases (keep old names pointing at new tokens) ── */
  --green-900: var(--color-primary-dark);
  --green-700: var(--color-primary);
  --green-500: var(--color-primary-medium);
  --green-300: var(--color-primary-light);
  --green-100: var(--color-secondary-container);
  --green-50:  var(--color-primary-container);
  --ink:       var(--color-on-background);
  --ink-mid:   var(--color-on-surface-mid);
  --ink-light: var(--color-outline);
  --white:     var(--color-background);
  --surface:   var(--color-surface-var);

  /* ── Border radii — mirrors Android's AppShapes ── */
  --radius-xs: 6px;    /* extraSmall */
  --radius-sm: 8px;    /* small */
  --radius-md: 12px;   /* medium */
  --radius-lg: 16px;   /* large */
  --radius-xl: 24px;   /* extraLarge */
  --radius-pill: 100px;

  /* ── Elevation / shadow ── */
  --shadow-card: 0 2px 16px rgba(46, 125, 50, 0.10), 0 1px 4px rgba(0,0,0,0.06);
  --shadow-btn:  0 4px 20px rgba(46, 125, 50, 0.30);

  /* ── Typography — Roboto (Android system default) ── */
  --font: 'Roboto', system-ui, sans-serif;

  /* Scale mirrors Type.kt (sp → rem, 1sp ≈ 1px at 1x density) */
  --type-headline-lg:   2rem;       /* 32sp */
  --type-headline-md:   1.75rem;    /* 28sp */
  --type-headline-sm:   1.5rem;     /* 24sp */
  --type-title-lg:      1.375rem;   /* 22sp */
  --type-title-md:      1.125rem;   /* 18sp */
  --type-title-sm:      1rem;       /* 16sp */
  --type-body-lg:       1.125rem;   /* 18sp — minimum for accessibility */
  --type-body-md:       1rem;       /* 16sp */
  --type-body-sm:       0.875rem;   /* 14sp */
  --type-label-lg:      1rem;       /* 16sp */
  --type-label-md:      0.875rem;   /* 14sp */
  --type-label-sm:      0.8125rem;  /* 13sp */

  --max-w: 1100px;
  --section-gap: 100px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  font-size: var(--type-body-md);
  color: var(--color-on-background);
  background: var(--color-background);
  line-height: 1.65;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Utilities ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-outline-var);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-weight: 700;
  font-size: var(--type-title-md);
  color: var(--color-primary);
  letter-spacing: 0.01em;
}

.nav__logo-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  font-size: var(--type-body-sm);
  font-weight: 500;
  color: var(--color-on-surface-mid);
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--color-primary); }

.nav__cta {
  background: var(--color-primary) !important;
  color: #FFFFFF !important;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700 !important;
  transition: background 0.2s, box-shadow 0.2s !important;
}
.nav__cta:hover {
  background: var(--color-primary-dark) !important;
  box-shadow: var(--shadow-btn);
}

/* ── Footer ── */
.footer {
  background: var(--color-on-background);
  color: rgba(255,255,255,0.6);
  padding: 48px 0 32px;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer__logo {
  font-family: var(--font);
  font-size: var(--type-title-lg);
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__logo-img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  flex-shrink: 0;
}

.footer__links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
}

.footer__links a {
  font-size: var(--type-label-md);
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--color-primary-light); }

.footer__copy {
  font-size: var(--type-label-sm);
  color: rgba(255,255,255,0.35);
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes floatLogo {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-12px); }
}

@keyframes shimmer {
  0%   { opacity: 0.6; }
  50%  { opacity: 1; }
  100% { opacity: 0.6; }
}

.fade-up {
  animation: fadeUp 0.7s ease both;
}
.fade-up--d1 { animation-delay: 0.10s; }
.fade-up--d2 { animation-delay: 0.22s; }
.fade-up--d3 { animation-delay: 0.36s; }
.fade-up--d4 { animation-delay: 0.50s; }
.fade-up--d5 { animation-delay: 0.64s; }

/* ── Responsive ── */
@media (max-width: 768px) {
  :root { --section-gap: 64px; }
  .nav__links { display: none; }
  .footer__links { gap: 16px; }
}
