/* Base CSS: Reset, Typography, and Foundation Layout */
@import './tokens.css';

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background: linear-gradient(180deg, #E8F7F0 0%, #F1F5F9 280px, #F8FAFC 100%);
  color: var(--md-on-surface);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 110px;
  overflow-x: hidden;
}

/* Typography Scale */
h1, .display-large {
  font-size: 2.125rem;
  line-height: 2.625rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #FFFFFF;
}

h2, .headline-medium {
  font-size: 1.3125rem;
  line-height: 1.75rem;
  font-weight: 700;
  color: var(--md-on-surface);
}

h3, .title-medium {
  font-size: 1.0625rem;
  line-height: 1.5rem;
  font-weight: 600;
}

p, .body-medium {
  font-size: 0.875rem;
  line-height: 1.4rem;
  font-weight: 500;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Header Banner Band */
.header-band {
  background: var(--md-primary-gradient);
  color: var(--md-on-primary);
  position: relative;
  min-height: 220px;
  padding: 34px 24px 84px 24px;
  overflow: hidden;
  box-shadow: 0 10px 36px rgba(6, 78, 59, 0.22);
}

.header-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../../assets/img/PATTERN1_WHITE.webp');
  background-repeat: repeat;
  background-size: 180px 180px;
  opacity: 0.08;
  pointer-events: none;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
  position: relative;
  z-index: 2;
}

.header-logo-wrap {
  flex-shrink: 0;
}

.header-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.header-titles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.header-top-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.header-portal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #D1FAE5;
  background: rgba(255, 255, 255, 0.14);
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all var(--transition-standard);
}

.header-portal-link:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #FFFFFF;
}

.header-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-subtitle {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.92);
  max-width: 680px;
  line-height: 1.45;
}

/* Main Container */
.main-container {
  max-width: 1120px;
  margin: -48px auto 40px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: relative;
  z-index: 10;
}

/* Card Section */
.card-section {
  background-color: var(--md-surface-container-lowest);
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--elevation-2);
  transition: box-shadow var(--transition-standard);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid #F1F5F9;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.card-icon-badge.emerald {
  background: #DCFCE7;
  color: #059669;
}

.card-icon-badge.amber {
  background: #FEF3C7;
  color: #D97706;
}

.card-icon-badge.blue {
  background: #E0F2FE;
  color: #0284C7;
}

.card-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-helper {
  font-size: 0.8125rem;
  color: var(--md-on-surface-variant);
}

@media (max-width: 768px) {
  body {
    padding-bottom: 130px;
  }

  .header-band {
    padding: 20px 14px 48px 14px;
    min-height: auto;
  }

  .header-inner {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .header-logo {
    width: 48px;
    height: 48px;
  }

  .header-titles h1 {
    font-size: 1.25rem;
    line-height: 1.55rem;
  }

  .header-subtitle {
    font-size: 0.8125rem;
    line-height: 1.25rem;
  }

  .header-top-tag {
    flex-wrap: wrap;
    gap: 6px;
  }

  .header-portal-link {
    font-size: 0.75rem;
    padding: 2px 10px;
  }

  .header-badge {
    font-size: 0.6875rem;
  }

  .main-container {
    margin-top: -26px;
    padding: 0 10px;
    gap: 16px;
  }

  .card-section {
    padding: 16px 12px;
    border-radius: var(--radius-md);
  }

  .card-header-left {
    gap: 10px;
  }

  .card-icon-badge {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    border-radius: 10px;
  }

  .headline-medium {
    font-size: 1.125rem;
    line-height: 1.45rem;
  }
}
