/* ============ Reset ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1, h2, h3, h4, h5, h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul[class],
ol[class] {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ============ Variables ============ */
:root {
  --color-navy: #0F2B5B;
  --color-blue: #2563EB;
  --color-purple: #7C3AED;
  --color-orange: #F97316;
  --color-rose: #F43F5E;
  --color-ink: #171923;
  --color-paper: #F8FAFC;
  --color-glass: rgba(255, 255, 255, 0.8);
  --gradient-primary: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  --gradient-accent: linear-gradient(135deg, #F97316 0%, #F43F5E 100%);
  --font-display: "Space Grotesk", "Inter", "Noto Sans SC", sans-serif;
  --font-body: "Inter", "Noto Sans SC", system-ui, sans-serif;
  --container-max: 1200px;
  --radius: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============ Base Typography ============ */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  background: var(--color-paper);
  color: var(--color-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-navy);
  line-height: 1.25;
}

a {
  color: var(--color-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============ Utilities ============ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 3000;
  background: var(--color-navy);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
  text-decoration: none;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient-primary);
  border-radius: 0 3px 3px 0;
  z-index: 2500;
  pointer-events: none;
}

/* ============ Header ============ */
.site-header {
  position: relative;
  background: linear-gradient(to bottom, var(--color-paper) 0%, #FFFFFF 100%);
  border-bottom: 4px double var(--color-navy);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 1;
}

.masthead {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--gradient-primary);
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 5px;
  background: var(--color-paper);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: 0.1em;
  line-height: 1;
}

.daily-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-rose);
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.2);
  padding: 7px 14px;
  border-radius: 100px;
  white-space: nowrap;
}

.daily-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-rose);
  animation: pulse-dot 2s ease-in-out infinite;
}

.daily-badge__text {
  line-height: 1;
}

@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle__bar {
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
}

.site-nav {
  border-top: 1px solid rgba(15, 43, 91, 0.12);
}

.nav-list {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.nav-link {
  display: inline-block;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-ink);
  letter-spacing: 0.05em;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--color-blue);
  background: rgba(37, 99, 235, 0.06);
  text-decoration: none;
}

.nav-link[aria-current="page"] {
  color: var(--color-blue);
  border-bottom-color: var(--color-blue);
}

/* ============ Mobile Nav ============ */
@media (max-width: 767px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .masthead {
    padding: 14px 0 12px;
  }

  .brand-name {
    font-size: 28px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    display: none;
    margin: 0 -16px;
    padding: 8px 16px 14px;
  }

  .site-nav[data-open] {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    display: block;
    padding: 13px 6px;
    border-bottom: 1px solid rgba(15, 43, 91, 0.06);
    border-left: 3px solid transparent;
  }

  .nav-link:hover {
    border-left-color: var(--color-blue);
    background: none;
  }

  .nav-link[aria-current="page"] {
    border-left-color: var(--color-blue);
    border-bottom-color: rgba(15, 43, 91, 0.06);
  }
}

@media (max-width: 400px) {
  .daily-badge__text {
    display: none;
  }

  .daily-badge {
    padding: 8px;
  }
}

/* ============ Footer ============ */
.site-footer {
  position: relative;
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 80px;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--gradient-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1.4fr 1fr;
  gap: 40px;
  padding: 56px 0 40px;
}

.footer-brand .brand-name {
  color: #fff;
}

.footer-desc {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.65);
  max-width: 380px;
}

.footer-heading {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
}

.footer-links li {
  margin-bottom: 4px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.8;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-address {
  font-style: normal;
  font-size: 14px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.75);
}

.footer-address span {
  display: block;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.footer-copy,
.footer-icp {
  margin: 0;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 40px;
  }
}

/* ============ Common Components ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s ease, color 0.25s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.btn-ghost:hover {
  background: var(--color-navy);
  color: #fff;
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--gradient-accent);
  color: #fff;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.3);
}

.card {
  background: var(--color-glass);
  border: 1px solid rgba(15, 43, 91, 0.08);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(15, 43, 91, 0.04);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.card:hover {
  transform: rotate(-0.4deg) scale(1.01);
  box-shadow: 0 18px 40px rgba(15, 43, 91, 0.09);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--color-ink);
  opacity: 0.65;
  padding: 18px 0 0;
}

.breadcrumbs a {
  color: var(--color-blue);
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span[aria-hidden="true"] {
  opacity: 0.5;
}

.overline {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-blue);
  margin-bottom: 12px;
}

.section {
  padding: 64px 0;
}

.section--tight {
  padding: 32px 0;
}

.section-head {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.2;
  color: var(--color-navy);
  margin-bottom: 20px;
  max-width: 720px;
}

.lede {
  font-size: 18px;
  line-height: 1.8;
  color: var(--color-ink);
  opacity: 0.85;
  max-width: 720px;
}

.page-hero {
  padding: 64px 0 48px;
  position: relative;
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  color: var(--color-navy);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.page-hero__desc {
  font-size: 18px;
  line-height: 1.75;
  color: var(--color-ink);
  opacity: 0.78;
  max-width: 640px;
}

/* ============ Grids ============ */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .grid-12,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ============ Image Base ============ */
.figure {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.14));
  min-height: 220px;
}

.figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame {
  position: relative;
  padding: 10px;
  border: 1px solid rgba(15, 43, 91, 0.18);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(124, 58, 237, 0.08));
}

/* ============ Reveal ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-delay="1"] {
  transition-delay: 0.1s;
}

[data-reveal-delay="2"] {
  transition-delay: 0.2s;
}

[data-reveal-delay="3"] {
  transition-delay: 0.3s;
}

/* ============ Focus & Reduced Motion ============ */
:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .card:hover {
    transform: none;
  }
}
