/* ============================================
   ItsWinterBush — Material Design 3 / Compose UI
   Dark theme · Green seed color
   ============================================ */

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

/* ── M3 Color Tokens (Dark Theme) ── */
:root {
  --md-primary:              #86EFAC;
  --md-on-primary:           #003919;
  --md-primary-container:    #005225;
  --md-on-primary-container: #A2F4C2;

  --md-secondary:              #B2CCBA;
  --md-on-secondary:           #1D3528;
  --md-secondary-container:    #344B3F;
  --md-on-secondary-container: #CEE8D6;

  --md-tertiary:              #A0D0CD;
  --md-on-tertiary:           #003739;
  --md-tertiary-container:    #1E4E51;
  --md-on-tertiary-container: #BCEBEB;

  --md-error:              #FFB4AB;
  --md-on-error:           #690005;
  --md-error-container:    #93000A;
  --md-on-error-container: #FFDAD6;

  --md-background:         #0F1411;
  --md-on-background:      #DEE4DD;

  --md-surface:            #0F1411;
  --md-on-surface:         #DEE4DD;
  --md-surface-variant:    #3F4841;
  --md-on-surface-variant: #BEC9BF;

  --md-outline:          #889188;
  --md-outline-variant:  #3F4841;

  --md-scrim:            rgba(0,0,0,0.6);

  /* Surface containers */
  --md-surface-dim:              #0F1411;
  --md-surface-bright:           #353B35;
  --md-surface-container-lowest: #0A0F0B;
  --md-surface-container-low:    #171D17;
  --md-surface-container:        #1B211B;
  --md-surface-container-high:   #262C26;
  --md-surface-container-highest:#303630;

  /* Shape tokens */
  --shape-xs:  4px;
  --shape-sm:  8px;
  --shape-md:  12px;
  --shape-lg:  16px;
  --shape-xl:  28px;
  --shape-full: 50px;

  /* Elevation (tonal color overlay) */
  --elev1: rgba(134,239,172,0.05);
  --elev2: rgba(134,239,172,0.08);
  --elev3: rgba(134,239,172,0.11);

  /* Typography */
  --font-display: 'Nunito', sans-serif;
  --font-body:    'Noto Sans', sans-serif;

  /* Nav drawer width */
  --nav-width: 280px;
  --nav-rail-width: 80px;
}

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

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--md-background);
  color: var(--md-on-background);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── M3 Typography Scale ── */
.display-large  { font-family: var(--font-display); font-size: 57px; font-weight: 800; line-height: 1.12; letter-spacing: -0.25px; }
.display-medium { font-family: var(--font-display); font-size: 45px; font-weight: 700; line-height: 1.16; }
.display-small  { font-family: var(--font-display); font-size: 36px; font-weight: 700; line-height: 1.22; }
.headline-large  { font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1.25; }
.headline-medium { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1.29; }
.headline-small  { font-family: var(--font-display); font-size: 24px; font-weight: 600; line-height: 1.33; }
.title-large  { font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1.27; }
.title-medium { font-family: var(--font-display); font-size: 16px; font-weight: 600; line-height: 1.5; letter-spacing: 0.15px; }
.title-small  { font-family: var(--font-display); font-size: 14px; font-weight: 600; line-height: 1.43; letter-spacing: 0.1px; }
.body-large  { font-size: 16px; font-weight: 400; line-height: 1.5; letter-spacing: 0.5px; }
.body-medium { font-size: 14px; font-weight: 400; line-height: 1.43; letter-spacing: 0.25px; }
.body-small  { font-size: 12px; font-weight: 400; line-height: 1.33; letter-spacing: 0.4px; }
.label-large  { font-size: 14px; font-weight: 600; line-height: 1.43; letter-spacing: 0.1px; }
.label-medium { font-size: 12px; font-weight: 600; line-height: 1.33; letter-spacing: 0.5px; }
.label-small  { font-size: 11px; font-weight: 600; line-height: 1.45; letter-spacing: 0.5px; }

/* ── Layout Shell ── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Scrim ── */
.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--md-scrim);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-scrim.visible {
  display: block;
  opacity: 1;
}

/* ── Navigation Drawer ── */
.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-width);
  height: 100vh;
  background: var(--md-surface-container-low);
  display: flex;
  flex-direction: column;
  z-index: 300;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
  overflow-y: auto;
  border-radius: 0 var(--shape-xl) var(--shape-xl) 0;
}

.nav-drawer.open {
  transform: translateX(0);
  box-shadow: 2px 0 24px rgba(0,0,0,0.5);
}

/* Desktop: persistent drawer */
@media (min-width: 1024px) {
  .nav-drawer {
    position: sticky;
    top: 0;
    transform: translateX(0);
    height: 100vh;
    flex-shrink: 0;
    box-shadow: none;
    border-radius: 0 var(--shape-xl) var(--shape-xl) 0;
  }
  .nav-scrim { display: none !important; }
  .nav-toggle { display: none !important; }
  .main-content { margin-left: 0; }
}

/* Drawer Header */
.nav-drawer-header {
  padding: 24px 24px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--md-outline-variant);
  margin-bottom: 8px;
  flex-shrink: 0;
}
.nav-drawer-header img {
  width: 48px;
  height: 48px;
  border-radius: var(--shape-md);
  object-fit: cover;
}
.nav-drawer-header-text .nav-site-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--md-on-surface);
}
.nav-drawer-header-text .nav-site-sub {
  font-size: 12px;
  color: var(--md-on-surface-variant);
}

/* Drawer section label */
.nav-section-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--md-on-surface-variant);
  padding: 8px 28px 4px;
}

/* Drawer nav items */
.nav-items {
  list-style: none;
  padding: 4px 12px;
  flex: 1;
}

.nav-item {
  margin: 2px 0;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--shape-full);
  color: var(--md-on-surface-variant);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1px;
  transition: background 0.2s, color 0.2s;
  position: relative;
  overflow: hidden;
}

.nav-item a .nav-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item a:hover {
  background: rgba(134,239,172,0.08);
  color: var(--md-primary);
}

.nav-item.active a {
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
  font-weight: 700;
}

/* Ripple */
.ripple-container { position: relative; overflow: hidden; cursor: pointer; }
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transform: scale(0);
  animation: ripple-anim 0.5s linear;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* ── Top App Bar (mobile) ── */
.top-app-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--md-surface-container);
  height: 64px;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
@media (max-width: 1023px) {
  .top-app-bar { display: flex; }
}

.nav-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--shape-full);
  border: none;
  background: transparent;
  color: var(--md-on-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background 0.2s;
}
.nav-toggle:hover { background: rgba(255,255,255,0.08); }

.top-app-bar-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--md-on-surface);
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  padding: 24px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .page-content { padding: 16px; }
}

/* ── Page Header Block ── */
.page-header {
  margin-bottom: 24px;
}
.page-header .page-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--md-on-surface);
  margin-bottom: 4px;
}
.page-header .page-subtitle {
  font-size: 14px;
  color: var(--md-on-surface-variant);
}

/* ── Hero Banner Card ── */
.hero-banner {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
  border-radius: var(--shape-xl);
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: rgba(134,239,172,0.15);
  border-radius: 50%;
}
.hero-banner::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: 40px;
  width: 120px;
  height: 120px;
  background: rgba(134,239,172,0.1);
  border-radius: 50%;
}
.hero-banner h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  position: relative;
}
.hero-banner p {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.9;
  position: relative;
}

/* ── M3 Cards ── */
.card {
  background: var(--md-surface-container);
  border-radius: var(--shape-xl);
  padding: 20px;
  transition: background 0.2s, transform 0.15s;
}
.card:hover { background: var(--md-surface-container-high); }

.card-filled {
  background: var(--md-surface-container-highest);
  border-radius: var(--shape-xl);
  padding: 20px;
}

.card-outlined {
  background: var(--md-surface);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--shape-xl);
  padding: 20px;
}

.card-elevated {
  background: var(--md-surface-container-low);
  border-radius: var(--shape-xl);
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
}

/* ── Card grid ── */
.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card-grid-2 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--shape-full);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1px;
  padding: 10px 24px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-filled {
  background: var(--md-primary);
  color: var(--md-on-primary);
}
.btn-filled:hover {
  box-shadow: 0 2px 12px rgba(134,239,172,0.4);
  background: #9af5be;
}

.btn-tonal {
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
}
.btn-tonal:hover { background: #3e5748; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

.btn-outlined {
  background: transparent;
  color: var(--md-primary);
  border: 1.5px solid var(--md-outline);
}
.btn-outlined:hover { background: rgba(134,239,172,0.08); border-color: var(--md-primary); }

.btn-text {
  background: transparent;
  color: var(--md-primary);
  padding: 10px 12px;
}
.btn-text:hover { background: rgba(134,239,172,0.08); }

/* FAB */
.fab {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
  border-radius: var(--shape-lg);
  padding: 16px 20px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow 0.2s, background 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.fab:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.5); background: #0a6930; }

/* ── Chips ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--shape-sm);
  background: var(--md-surface-container-high);
  color: var(--md-on-surface-variant);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--md-outline-variant);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.chip:hover { background: var(--md-surface-container-highest); }
.chip.selected {
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
  border-color: transparent;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--md-outline-variant);
  margin: 16px 0;
}

/* ── List Item ── */
.list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--shape-md);
  transition: background 0.2s;
}
.list-item:hover { background: rgba(255,255,255,0.04); }
.list-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--shape-sm);
  background: var(--md-secondary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.list-item-text .list-item-headline { font-size: 16px; font-weight: 600; color: var(--md-on-surface); }
.list-item-text .list-item-supporting { font-size: 14px; color: var(--md-on-surface-variant); }

/* ── Spec Table ── */
.spec-group {
  background: var(--md-surface-container);
  border-radius: var(--shape-xl);
  overflow: hidden;
  margin-bottom: 16px;
}
.spec-header {
  padding: 16px 20px;
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1px;
}
.spec-row {
  display: flex;
  padding: 12px 20px;
  gap: 16px;
  border-bottom: 1px solid var(--md-outline-variant);
}
.spec-row:last-child { border-bottom: none; }
.spec-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--md-on-surface-variant);
  width: 130px;
  flex-shrink: 0;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding-top: 2px;
}
.spec-value {
  font-size: 14px;
  color: var(--md-on-surface);
  flex: 1;
}

/* ── Social Cards ── */
.social-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--md-surface-container);
  border-radius: var(--shape-xl);
  padding: 20px 24px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  border: 1px solid var(--md-outline-variant);
}
.social-card:hover {
  background: var(--md-surface-container-high);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  border-color: var(--md-primary);
}
.social-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--shape-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.social-card-body { flex: 1; }
.social-card-body .social-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--md-on-surface);
  margin-bottom: 2px;
}
.social-card-body .social-handle {
  font-size: 13px;
  color: var(--md-on-surface-variant);
}
.social-card-arrow {
  color: var(--md-on-surface-variant);
  font-size: 20px;
}

/* ── Download Card ── */
.download-card {
  background: var(--md-surface-container);
  border-radius: var(--shape-xl);
  overflow: hidden;
  border: 1px solid var(--md-outline-variant);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.download-card:hover {
  border-color: var(--md-primary);
  box-shadow: 0 4px 20px rgba(134,239,172,0.15);
}
.download-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--md-outline-variant);
}
.download-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--shape-md);
  object-fit: contain;
  background: var(--md-surface-container-high);
  padding: 6px;
}
.download-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--md-on-surface);
}
.download-card-subtitle {
  font-size: 13px;
  color: var(--md-on-surface-variant);
}
.download-card-body {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.download-card-desc {
  font-size: 14px;
  color: var(--md-on-surface-variant);
  flex: 1;
}

/* ── Version badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--shape-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: var(--font-display);
}
.badge-primary { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.badge-secondary { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.badge-tertiary { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }

/* ── Step card (for guides) ── */
.step-card {
  display: flex;
  gap: 16px;
  background: var(--md-surface-container);
  border-radius: var(--shape-xl);
  padding: 20px;
  border-left: 3px solid var(--md-primary);
}
.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-content h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--md-on-surface);
  margin-bottom: 4px;
}
.step-content p {
  font-size: 14px;
  color: var(--md-on-surface-variant);
}

/* ── Footer ── */
.page-footer {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--md-on-surface-variant);
  border-top: 1px solid var(--md-outline-variant);
  margin-top: auto;
}

/* ── Animations ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeSlideUp 0.4s cubic-bezier(0.2, 0, 0, 1) both;
}
.fade-in-1 { animation-delay: 0.05s; }
.fade-in-2 { animation-delay: 0.10s; }
.fade-in-3 { animation-delay: 0.15s; }
.fade-in-4 { animation-delay: 0.20s; }
.fade-in-5 { animation-delay: 0.25s; }
.fade-in-6 { animation-delay: 0.30s; }

/* ── Helpers ── */
.text-primary   { color: var(--md-primary); }
.text-secondary { color: var(--md-secondary); }
.text-muted     { color: var(--md-on-surface-variant); }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex   { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.stack { display: flex; flex-direction: column; gap: 16px; }
