/* Hero — prototype-faithful first screen */

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

.layout--home .layout__header {
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition:
    background 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease,
    -webkit-backdrop-filter 0.24s ease,
    backdrop-filter 0.24s ease;
}

.layout--home .layout__header--scrolled {
  border-bottom-color: transparent;
  background: oklch(98% 0.004 95 / 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: none;
}

html[data-theme='dark'] .layout--home .layout__header--scrolled {
  background: oklch(16% 0.012 70 / 0.72);
}

/* Pull hero under sticky header so background fills the nav overlay zone */
.home-hero {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  margin-top: calc(-1 * var(--home-header-height, 61px));
  padding-top: calc(var(--home-header-height, 61px) + clamp(32px, 6vh, 72px));
  padding-bottom: clamp(32px, 6vh, 72px);
  align-items: center;
  overflow: hidden;
}

.home-hero .home-hero__inner {
  display: grid;
  width: min(1140px, 100%);
  margin-inline: auto;
  padding-inline: clamp(24px, 4vw, 48px);
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  grid-template-areas:
    "copy visual"
    "platform platform";
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  row-gap: clamp(28px, 4vw, 48px);
}

.home-hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  grid-area: copy;
  gap: clamp(20px, 3vh, 28px);
  max-width: 560px;
  width: 100%;
}

.home-hero h1 {
  margin: 0;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.06;
}

.home-hero__tagline {
  max-width: none;
  margin: 0;
  color: oklch(46% 0.012 70);
  font-size: 16px;
  line-height: 1.55;
}

.hl-warm {
  color: var(--accent);
}

.hl-flow {
  position: relative;
  display: inline-block;
}

.hl-flow::after {
  position: absolute;
  right: -2px;
  bottom: 0.04em;
  left: -2px;
  height: 0.2em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M0 7 C18 3 36 8 54 5 C72 2 90 7 120 4' fill='none' stroke='%23c47952' stroke-width='2.8' stroke-linecap='round'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
  content: "";
  pointer-events: none;
}

.home-url-form {
  display: flex;
  width: 100%;
  max-width: 560px;
  align-items: stretch;
  padding: 6px;
  border: 1px solid oklch(86% 0.01 95);
  border-radius: 999px;
  background: oklch(100% 0.002 95 / 0.94);
  box-shadow:
    0 1px 2px oklch(0% 0 0 / 0.05),
    0 16px 40px oklch(0% 0 0 / 0.08);
  gap: 8px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.home-resource-input {
  display: flex;
  width: 100%;
  min-height: 148px;
  flex-direction: column;
  padding: 16px 16px 12px;
  border: 1px solid oklch(90% 0.006 95);
  border-radius: 16px;
  background: oklch(100% 0.002 95 / 0.96);
  box-shadow:
    0 1px 2px oklch(0% 0 0 / 0.04),
    0 18px 44px oklch(0% 0 0 / 0.08);
  gap: 12px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.home-resource-input:focus-within {
  border-color: oklch(82% 0.012 90);
  box-shadow:
    0 1px 2px oklch(0% 0 0 / 0.05),
    0 22px 52px oklch(0% 0 0 / 0.1);
}

.home-resource-input__field {
  position: relative;
  display: block;
  min-width: 0;
  flex: 1 1 auto;
}

.home-resource-input__ghost {
  position: absolute;
  inset: 0;
  z-index: 0;
  color: oklch(64% 0.012 70);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  pointer-events: none;
  white-space: pre-wrap;
  word-break: break-word;
}

.home-resource-input__ghost-caret {
  display: inline-block;
  margin-left: 1px;
  animation: home-resource-input-caret-blink 1s step-end infinite;
}

@keyframes home-resource-input-caret-blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.home-resource-input__textarea {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-height: 72px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  resize: none;
  outline: none;
}

.home-resource-input__textarea:focus,
.home-resource-input__textarea:focus-visible {
  outline: none;
  box-shadow: none;
}

.home-resource-input__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-resource-input__tools {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.home-resource-input__tool {
  position: relative;
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: oklch(52% 0.012 70);
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.home-resource-input__tool-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 3;
  padding: 6px 10px;
  border-radius: 8px;
  background: oklch(17% 0.012 70);
  color: oklch(98% 0.004 95);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
}

@media (hover: hover) {
  .home-resource-input__tool:hover .home-resource-input__tool-tip,
  .home-resource-input__tool:focus-visible .home-resource-input__tool-tip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}

.home-resource-input__tool:hover {
  background: oklch(96% 0.004 95);
  color: var(--fg);
}

.home-resource-input__tool svg {
  width: 18px;
  height: 18px;
}

.home-resource-input__submit-host {
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  max-width: 40px;
  transition: max-width 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-resource-input__submit {
  position: relative;
  display: inline-flex;
  width: 40px;
  min-width: 40px;
  height: 40px;
  flex: 0 0 auto;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-start;
  padding: 0 11px;
  border: 1px solid oklch(100% 0 0 / 0.42);
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    oklch(72% 0.18 295 / 0.72) 0%,
    oklch(74% 0.16 340 / 0.68) 38%,
    oklch(76% 0.14 25 / 0.64) 72%,
    oklch(78% 0.12 55 / 0.6) 100%
  );
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  box-shadow:
    0 1px 2px oklch(0% 0 0 / 0.08),
    0 8px 24px oklch(58% 0.14 320 / 0.22),
    inset 0 1px 0 oklch(100% 0 0 / 0.35);
  color: oklch(99% 0.004 95);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  transition:
    padding 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.24s ease,
    transform 0.24s ease;
}

.home-resource-input__submit-label {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  margin-inline-end: 0;
  transition:
    max-width 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.24s ease,
    margin 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-resource-input__submit-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) {
  .home-resource-input__submit-host:hover {
    max-width: 280px;
  }

  .home-resource-input__submit-host:hover .home-resource-input__submit {
    width: auto;
    min-width: 40px;
    max-width: 280px;
    padding-inline: 14px 11px;
    transform: translateY(-1px);
    box-shadow:
      0 2px 4px oklch(0% 0 0 / 0.1),
      0 12px 28px oklch(58% 0.14 320 / 0.28),
      inset 0 1px 0 oklch(100% 0 0 / 0.4);
  }

  .home-resource-input__submit-host:hover .home-resource-input__submit-label {
    max-width: 220px;
    opacity: 1;
    margin-inline-end: 8px;
  }
}

.home-resource-input__submit svg {
  width: 18px;
  height: 18px;
}

@media (prefers-reduced-motion: reduce) {
  .home-resource-input__submit-host,
  .home-resource-input__submit,
  .home-resource-input__submit-label {
    transition: none;
  }
}

.home-hero__platform-actions {
  display: flex;
  grid-area: platform;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: clamp(16px, 3vw, 32px);
}

.home-cta-button {
  display: inline-flex;
  min-width: min(100%, 212px);
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid oklch(17% 0.012 70);
  border-radius: 999px;
  background: oklch(17% 0.012 70);
  color: oklch(98% 0.004 95);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  gap: 8px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 1px 2px oklch(0% 0 0 / 0.06),
    0 16px 36px oklch(0% 0 0 / 0.1);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.home-hero__actions .home-cta-button {
  width: 222.5px;
  min-width: 0;
}

.home-hero__platform-actions .home-cta-button {
  width: 222.5px;
  min-width: 0;
  flex: 0 0 auto;
  border: none;
}

.home-hero__platform-actions .home-cta-button:hover {
  border: none;
}

.home-cta-button:hover {
  background: oklch(24% 0.012 70);
  color: oklch(98% 0.004 95);
  text-decoration: none;
  transform: translateY(-1px);
}

.home-cta-button--primary {
  border-color: oklch(17% 0.012 70);
  background: oklch(17% 0.012 70);
  color: oklch(98% 0.004 95);
}

.home-cta-button--primary:hover {
  border-color: oklch(24% 0.012 70);
  background: oklch(24% 0.012 70);
  color: oklch(98% 0.004 95);
}

.home-cta-button--secondary {
  border-color: oklch(83% 0.012 90);
  background: oklch(100% 0.002 95 / 0.9);
  color: var(--fg);
}

.home-cta-button--app {
  border-color: oklch(83% 0.012 90);
  background: oklch(100% 0.002 95 / 0.9);
  color: var(--fg);
}

.home-cta-button--android {
  border-color: oklch(83% 0.012 90);
  background: oklch(100% 0.002 95 / 0.9);
  color: var(--fg);
}

.home-cta-button--secondary:hover {
  border-color: oklch(74% 0.018 90);
  background: oklch(98% 0.004 95);
  color: var(--fg);
}

.home-cta-button--app:hover {
  border-color: oklch(74% 0.018 90);
  background: oklch(98% 0.004 95);
  color: var(--fg);
}

.home-cta-button--android:hover {
  border-color: oklch(74% 0.018 90);
  background: oklch(98% 0.004 95);
  color: var(--fg);
}

.home-cta-button__icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  font-size: 13px;
  line-height: 1;
}

.home-cta-button > svg {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.home-cta-button__asset-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 4px;
  object-fit: contain;
}

.home-cta-button__platform-icon {
  border-radius: 4px;
}

.home-app-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  padding: 24px;
  background: oklch(10% 0.012 70 / 0.52);
  place-items: center;
}

.home-app-modal {
  position: relative;
  display: grid;
  width: min(100%, 380px);
  justify-items: center;
  padding: 32px;
  border: 1px solid oklch(87% 0.012 90);
  border-radius: 8px;
  background: oklch(100% 0.002 95);
  box-shadow:
    0 20px 52px oklch(0% 0 0 / 0.2),
    0 1px 2px oklch(0% 0 0 / 0.08);
  gap: 20px;
  text-align: center;
}

.home-app-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid oklch(86% 0.012 90);
  border-radius: 999px;
  background: oklch(100% 0.002 95 / 0.94);
  color: var(--fg);
  cursor: pointer;
}

.home-app-modal__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.home-app-modal__copy {
  display: grid;
  gap: 8px;
}

.home-app-modal__eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-app-modal h2 {
  margin: 0;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.12;
}

.home-app-modal p {
  margin: 0;
  color: oklch(46% 0.012 70);
  font-size: 16px;
  line-height: 1.5;
}

.home-app-modal__qr-frame {
  padding: 12px;
  border: 1px solid oklch(88% 0.012 90);
  border-radius: 8px;
  background: oklch(100% 0.002 95);
}

.home-app-modal__qr-frame img {
  display: block;
  width: 220px;
  height: 220px;
}

.home-app-modal__platform-icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border: 1px solid oklch(82% 0.06 142);
  border-radius: 999px;
  background: oklch(96% 0.035 142 / 0.9);
  color: oklch(34% 0.08 142);
}

.home-app-modal__platform-icon svg {
  width: 28px;
  height: 28px;
}

.home-app-modal__store-link {
  width: 100%;
}

.home-url-form:focus-within {
  border-color: oklch(78% 0.02 95);
  box-shadow:
    0 1px 2px oklch(0% 0 0 / 0.05),
    0 20px 48px oklch(0% 0 0 / 0.1);
}

.home-url-form__field {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 12px;
  padding-inline: 14px 8px;
}

.home-url-form__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: oklch(58% 0.012 70);
}

.home-url-form__input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
  outline: none;
}

.home-url-form__input:focus,
.home-url-form__input:focus-visible {
  outline: none;
  box-shadow: none;
}

.home-url-form__input::placeholder {
  color: oklch(64% 0.01 70);
}

.home-url-form__submit {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: oklch(17% 0.012 70);
  color: oklch(98% 0.004 95);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.home-url-form__submit:hover {
  background: oklch(24% 0.012 70);
}

.home-hero__secondary-action {
  justify-content: center;
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.home-url-form__submit-icon {
  display: block;
  flex-shrink: 0;
}

.home-hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  grid-area: visual;
  width: 100%;
  min-width: 0;
  perspective: 900px;
}

.home-hero__banner-tilt {
  display: flex;
  justify-content: center;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.14s ease-out;
  will-change: transform;
}

.home-hero__illustration {
  display: block;
  width: min(100%, 640px);
  height: auto;
  margin-inline: auto;
  border-radius: 12px;
  filter: drop-shadow(0 24px 48px oklch(62% 0.08 35 / 0.14));
  user-select: none;
  -webkit-user-drag: none;
}

.home-hero__video {
  aspect-ratio: 4 / 3;
  background: oklch(96% 0.006 95);
  object-fit: cover;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__banner-tilt {
    transition: none;
    transform: none !important;
  }
}

@media (max-width: 1024px) {
  .home-hero .home-hero__inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "visual"
      "copy"
      "platform";
    gap: 40px;
    text-align: center;
  }

  .home-hero__text {
    align-items: center;
    max-width: min(100%, 560px);
    margin-inline: auto;
  }

  .home-resource-input {
    min-height: 136px;
  }

  .home-hero__platform-actions {
    justify-content: center;
  }

  .home-hero__visual {
    grid-area: visual;
  }

  .home-hero__illustration {
    width: min(100%, 560px);
  }
}

@media (max-width: 640px) {
  .home-hero {
    min-height: auto;
    padding-top: calc(var(--home-header-height, 61px) + 24px);
    padding-bottom: 48px;
  }

  .home-hero .home-hero__inner {
    grid-template-areas:
      "copy"
      "visual"
      "platform";
    gap: 24px;
  }

  .home-resource-input {
    min-height: 128px;
    padding: 14px 14px 10px;
  }

  .home-resource-input__textarea {
    min-height: 64px;
    font-size: 14px;
  }

  .home-hero__platform-actions {
    gap: 12px;
  }

  .home-hero__platform-actions .home-cta-button {
    flex: 1 1 222.5px;
    width: auto;
    max-width: 222.5px;
  }

  .home-hero__illustration {
    width: min(100%, 100%);
  }

  .home-hero__actions .home-cta-button {
    width: min(100%, 222.5px);
    min-width: 0;
  }

  .home-hero__platform-actions .home-cta-button {
    width: 100%;
    min-width: 0;
    min-height: 54px;
    padding-inline: 10px;
    font-size: 12px;
    line-height: 1.15;
    gap: 6px;
    white-space: normal;
  }

  .home-hero__platform-actions .home-cta-button > svg,
  .home-hero__platform-actions .home-cta-button__asset-icon {
    width: 16px;
    height: 16px;
  }

  .home-url-form {
    flex-direction: column;
    padding: 12px;
    border-radius: 20px;
  }

  .home-url-form__field {
    width: 100%;
    padding-inline: 4px;
  }

  .home-url-form__submit {
    width: 100%;
    justify-content: center;
  }

  .home-hero h1 {
    font-size: 42px;
  }
}
