:root {
  --ink: #171a22;
  --signal: #ff4fa3;
  --foam: #fffdf7;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --hero-image: url("/assets/hero.webp");
  --mobile-hero-image: url("/assets/hero-mobile.webp");
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background: #40b9df;
  font-family: "DM Sans", sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }

.sr-only {
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  position: absolute;
  overflow: hidden;
}

.home-shell {
  isolation: isolate;
  background: #41b8df var(--hero-image) center / cover no-repeat;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  position: relative;
  overflow: hidden;
}

.home-shell:before {
  content: "";
  z-index: -2;
  background: var(--hero-image) center / cover no-repeat;
  filter: saturate(1.03) contrast(1.02);
  position: absolute;
  inset: 0;
  transform: scale(1.015);
}

.home-shell:after {
  content: "";
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(#0d426714, #ffffff05 38%, #26484d1f);
  position: absolute;
  inset: 0;
}

.scene-wash {
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(at 50% 32%, #fff7cd4d, #0000 34%),
    linear-gradient(90deg, #084b6f14, #0000 20% 80%, #084b6f14);
  position: absolute;
  inset: 0;
}

.topbar {
  color: var(--foam);
  text-shadow: 0 1px 16px #0003;
  justify-content: space-between;
  align-items: center;
  padding: clamp(22px, 4vw, 44px) clamp(22px, 5vw, 72px);
  display: flex;
}

.brand-lockup {
  color: inherit;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  display: inline-flex;
}

.brand-mark-wrap {
  background: #fffc;
  border-radius: 50%;
  place-items: center;
  width: 36px;
  height: 36px;
  display: grid;
  overflow: hidden;
  box-shadow: 0 6px 20px #10213333;
}

.brand-mark {
  object-fit: contain;
  width: 28px;
  height: 28px;
}

.brand-name {
  letter-spacing: -0.055em;
  font: 700 17px/1 "Space Grotesk", sans-serif;
}

.brand-name span,
.site-title span {
  color: var(--signal);
}

.top-note {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
}

.search-stage {
  text-align: center;
  width: min(680px, 100% - 40px);
  margin: auto;
  padding: 36px 0 54px;
  transform: translateY(-2vh);
}

.eyebrow {
  color: #fffffff0;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: #0c243e24;
  border: 1px solid #ffffff6b;
  border-radius: 999px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
}

.eyebrow-dot {
  background: var(--signal);
  border-radius: 50%;
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 4px #ff4fa333, 0 0 18px #ff4fa3cc;
}

.site-title {
  color: var(--foam);
  letter-spacing: -0.085em;
  text-shadow: 0 5px 24px #09203542;
  margin: 18px 0 5px;
  font: 700 clamp(48px, 9vw, 84px) / 0.95 "Space Grotesk", sans-serif;
}

.stage-caption {
  color: #fffdf7;
  letter-spacing: 0.015em;
  text-shadow: 0 2px 12px #09203547;
  margin: 0 0 25px;
  font-size: 14px;
  font-weight: 600;
}

.search-form {
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  min-height: 68px;
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
  background: #fffdf7eb;
  border: 1px solid #ffffffb8;
  border-radius: 18px;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 22px;
  display: flex;
  box-shadow: 0 18px 50px #112d3e40, inset 0 3px #ffffff59;
}

.search-form:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 22px 55px #112d3e47, 0 0 0 4px #ff4fa329;
}

.search-form input {
  min-width: 0;
  color: var(--ink);
  background: 0 0;
  border: 0;
  outline: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 500;
}

.search-form input::placeholder {
  color: #92959a;
  opacity: 0.78;
}

.is-active .search-form {
  box-shadow: 0 22px 55px #112d3e47, 0 0 0 5px #ff4fa347;
}

.search-icon {
  color: #747982;
  flex: none;
}

.search-button {
  color: #fff;
  background: var(--ink);
  min-height: 50px;
  transition: transform 0.16s var(--ease-out), background 0.2s ease, box-shadow 0.2s ease;
  border: 0;
  border-radius: 12px;
  flex: none;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
}

.search-button:hover {
  background: #282d3a;
  transform: translateY(-2px);
  box-shadow: 0 7px 14px #171a2233;
}

.search-button:active {
  transform: scale(0.97);
}

.search-message {
  min-height: 24px;
  color: var(--foam);
  opacity: 0;
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
  text-shadow: 0 2px 12px #00000040;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  transform: translateY(-5px);
}

.search-message.visible {
  opacity: 1;
  transform: translateY(0);
}

.search-message svg {
  display: none;
  color: var(--signal);
}

.search-message.is-ok svg {
  display: block;
}

.hint {
  color: #fffdf7e6;
  letter-spacing: 0.015em;
  margin: 14px 0 0;
  font-size: 11px;
}

.inside {
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  display: none;
}

.inside.is-open {
  display: flex;
}

.inside a {
  color: var(--foam);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #0c243e42;
  border: 1px solid #ffffff6b;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.inside a:hover {
  background: #ff4fa333;
  border-color: #ff4fa3aa;
}

.results {
  text-align: left;
  width: min(680px, 100%);
  margin: 22px auto 0;
  background: #fffdf7f5;
  border: 1px solid #ffffffb8;
  border-radius: 16px;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px #112d3e40;
  overflow: hidden;
}

.result {
  padding: 14px 22px;
}

.result + .result {
  border-top: 1px solid #e7e9ec;
}

.result-title {
  color: #1a0dab;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  display: block;
}

.result-title:hover {
  text-decoration: underline;
}

.result-url {
  color: #006621;
  font-size: 13px;
  margin-top: 2px;
  word-break: break-all;
}

.result-snippet {
  color: #4d5156;
  font-size: 13.5px;
  line-height: 1.45;
  margin-top: 3px;
}

.footer-note {
  color: #ffffffd6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px #0003;
  align-items: center;
  gap: 12px;
  margin: auto clamp(22px, 5vw, 72px) 24px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
}

.footer-line {
  opacity: 0.65;
  background: currentColor;
  width: 32px;
  height: 1px;
}

@media (max-width: 620px) {
  .mobile-only-hidden { display: none !important; }
  .home-shell {
    background-image: var(--mobile-hero-image);
    background-position: top;
  }
  .home-shell:before {
    background-image: var(--mobile-hero-image);
    background-position: top;
    transform: scale(1.01);
  }
  .topbar {
    align-items: flex-start;
    padding-top: 20px;
  }
  .top-note {
    text-align: right;
    max-width: 120px;
    line-height: 1.25;
  }
  .search-stage {
    width: min(100% - 28px, 430px);
    margin-top: auto;
    margin-bottom: auto;
    padding: 34px 0 58px;
    transform: translateY(8vh);
  }
  .eyebrow { font-size: 9px; }
  .site-title {
    margin-top: 14px;
    font-size: clamp(28px, 8.6vw, 42px);
    letter-spacing: -0.04em;
    white-space: nowrap;
  }
  .stage-caption {
    margin-bottom: 18px;
    font-size: 12px;
  }
  .search-form {
    border-radius: 15px;
    min-height: 60px;
    padding-left: 14px;
  }
  .search-button {
    min-height: 44px;
    padding: 0 14px;
  }
  .search-button span { display: none; }
  .hint { font-size: 10px; }
  .footer-note {
    margin-bottom: 18px;
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, :before, :after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
