:root {
  --header-bg: #1565d8;
  --header-text: #ffffff;

  --main-bg: #ffffff;
  --soft-bg: #ffffff;
  --footer-bg: #f9f9f9;

  --surface: #ffffff;
  --text: #0f172a;
  --text-soft: #475569;
  --line: #d9e1ec;
  --line-strong: #c2cfde;

  --button-dark: #0f172a;
  --button-dark-text: #ffffff;
  --button-light: #ffffff;
  --button-light-text: #0f172a;

  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --max-width: 1240px;
}

html[data-theme="dark"] {
  --main-bg: #08111f;
  --soft-bg: #0d1728;
  --footer-bg: #0b1525;

  --surface: #101b2f;
  --text: #e5edf7;
  --text-soft: #9fb0c7;
  --line: #20314b;
  --line-strong: #314766;

  --button-dark: #ffffff;
  --button-dark-text: #0f172a;
  --button-light: #18263d;
  --button-light-text: #e5edf7;

  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--main-bg);
  color: var(--text);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

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

svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  color: var(--header-text);
  transform: translateY(0);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  box-shadow: 0 8px 24px rgba(21, 101, 216, 0.22);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.site-header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.site-nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}

.site-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "brand . actions"
    "nav nav nav";
  align-items: center;
  row-gap: 0.7rem;
  min-height: auto;
  padding: 0.85rem 0 0.8rem;
}

.site-logo {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  padding: 2px;
}

.site-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.site-brand-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.92;
}

.site-brand-title {
  font-size: 1.02rem;
  font-weight: 800;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  opacity: 0.8;
  transition: 0.2s ease;
}

.theme-btn:hover,
.theme-btn.is-active {
  background: rgba(255, 255, 255, 0.2);
  opacity: 1;
}

.menu-toggle {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  position: absolute;
  left: 11px;
  width: 24px;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
  transition: 0.24s ease;
}

.menu-toggle span:nth-child(1) { top: 14px; }
.menu-toggle span:nth-child(2) { top: 22px; }
.menu-toggle span:nth-child(3) { top: 30px; }

.menu-toggle.is-open span:nth-child(1) {
  top: 22px;
  transform: rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  top: 22px;
  transform: rotate(-45deg);
}

.site-nav a {
  padding: 0.5rem 0.78rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
  line-height: 1.1;
  white-space: nowrap;
  transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active,
.site-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-weight: 700;
}

/* Main */
.site-main {
  background: var(--main-bg);
}

.hero {
  padding: 4rem 0 2.75rem;
  background: var(--main-bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lead {
  margin: 1.15rem 0 0;
  max-width: 720px;
  font-size: 1.08rem;
  color: var(--text-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.7rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.82rem 1.18rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-weight: 700;
  transition: 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--button-dark);
  color: var(--button-dark-text);
  border-color: var(--button-dark);
}

.button-secondary {
  background: var(--button-light);
  color: var(--button-light-text);
}

.hero-note {
  margin-top: 1.5rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-note p {
  margin: 0;
  color: var(--text-soft);
}

.hero-note p + p {
  margin-top: 0.55rem;
}

.hero-brand-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-brand-image {
  width: min(100%, 190px);
  height: auto;
}

.hero-brand-caption {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.section {
  padding: 2rem 0 4rem;
}

.section-soft {
  background: var(--soft-bg);
}

.section-heading {
  margin-bottom: 1.35rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.14;
}

.section-heading p {
  margin: 0.7rem 0 0;
  max-width: 760px;
  color: var(--text-soft);
}

.two-column,
.three-column,
.card-grid {
  display: grid;
  gap: 1rem;
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.card {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .panel,
html[data-theme="dark"] .card {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

.card {
  display: block;
  transition: 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

html[data-theme="dark"] .card:hover {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

.panel h2,
.panel h3,
.card h3 {
  margin: 0 0 0.55rem;
  line-height: 1.2;
}

.panel p,
.card p {
  margin: 0;
  color: var(--text-soft);
}

.feature-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-soft);
}

.feature-list li + li {
  margin-top: 0.45rem;
}

.text-link {
  font-weight: 700;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
}

.site-footer-inner {
  display: grid;
  gap: 0.6rem;
}

.site-footer-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.site-footer-meta {
  margin: 0;
  color: var(--text-soft);
}

.site-footer-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.site-footer-contact a:hover {
  border-color: var(--line-strong);
}

/* Tablet */
@media (max-width: 1180px) and (min-width: 761px) {
  .site-nav a {
    font-size: 0.88rem;
    padding: 0.46rem 0.68rem;
  }

  .theme-btn {
    width: 2.05rem;
    height: 2.05rem;
  }
}

@media (max-width: 1080px) {
  .hero-grid,
  .card-grid,
  .three-column,
  .two-column {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 760px) {
  .container {
    width: min(var(--max-width), calc(100% - 1.25rem));
  }

  .site-header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
    gap: 0.7rem;
    padding: 0.72rem 0;
  }

  .site-brand {
    gap: 0.65rem;
    min-width: 0;
  }

  .site-logo {
    width: 58px;
    height: 58px;
  }

  .site-brand-kicker {
    font-size: 0.64rem;
    letter-spacing: 0.11em;
  }

  .site-brand-title {
    font-size: 0.94rem;
    line-height: 1.06;
  }

  .site-header-actions {
    gap: 0.5rem;
  }

  .theme-toggle {
    padding: 0.2rem;
    gap: 0.2rem;
    border-radius: 16px;
  }

  .theme-btn {
    width: 2rem;
    height: 2rem;
  }

  .menu-toggle {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 12px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .menu-toggle span {
    left: 0.68rem;
    width: 1.02rem;
    height: 2px;
  }

  .menu-toggle span:nth-child(1) { top: 0.78rem; }
  .menu-toggle span:nth-child(2) { top: 1.16rem; }
  .menu-toggle span:nth-child(3) { top: 1.54rem; }

  .menu-toggle.is-open span:nth-child(1),
  .menu-toggle.is-open span:nth-child(3) {
    top: 1.16rem;
  }

  .site-nav {
    display: none;
    width: 100%;
    grid-column: 1 / -1;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.2rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    display: block;
    width: 100%;
    padding: 0.82rem 0.9rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    white-space: normal;
  }

  .hero {
    padding: 2.4rem 0 1.8rem;
  }

  .hero-grid {
    gap: 1.15rem;
  }

  .hero h1 {
    font-size: clamp(2rem, 10.5vw, 3.35rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
  }

  .lead {
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .hero-actions {
    margin-top: 1.35rem;
    gap: 0.75rem;
  }

  .button {
    width: 100%;
  }

  .hero-note {
    margin-top: 1.1rem;
    padding: 1rem 1rem;
  }

  .hero-brand-panel {
    padding: 1rem;
    border-radius: 20px;
  }

  .hero-brand-image {
    width: min(100%, 170px);
  }

  .hero-brand-caption {
    margin-top: 0.8rem;
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .section {
    padding: 1.45rem 0 2.6rem;
  }

  .panel,
  .card {
    padding: 1.05rem;
  }

  .section-heading h2 {
    font-size: clamp(1.45rem, 7vw, 2rem);
  }
}
