/* ===== Reset & Base ===== */
*, *::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: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-weight: 400; font-size: 1rem; line-height: 1.6; color: #2B2D42; background-color: #F1FAEE; min-height: 100vh; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; border: none; background: none; cursor: pointer; }
:focus-visible { outline: 2px solid #E63946; outline-offset: 2px; border-radius: 2px; }
::selection { background-color: #E63946; color: #fff; }

/* ===== CSS Variables ===== */
:root {
  --color-red: #E63946;
  --color-blue: #1D3557;
  --color-gold: #F4A261;
  --color-dark: #2B2D42;
  --color-light: #F1FAEE;
  --color-white: #FFFFFF;
  --gradient-rb: linear-gradient(135deg, #E63946 0%, #1D3557 100%);
  --gradient-gold: linear-gradient(135deg, #F4A261 0%, #E76F51 100%);
  --shadow-card: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-header: 0 2px 16px rgba(0,0,0,0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --font-number: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  --header-h: 64px;
  --nav-width: 30%;
  --content-max: 1280px;
  --transition: 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== Skip Link ===== */
.skip-link { position: fixed; top: -100%; left: 1rem; z-index: 9999; padding: 0.5rem 1.2rem; background: #E63946; color: #fff; font-weight: 600; font-size: 0.875rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm); transition: top 0.25s ease; }
.skip-link:focus { top: 0; }

/* ===== Header ===== */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: #1D3557; box-shadow: var(--shadow-header); height: var(--header-h); }
.header-inner { max-width: var(--content-max); margin: 0 auto; padding: 0 1.5rem; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-brand { flex: 0 0 auto; }
.logo-link { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.logo-text { font-family: 'Inter', system-ui, sans-serif; font-weight: 700; font-style: italic; font-size: 1.35rem; color: #F4A261; letter-spacing: 0.02em; line-height: 1.2; }
.tagline { font-size: 0.65rem; font-weight: 400; color: rgba(255,255,255,0.6); letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.3; }

/* ===== Navigation ===== */
.header-nav { flex: 1 1 auto; display: flex; justify-content: flex-end; }
.nav-list { display: flex; align-items: center; gap: 0.25rem; }
.nav-item { position: relative; }
.nav-link { display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.7rem; font-size: 0.8rem; font-weight: 500; color: rgba(255,255,255,0.85); border-radius: var(--radius-sm); transition: color var(--transition), background var(--transition); white-space: nowrap; }
.nav-link:hover, .nav-link:focus-visible { color: #fff; background: rgba(255,255,255,0.08); }
.nav-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.3); transition: background var(--transition); flex-shrink: 0; }
.nav-link[aria-current="page"] { color: #E63946; }
.nav-link[aria-current="page"] .nav-dot { background: #E63946; box-shadow: 0 0 6px rgba(230,57,70,0.5); }

/* ===== Nav Toggle (Mobile) ===== */
.nav-toggle { display: none; flex-direction: column; justify-content: center; align-items: center; width: 40px; height: 40px; gap: 5px; border-radius: var(--radius-sm); transition: background var(--transition); }
.nav-toggle:hover { background: rgba(255,255,255,0.08); }
.nav-toggle-bar { display: block; width: 22px; height: 2px; background: rgba(255,255,255,0.85); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.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); }

/* ===== Progress Indicator ===== */
.progress-indicator { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--gradient-rb); width: 0%; transition: width 0.1s linear; will-change: width; border-radius: 0 2px 0 0; }
@media (prefers-reduced-motion: reduce) { .progress-indicator { transition: none; } }

/* ===== Footer ===== */
.site-footer { background: #2B2D42; color: rgba(255,255,255,0.85); padding: 2.5rem 1.5rem 1.5rem; margin-top: 3rem; }
.footer-inner { max-width: var(--content-max); margin: 0 auto; }
.footer-main { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1.5rem 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand .logo-text { font-size: 1.2rem; }
.footer-brand .tagline { font-size: 0.6rem; margin-top: 0.1rem; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 0.5rem; }
.footer-link { font-size: 0.8rem; color: rgba(255,255,255,0.7); transition: color var(--transition); }
.footer-link:hover, .footer-link:focus-visible { color: #F4A261; }
.footer-link-sep { color: rgba(255,255,255,0.2); font-size: 0.75rem; }
.footer-contact { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 0.5rem; font-size: 0.78rem; color: rgba(255,255,255,0.6); }
.contact-sep { color: rgba(255,255,255,0.15); }
.footer-bottom { padding-top: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; font-size: 0.7rem; color: rgba(255,255,255,0.45); }
.copyright { order: 1; }
.icp-info { order: 2; }
.trust-statement { width: 100%; order: 3; font-size: 0.65rem; color: rgba(255,255,255,0.3); line-height: 1.5; margin-top: 0.25rem; }

/* ===== Generic Utilities ===== */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 1.5rem; }
.page-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .page-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .page-grid { grid-template-columns: 1fr 2fr; } }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.5rem 1.2rem; font-size: 0.85rem; font-weight: 600; border-radius: var(--radius-sm); transition: all var(--transition); border: 1.5px solid transparent; cursor: pointer; line-height: 1.4; }
.btn:focus-visible { outline: 2px solid #E63946; outline-offset: 2px; }
.btn-primary { background: #E63946; color: #fff; border-color: #E63946; }
.btn-primary:hover { background: #c92e3a; border-color: #c92e3a; }
.btn-ghost { background: transparent; color: #1D3557; border-color: #1D3557; }
.btn-ghost:hover { background: #1D3557; color: #fff; }

/* ===== Cards ===== */
.card { background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 1.25rem; transition: box-shadow var(--transition), transform var(--transition); }
.card:hover { box-shadow: 0 6px 28px rgba(0,0,0,0.09); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }

/* ===== Section Number ===== */
.section-number { font-family: var(--font-number); font-weight: 600; font-size: 3.5rem; line-height: 1; color: #E63946; opacity: 0.3; margin-bottom: -0.3rem; letter-spacing: -0.02em; }

/* ===== Tags ===== */
.tag { display: inline-block; padding: 0.2rem 0.6rem; font-size: 0.7rem; font-weight: 600; color: #1D3557; background: rgba(29,53,87,0.08); border-radius: var(--radius-sm); letter-spacing: 0.02em; }
.tag-red { color: #E63946; background: rgba(230,57,70,0.08); }
.tag-gold { color: #E76F51; background: rgba(244,162,97,0.15); }

/* ===== Responsive ===== */
@media (max-width: 767px) {
  :root { --header-h: 56px; }
  .header-inner { padding: 0 1rem; }
  .nav-toggle { display: flex; }
  .header-nav { position: absolute; top: var(--header-h); left: 0; right: 0; background: #1D3557; padding: 0.5rem 1rem 1rem; box-shadow: 0 8px 24px rgba(0,0,0,0.2); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all var(--transition); border-top: 1px solid rgba(255,255,255,0.06); }
  .header-nav[data-open] { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0.125rem; }
  .nav-link { padding: 0.6rem 0.8rem; font-size: 0.9rem; justify-content: flex-start; }
  .logo-text { font-size: 1.1rem; }
  .tagline { font-size: 0.55rem; }
  .footer-main { flex-direction: column; gap: 1rem; }
  .footer-links, .footer-contact { width: 100%; justify-content: flex-start; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .trust-statement { margin-top: 0; }
  .section-number { font-size: 2.5rem; }
}

@media (min-width: 768px) and (max-width: 991px) {
  .nav-link { font-size: 0.72rem; padding: 0.35rem 0.5rem; }
  .header-inner { padding: 0 1.25rem; }
  .logo-text { font-size: 1.2rem; }
  .footer-links, .footer-contact { gap: 0.25rem 0.75rem; }
}

@media (min-width: 992px) {
  .header-nav { display: flex !important; opacity: 1 !important; visibility: visible !important; position: static; transform: none; box-shadow: none; padding: 0; border: none; background: transparent; }
  .nav-link { font-size: 0.82rem; padding: 0.4rem 0.8rem; }
  .logo-text { font-size: 1.4rem; }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .header-nav { transition: none; }
  .nav-toggle-bar { transition: none; }
  .card:hover { transform: none; }
  .progress-indicator { transition: none; }
}

/* ===== Print ===== */
@media print {
  .site-header { position: static; box-shadow: none; }
  .nav-toggle, .progress-indicator { display: none !important; }
  .site-footer { margin-top: 1rem; }
  .skip-link { display: none; }
}
