.public-home {
  --home-header-height: 78px;
  --home-dark: #091625;
  --home-text: #f1f8fd;
  --home-muted: #b6c9d8;
  --home-accent: #83eddf;
  --home-edge: #284255;
}

.public-home .header {
  color: var(--home-text);
  background: var(--home-dark);
  border-color: var(--home-edge);
  backdrop-filter: none;
}

.public-home .header .brand,
.public-home .header .nav a {
  color: var(--home-text);
}

.public-home .header .brand-dot,
.public-home .header .nav a:hover {
  color: var(--home-accent);
}

.public-home .header-cta,
.public-home .header :is(.accessibility-trigger, .menu-toggle) {
  border-color: #4a6578;
  background: #13283a;
  color: var(--home-text);
}

.public-home .header :is(.header-cta, .accessibility-trigger, .menu-toggle):hover {
  border-color: var(--home-accent);
  background: #203b4e;
}

.public-home .header .menu-toggle span {
  background: var(--home-text);
}

.public-home .header .nav.open {
  background: var(--home-dark);
  border-color: var(--home-edge);
}

.public-home .header :focus-visible,
.home-hero :focus-visible {
  outline-color: var(--home-accent);
}

.home-hero {
  display: grid;
  align-items: center;
  min-block-size: calc(100vh - var(--home-header-height));
  min-block-size: calc(100svh - var(--home-header-height));
  padding-block: clamp(2rem, 5vw, 5rem);
  color: var(--home-text);
  background:
    radial-gradient(ellipse at 24% 55%, #173848 0%, transparent 55%),
    linear-gradient(150deg, #142b40 0%, var(--home-dark) 56%);
  border-block-end: 1px solid var(--home-edge);
  overflow: clip;
}

.home-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(1.4rem, 4vw, 4.2rem);
}

.home-hero h1 {
  max-inline-size: 13ch;
  font-size: clamp(2.65rem, 5.35vw, 5.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.04em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.home-hero-copy > p {
  max-inline-size: 41ch;
  margin-block-start: clamp(.8rem, 2vw, 1.6rem);
  color: var(--home-muted);
  font-size: clamp(1rem, 1.45vw, 1.22rem);
  line-height: 1.7;
}

.home-hero .home-hero-action {
  margin-block-start: clamp(1rem, 3vw, 2.2rem);
  min-block-size: 48px;
  color: #092a2b;
  background: var(--home-accent);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
}

.home-hero .home-hero-action:hover {
  background: #acf9eb;
}

.home-hero-action svg {
  flex: none;
  transform: rotate(-90deg);
}

.home-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-block-end: clamp(.7rem, 1.6vw, 1.3rem);
  color: var(--home-accent);
  font-size: clamp(.81rem, 1.15vw, .96rem);
  font-weight: 650;
}

.home-hero-kicker::before {
  content: "";
  inline-size: 7px;
  block-size: 7px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px #83eddf25;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px clamp(.8rem, 2vw, 1.5rem);
  margin-block-start: clamp(1rem, 3vw, 2.2rem);
}

.home-hero-actions .home-hero-action { margin-block-start: 0; }
.home-hero-actions .text-link { min-block-size: 44px; color: var(--home-accent); }

.home-hero-visual {
  display: grid;
  place-items: center;
  min-inline-size: 0;
  max-inline-size: 100%;
}

.home-paths {
  background: var(--pale);
}

.home-section-heading .section-label {
  margin-block-end: 6px;
  color: var(--teal-dark);
  font-weight: 700;
}

.home-route-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(.9rem, 2.6vw, 2rem);
  margin-block-start: clamp(1.4rem, 4vw, 2.6rem);
}

.home-route {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-inline-size: 0;
  padding: clamp(1.2rem, 3.4vw, 2.8rem);
  border: 1px solid #bad6db;
  border-radius: 22px;
  background: #fff;
}

.home-route-custom {
  --route-accent: #f2cf91;
  border-color: #294a5c;
  color: var(--home-text);
  background:
    radial-gradient(circle at 0 85%, #174350, transparent 60%),
    linear-gradient(136deg, #142e43, #0c1e30 75%);
}

.home-route-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 14px;
  color: var(--route-accent, var(--teal-dark));
  font-size: .84rem;
  font-weight: 650;
}

.home-route-tag span { font-variant-numeric: tabular-nums; }
.home-route-tag svg { inline-size: 19px; block-size: 19px; }

.home-route h3 {
  font-size: clamp(1.85rem, 3.3vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.home-route > p {
  margin-block: .75rem 1.35rem;
  color: var(--muted);
}

.home-route-custom > p { color: #c1d6e1; }

.home-task-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  inline-size: 100%;
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
}

.home-task-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  min-block-size: 61px;
  block-size: 100%;
  padding: .55rem .65rem;
  border: 1px solid #d4e5e9;
  border-radius: 9px;
  background: #f5fafb;
  color: var(--navy);
  font-size: .87rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.home-task-list a:hover { border-color: var(--teal-dark); }
.home-task-list bdi { display: block; margin-block-start: 3px; color: var(--teal-dark); font-size: .8rem; }
.home-task-list svg { inline-size: 15px; block-size: 15px; color: var(--teal-dark); }

.home-route .button { margin-block-start: auto; }
.home-route-custom .button { background: var(--route-accent); color: #172636; }
.home-route-custom .button:hover { background: #ffe0a9; }

.home-route-example {
  inline-size: 100%;
  margin-block: 0 1.4rem;
  padding-block: .85rem;
  border-block: 1px solid #486575;
  color: #d6e7ee;
}

.home-route-example > span { color: var(--route-accent); font-size: .88rem; }

.home-case-steps {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .55rem;
  margin: .75rem 0;
  padding: 0;
  list-style: none;
}

.home-case-steps li {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  padding: .28rem .58rem;
  border: 1px solid #c8dde3;
  border-radius: 5px;
  color: #26445b;
  background: #f5fafb;
  font-size: .81rem;
  line-height: 1.45;
}

.home-case-steps li::before {
  content: "";
  inline-size: 5px;
  block-size: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--route-accent, var(--teal-dark));
}

.home-route-example .home-case-steps li {
  border-color: #4d6c7d;
  color: #e0edf1;
  background: #183748;
}

.home-projects { background: #fff; }
.home-projects .public-project-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
.home-case { overflow: hidden; border-radius: 18px; background: #f7fafb; }
.home-case .public-project-media { aspect-ratio: 16 / 8; background: #e7f1f4; }
.home-case .public-project-copy { padding: clamp(1rem, 2.5vw, 2rem); }
.home-case .section-label { margin-block-end: 6px; }
.home-case h3 { font-size: clamp(1.5rem, 2.5vw, 2.05rem); }
.home-case .public-project-copy p { margin-block-end: .45rem; }
.public-home .case-link-note { margin-block-end: 1.2rem; color: var(--muted); }

@media (max-width: 760px) {
  .home-route-grid,
  .home-projects .public-project-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .home-hero-actions .home-hero-action { gap: 8px; padding-inline: 13px; }
  .home-hero-actions .text-link { gap: 6px; }
}

html[data-text-scale]:not([data-text-scale="100"]) .home-route-grid,
html[data-text-scale]:not([data-text-scale="100"]) .home-projects .public-project-grid,
html[data-text-scale]:not([data-text-scale="100"]) .home-task-list {
  grid-template-columns: minmax(0, 1fr);
}

html[data-contrast="true"] .home-hero-copy > p {
  color: var(--home-text);
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    html:not([data-motion="true"]) .home-hero {
      view-timeline-name: --realsystems-hero;
    }

    html:not([data-motion="true"]) .home-hero-visual {
      animation: home-board-exit linear both;
      animation-timeline: --realsystems-hero;
      animation-range: exit 0% exit 85%;
    }
  }
}

@keyframes home-board-exit {
  to {
    opacity: .28;
    transform: perspective(1100px) translateY(6%) rotateX(11deg) scale(.92);
  }
}

@media (max-width: 900px) {
  .public-home { --home-header-height: 76px; }
}

@media (max-width: 740px) {
  .home-hero {
    padding-block: clamp(1.6rem, 6vw, 2.4rem);
  }

  .home-hero-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(.85rem, 3.2vw, 1.4rem);
  }

  .home-hero h1 {
    max-inline-size: 16ch;
    font-size: clamp(2.05rem, 8.25vw, 3.25rem);
  }

  .home-hero-visual {
    inline-size: min(100%, 360px);
    margin-inline: auto;
  }
}

@media (max-width: 650px) {
  .public-home { --home-header-height: 70px; }
}

@media (max-width: 420px) and (max-height: 650px) {
  .home-hero { padding-block: .9rem; }
  .home-hero .home-hero-action { padding-block: 10px; }
  .home-hero-visual { inline-size: min(77%, 210px); }
}

html[data-text-scale]:not([data-text-scale="100"]) .home-hero-layout {
  grid-template-columns: minmax(0, 1fr);
}

@media print {
  .public-home .header { background: #fff; border-color: #bccbd4; }
  .public-home .header .brand { color: #0b253d; }
  .home-hero { min-block-size: 0; background: #fff; color: #0b253d; }
  .home-hero-copy > p { color: #294454; }
  .home-hero-visual { display: none; }
}
