:root {
  --brand-primary: #3852b4;
  --brand-secondary: #5e7ac4;
  --brand-accent: #f3be7a;
  --brand-warm: #f08d39;
  --ink: #1e2642;
  --paper: #f8f6f1;
  --tile: #ffffff;
  --muted: #5d6478;
  --radius-soft: 16px;
  --radius-box: 6px;
  --shadow-soft: 0 14px 34px rgba(33, 47, 105, 0.16);
  --shadow-hover: 0 18px 28px rgba(26, 35, 74, 0.24);
  --space-1: 0.4rem;
  --space-2: 0.8rem;
  --space-3: 1.1rem;
  --space-4: 1.6rem;
  --space-5: 2.5rem;
  --space-6: 3.8rem;
  --space-7: 5rem;
  --max: 1140px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% 5%, #fff 0, #f6f3ec 50%, #f1ece2 100%);
  line-height: 1.55;
}

@keyframes fadeRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseSoft {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(240, 141, 57, 0.28);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(240, 141, 57, 0);
  }
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 246, 241, 0.97);
  border-bottom: 1px solid rgba(56, 82, 180, 0.2);
  backdrop-filter: blur(8px);
}

.head-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.logo-box {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.logo-box img {
  width: 4rem;
  position: relative;
  z-index: 20;
}

.logo-box img {
  display: inline-block;
  transform: rotate(-5deg);
  transition: transform var(--transition-normal);
}

.logo-box:hover img {
  transform: rotate(0);
}

/* Responsive Styles */
@media (max-width: 992px) {
  .logo-box img {
    width: 3rem;
    position: relative;
    z-index: 20;
  }
}

@media (max-width: 768px) {
  .logo-box img {
    width: 3rem;
    position: relative;
    z-index: 20;
  }
}

@media (max-width: 576px) {
  .logo-box img {
    width: 2rem;
    position: relative;
    z-index: 20;
  }
}

@media (max-width: 400px) {
  .logo-box img {
    width: 2rem;
    position: relative;
    z-index: 20;
  }
}

.menu-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

.menu-grid a {
  text-decoration: none;
  border: 1px solid rgba(56, 82, 180, 0.35);
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-box);
  font-size: 0.93rem;
  background: #fff;
  transition: transform 180ms ease, background-color 180ms ease;
}

.menu-grid a:hover,
.menu-grid a:focus-visible {
  transform: translateY(-2px);
  background: #f8faff;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-7);
}

h1,
h2,
h3 {
  line-height: 1.23;
  margin-top: 0;
}

.tile-map {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-3);
}

.tile {
  background: var(--tile);
  border: 1px solid rgba(56, 82, 180, 0.15);
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-soft);
  padding: var(--space-4);
  animation: fadeRise 420ms ease both;
}

.hero-pane {
  grid-column: span 12;
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 2fr 1.1fr;
}

.pattern-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.pattern-cell {
  min-height: 82px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary));
  opacity: 0.85;
  transition: transform 240ms ease, opacity 200ms ease, filter 220ms ease;
}

.pattern-cell:nth-child(odd) {
  background: linear-gradient(155deg, var(--brand-accent), var(--brand-warm));
}

.pattern-cell:hover {
  opacity: 1;
  transform: scale(1.02) rotate(-0.6deg);
  filter: saturate(1.05);
}

.col-7 {
  grid-column: span 7;
}

.col-5 {
  grid-column: span 5;
}

.col-4 {
  grid-column: span 4;
}

.col-8 {
  grid-column: span 8;
}

.col-6 {
  grid-column: span 6;
}

.col-12 {
  grid-column: span 12;
}

.callout {
  border-left: 5px solid var(--brand-warm);
  background: #fff9ef;
}

.inline-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.2rem;
}

.microcopy {
  color: var(--muted);
  font-size: 0.95rem;
}

.intro-slab {
  background: linear-gradient(140deg, #fff, #f7f8ff);
  border-left: 6px solid var(--brand-primary);
}

.quiet-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-3);
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.kpi-strip div {
  background: #f4f7ff;
  border-radius: 10px;
  padding: 0.75rem;
}

.timeline {
  display: grid;
  gap: 0.75rem;
}

.timeline article {
  border-left: 3px solid var(--brand-secondary);
  padding-left: 0.8rem;
}

.steps article {
  border-top: 1px dashed rgba(56, 82, 180, 0.32);
  padding-top: 0.8rem;
  margin-top: 0.8rem;
}

.doc-panel {
  background: #fafcff;
  border: 1px solid rgba(56, 82, 180, 0.23);
  padding: var(--space-3);
  border-radius: 10px;
}

.faq-item button {
  width: 100%;
  border: 0;
  text-align: left;
  border-radius: 9px;
  background: #eef2ff;
  color: #273264;
  padding: 0.8rem 0.9rem;
  font-size: 1rem;
  transition: background-color 190ms ease;
}

.faq-item button:hover,
.faq-item button:focus-visible {
  background: #dde5ff;
}

.faq-item p {
  margin: 0.55rem 0 0.85rem;
  display: none;
}

.faq-item.open p {
  display: block;
}

.filter-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.filter-row button {
  border: 1px solid rgba(56, 82, 180, 0.4);
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
}

.filter-row button.active {
  background: var(--brand-primary);
  color: #fff;
}

.program-card[hidden] {
  display: none;
}

.program-card {
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.program-card:hover {
  transform: translateY(-3px) rotate(-0.2deg);
  box-shadow: var(--shadow-hover);
}

.tab-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tab-row button {
  border: 1px solid rgba(56, 82, 180, 0.38);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  background: #fff;
}

.tab-row button.active {
  background: var(--brand-primary);
  color: #fff;
}

.tab-panel {
  margin-top: 0.8rem;
}

.tab-panel[hidden] {
  display: none;
}

.contact-form {
  display: grid;
  gap: var(--space-3);
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(56, 82, 180, 0.34);
  border-radius: 8px;
  padding: 0.72rem 0.75rem;
  font: inherit;
  background: #fff;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.field-error {
  color: #8f1c13;
  font-size: 0.86rem;
  min-height: 1.15em;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.93rem;
}

.btn-main {
  border: 0;
  border-radius: var(--radius-box);
  background: linear-gradient(130deg, var(--brand-primary), var(--brand-secondary));
  color: #fff;
  padding: 0.76rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 170ms ease;
}

.btn-main:hover,
.btn-main:focus-visible {
  transform: translateY(-2px);
}

.btn-main.pulse {
  animation: pulseSoft 1.8s infinite;
}

.site-footer {
  margin-top: var(--space-6);
  background: #1e2642;
  color: #f8f6f1;
}

.foot-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4);
  display: grid;
  gap: var(--space-3);
}

.footer-cta {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: var(--space-3);
  border-radius: var(--radius-soft);
  background: rgba(255, 255, 255, 0.04);
}

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: min(96%, 720px);
  background: #fff;
  border: 1px solid rgba(56, 82, 180, 0.32);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  padding: 0.95rem;
  z-index: 70;
}

.cookie-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.cookie-actions button {
  border-radius: 8px;
  border: 1px solid rgba(56, 82, 180, 0.28);
  background: #fff;
  padding: 0.45rem 0.75rem;
}

.cookie-panel {
  margin-top: 0.75rem;
  border-top: 1px dashed rgba(56, 82, 180, 0.4);
  padding-top: 0.7rem;
  display: none;
}

.cookie-panel.open {
  display: grid;
  gap: 0.55rem;
}

.toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9ff;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
}

.muted-note {
  font-size: 0.85rem;
  color: var(--muted);
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.policy-table th,
.policy-table td {
  border: 1px solid rgba(56, 82, 180, 0.2);
  padding: 0.55rem;
  text-align: left;
  vertical-align: top;
}

.policy-table th {
  background: #f4f6ff;
}

.flag-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
}

.reveal.on {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 400ms ease, transform 400ms ease;
}

@media (max-width: 920px) {
  .hero-pane {
    grid-template-columns: 1fr;
  }

  .col-8,
  .col-7,
  .col-6,
  .col-5,
  .col-4 {
    grid-column: span 12;
  }

  .quiet-grid,
  .kpi-strip {
    grid-template-columns: 1fr;
  }
}