@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

:root {
  --brand-orange: #ff9a3c;
  --brand-blue: #6ac8ff;
  --ink-950: #0f1116;
  --ink-900: #1b1f26;
  --paper-100: #fff4e6;
  --paper-200: #eef7ff;
  --pill-light: #e6e6e6;
  --pill-dark: #2b2b2b;
}

@property --split {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 50%;
}

@property --split-stop {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 50%;
}

body.page-home {
  background:
    radial-gradient(1200px 540px at 10% -10%, rgba(255, 159, 70, 0.35), transparent 70%),
    radial-gradient(1000px 520px at 92% -18%, rgba(106, 200, 255, 0.4), transparent 70%),
    linear-gradient(130deg, var(--paper-100) 0%, var(--paper-200) 55%, #fefcff 100%);
  color: var(--ink-900);
  --footer-text: rgba(15, 17, 22, 0.65);
  --footer-pill-bg: rgba(255, 255, 255, 0.78);
  --footer-pill-border: rgba(15, 17, 22, 0.12);
  --footer-line: linear-gradient(90deg, transparent 0%, rgba(255, 154, 60, 0.55) 35%, rgba(106, 200, 255, 0.45) 65%, transparent 100%);
  --footer-shadow: 0 16px 34px rgba(16, 20, 30, 0.12);
  position: relative;
  z-index: 0;
}

body.page-home::before,
body.page-home::after {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

body.page-home::before {
  background:
    radial-gradient(1100px 560px at 12% 6%, rgba(255, 206, 148, 0.6), transparent 70%),
    radial-gradient(920px 460px at 82% -6%, rgba(106, 200, 255, 0.22), transparent 70%);
}

body.page-home::after {
  background:
    radial-gradient(980px 540px at 8% 10%, rgba(255, 149, 86, 0.48), transparent 70%),
    radial-gradient(980px 560px at 88% -10%, rgba(38, 58, 80, 0.48), transparent 70%);
}

body.page-home.home-bg-left::before {
  opacity: 1;
  transform: scale(1);
}

body.page-home.home-bg-right::after {
  opacity: 1;
  transform: scale(1);
}

body.page-home main {
  min-height: calc(100vh - var(--nav-height));
  min-height: calc(100svh - var(--nav-height));
  display: grid;
  place-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) 1.5rem;
}

body.page-home .site-footer {
  padding: 1.2rem 1rem 2rem;
  letter-spacing: 0.2em;
}

body.page-home .site-footer small {
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
}

@media (min-width: 901px) {
  body.page-home .site-footer {
    padding: 1.4rem 1rem 2.3rem;
    letter-spacing: 0.22em;
  }

  body.page-home .site-footer small {
    font-size: 0.72rem;
  }
}

.home-hero {
  width: 100%;
  display: grid;
  place-items: center;
}

.home-hero-inner {
  width: min(1200px, 92vw);
  max-width: 100%;
  display: grid;
  gap: 1.4rem;
}

.home-typed {
  width: min(960px, 94%);
  margin: 0 auto;
  padding: 0.9rem 1.7rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 17, 22, 0.12);
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(16, 20, 30, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  color: #0f1116;
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.3rem, 2.6vw, 2.2rem);
  letter-spacing: 0.012em;
  pointer-events: none;
  transform: translateY(-8px);
}

@media (min-width: 901px) {
  .home-typed {
    transform: translateY(calc(-8px - 3cm));
  }
}

.home-typed-prompt {
  font-weight: 700;
  opacity: 0.7;
}

.home-typed-text {
  min-height: 1.2em;
  display: inline-block;
  white-space: nowrap;
}

.home-typed-caret {
  width: 0.65rem;
  height: 1.7rem;
  border-radius: 3px;
  background: #0f1116;
  animation: caretBlink 0.9s steps(2, start) infinite;
}

.home-typed.is-idle .home-typed-caret {
  animation-play-state: paused;
}

.home-pill {
  --split: 50%;
  --split-stop: 50%;
  --left-bg: var(--pill-light);
  --right-bg: var(--pill-dark);
  --divider: rgba(15, 17, 22, 0.35);
  --line-size: clamp(1px, 0.35vw, 4px);
  position: relative;
  display: flex;
  min-height: clamp(280px, 52vh, 420px);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(18, 22, 30, 0.12);
  box-shadow: 0 30px 80px rgba(16, 20, 30, 0.18);
  background: linear-gradient(135deg,
    var(--left-bg) 0,
    var(--left-bg) calc(var(--split-stop) - var(--line-size)),
    var(--divider) calc(var(--split-stop) - var(--line-size)),
    var(--divider) calc(var(--split-stop) + var(--line-size)),
    var(--right-bg) calc(var(--split-stop) + var(--line-size)),
    var(--right-bg) 100%);
  isolation: isolate;
  animation: homeRise 0.85s ease both;
  transition: --split 0.55s cubic-bezier(0.2, 0.9, 0.25, 1), --split-stop 0.55s cubic-bezier(0.2, 0.9, 0.25, 1), background 0.25s ease;
}

.home-pill-divider {
  display: none;
}

.home-pill-panel {
  flex: 0 1 auto;
  flex-basis: 50%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.8rem, 3vw, 3.2rem);
  transition: flex-basis 0.55s cubic-bezier(0.2, 0.9, 0.25, 1), color 0.18s ease;
  position: relative;
  background: transparent;
}

.home-pill-panel--light {
  flex-basis: var(--split);
  color: var(--ink-900);
}

.home-pill-panel--dark {
  flex-basis: calc(100% - var(--split));
  color: #f6f7fb;
}

.home-pill.is-left {
  --left-bg: #ffffff;
  --right-bg: #2b2b2b;
}

.home-pill.is-right {
  --left-bg: #e3e3e3;
  --right-bg: #000000;
}

.home-pill-content {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 420px;
  animation: homeFade 0.9s ease both;
}

.home-pill-panel--light .home-pill-content {
  align-items: flex-start;
  text-align: left;
}

.home-pill-panel--dark .home-pill-content {
  align-items: flex-end;
  text-align: right;
}

.home-pill-panel--light .home-pill-content {
  animation-delay: 0.12s;
}

.home-pill-panel--dark .home-pill-content {
  animation-delay: 0.2s;
}

.home-pill-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(27, 31, 38, 0.65);
}

.home-pill-panel--dark .home-pill-eyebrow {
  color: rgba(246, 247, 251, 0.65);
}

.home-pill-title {
  margin: 0;
  font-size: clamp(1.9rem, 3.4vw, 3.1rem);
  line-height: 1.1;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  transition: transform 0.2s ease;
}

.home-pill-panel:hover .home-pill-title,
.home-pill-panel:focus-within .home-pill-title {
  transform: scale(1.04);
}

.home-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  color: #0f1116;
  background: var(--brand-orange);
  box-shadow: 0 10px 20px rgba(255, 154, 60, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-pill-btn:hover,
.home-pill-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(255, 154, 60, 0.3);
  background: #ffb063;
}

.home-pill-btn--ghost {
  background: transparent;
  color: var(--brand-blue);
  border: 1px solid var(--brand-blue);
  box-shadow: none;
}

.home-pill-btn--ghost:hover,
.home-pill-btn--ghost:focus-visible {
  background: var(--brand-blue);
  color: #0f1116;
  border-color: var(--brand-blue);
  box-shadow: 0 10px 20px rgba(106, 200, 255, 0.2);
}

@keyframes homeRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes homeFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes caretBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes dividerWiggle {
  0% { transform: translate(0, 0); opacity: 0.35; }
  45% { transform: translate(3px, -3px); opacity: 0.6; }
  70% { transform: translate(-2px, 2px); opacity: 0.45; }
  100% { transform: translate(0, 0); opacity: 0.35; }
}

@keyframes pillSheen {
  0% { opacity: 0; transform: translateX(-40%) translateY(10%); }
  20% { opacity: 0.6; }
  100% { opacity: 0; transform: translateX(40%) translateY(-10%); }
}

@media (max-width: 900px) {
  .home-pill {
    min-height: clamp(260px, 52vh, 360px);
  }

  .home-typed {
    width: min(680px, 94%);
    font-size: clamp(1.1rem, 3.6vw, 1.6rem);
    padding: 0.75rem 1.2rem;
    transform: translateY(-6px);
  }

  .home-pill-panel--dark .home-pill-content,
  .home-pill-panel--light .home-pill-content {
    max-width: 280px;
  }
}

@media (max-width: 768px) {
  .home-hero-inner {
    width: 100%;
  }

  .home-typed,
  .home-pill {
    justify-self: center;
    margin-left: auto;
    margin-right: auto;
  }

  .home-typed {
    width: min(440px, 88vw);
    margin-inline: auto;
  }

  .home-pill {
    flex-direction: column;
    border-radius: 0;
    height: auto;
    min-height: 0;
    width: min(560px, 94vw);
    margin: 0 auto;
    padding: 0;
    transition: none;
    border: none;
    box-shadow: none;
    background: transparent;
    overflow: visible;
    gap: 0;
  }

  .home-pill-panel {
    flex: none;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: clamp(2.6rem, 8vw, 3.4rem);
    border-radius: 24px;
    overflow: hidden;
    transition: none;
    --cut-size: clamp(16px, 4vw, 22px);
  }

  .home-pill-panel--light {
    align-items: center;
    background: linear-gradient(145deg, #fff7ea 0%, #ffe1c2 55%, #ffffff 100%);
    border: 1px solid rgba(24, 26, 32, 0.12);
    box-shadow: 0 24px 50px rgba(255, 154, 60, 0.18), 0 8px 18px rgba(16, 20, 30, 0.08);
    clip-path: polygon(0 0, calc(100% - var(--cut-size)) 0, 100% var(--cut-size), 100% 100%, var(--cut-size) 100%, 0 calc(100% - var(--cut-size)));
  }

  .home-pill-panel--light::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(140px 90px at 85% 15%, rgba(255, 154, 60, 0.32), transparent 70%),
      linear-gradient(120deg, rgba(255, 255, 255, 0.7), transparent 60%);
    opacity: 0.7;
    pointer-events: none;
  }

  .home-pill-panel--dark {
    align-items: center;
    background: linear-gradient(145deg, #1b1f2a 0%, #0c0f15 100%);
    border: 1px solid rgba(106, 200, 255, 0.32);
    box-shadow: 0 28px 60px rgba(8, 10, 15, 0.55), 0 0 0 1px rgba(106, 200, 255, 0.08) inset;
    clip-path: polygon(var(--cut-size) 0, 100% 0, 100% calc(100% - var(--cut-size)), calc(100% - var(--cut-size)) 100%, 0 100%, 0 var(--cut-size));
  }

  .home-pill-panel--dark::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(160px 110px at 20% 20%, rgba(106, 200, 255, 0.35), transparent 70%),
      linear-gradient(160deg, rgba(255, 255, 255, 0.12), transparent 60%);
    opacity: 0.75;
    pointer-events: none;
  }

  .home-pill-divider {
    display: block;
    width: min(320px, 70%);
    height: 2px;
    margin: clamp(0.8rem, 2.6vw, 1.2rem) auto;
    background: linear-gradient(90deg, transparent 0%, rgba(106, 200, 255, 0.75) 25%, rgba(255, 154, 60, 0.9) 50%, rgba(106, 200, 255, 0.75) 75%, transparent 100%);
    position: relative;
    box-shadow: 0 0 10px rgba(106, 200, 255, 0.35), 0 0 16px rgba(255, 154, 60, 0.3);
  }

  .home-pill-divider::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(15, 17, 22, 0.85);
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 0 0 10px rgba(106, 200, 255, 0.45);
  }

  .home-pill-divider::after {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%);
    transform: translateY(-50%);
    opacity: 0.6;
  }

  .home-pill-content {
    position: relative;
    z-index: 1;
  }

  .home-pill-panel--light .home-pill-content,
  .home-pill-panel--dark .home-pill-content {
    max-width: 100%;
    margin: 0;
  }

  .home-pill-panel--light .home-pill-content {
    align-items: flex-start;
    text-align: left;
    max-width: min(360px, 90%);
  }

  .home-pill-panel--dark .home-pill-content {
    align-items: flex-end;
    text-align: right;
    max-width: min(340px, 88%);
  }

  .home-pill-panel--light .home-pill-title {
    font-size: clamp(1.7rem, 5.2vw, 2.4rem);
  }

  .home-pill-panel--dark .home-pill-title {
    font-size: clamp(1.55rem, 4.8vw, 2.1rem);
  }

  .home-pill-panel:hover .home-pill-title {
    transform: none;
  }
}

@media (max-width: 600px) {
  body.page-home main {
    padding: 2.5rem 1rem;
  }

  .home-pill {
    min-height: 0;
  }

  .home-pill-panel {
    padding: clamp(2.2rem, 9vw, 3rem);
    --cut-size: clamp(14px, 6vw, 18px);
  }

  .home-pill-divider {
    width: min(240px, 68%);
    margin: clamp(0.6rem, 3vw, 1rem) auto;
  }

  .home-typed {
    width: min(380px, 86vw);
    min-height: 4.6rem;
    font-size: 1.05rem;
    padding: 0.6rem 0.95rem;
    transform: translateY(-4px);
  }

  .home-typed-caret {
    height: 1.3rem;
  }

  .home-typed-text {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-home::before,
  body.page-home::after {
    transition: none;
  }

  .home-pill::before,
  .home-pill::after {
    animation: none;
  }

  .home-pill,
  .home-pill-content,
  .home-pill-panel,
  .home-pill-title,
  .home-pill-btn {
    animation: none;
    transition: none;
  }
}
