/* Hāvin public website v0.4.0 — critics audit, conversion, and accessibility pass */

:root {
  --header-height: 74px;
  --focus-ring: #3fa7e1;
  --content-max: 1180px;
}

html {
  scroll-padding-top: calc(var(--header-height) + 18px);
}
body {
  color: var(--havin-midnight-navy);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 9px;
  background: #fff;
  color: var(--havin-midnight-navy);
  box-shadow: 0 8px 28px rgba(13, 20, 38, 0.18);
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: translateY(0);
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.section {
  padding: 92px 0;
}
.section-heading {
  margin-bottom: 42px;
}
.section-heading h2 {
  text-wrap: balance;
}
.lead {
  max-width: 720px;
}

.button.primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--havin-experimental-blue),
    var(--havin-deep-purple)
  );
  box-shadow: 0 10px 28px rgba(30, 58, 138, 0.2);
}
.button.primary:hover {
  background: linear-gradient(135deg, #24479f, #5a3482);
}

.site-header {
  height: var(--header-height);
}
.brand-link {
  flex: 0 0 auto;
}
.brand-link img {
  width: 128px;
  height: auto;
}
.nav-links {
  gap: 21px;
  color: #4e5a70;
  font-size: 13px;
}
.nav-links a {
  position: relative;
}
.nav-links > a:not(.nav-cta):not(.nav-signin):after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 2px;
  background: var(--havin-sky-blue);
  transition: right 0.18s ease;
}
.nav-links > a:not(.nav-cta):not(.nav-signin):hover:after,
.nav-links > a[aria-current="page"]:after {
  right: 0;
}
.nav-signin {
  color: var(--havin-experimental-blue);
  font-weight: 800;
}
.nav-cta {
  padding: 10px 17px;
  background: linear-gradient(
    135deg,
    var(--havin-experimental-blue),
    var(--havin-deep-purple)
  );
  box-shadow: 0 8px 22px rgba(30, 58, 138, 0.2);
}

.hero {
  min-height: 730px;
  padding: 82px 0 36px;
}
.hero-grid {
  min-height: 548px;
  gap: 42px;
}
.hero-copy h1 {
  text-wrap: balance;
}
.hero-lead {
  max-width: 625px;
}
.hero-footnote {
  color: #9aa8bd;
}
.phone-stage {
  height: 570px;
}
.mock-ask-button {
  display: block;
}
.ownership-strip {
  padding-top: 25px;
}

.problem-grid {
  gap: 76px;
}
.problem-copy h2 {
  text-wrap: balance;
}
.problem-visual {
  max-width: 570px;
  aspect-ratio: 1;
  justify-self: end;
}
.problem-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 72%;
}

.story-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.plan-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(30, 58, 138, 0.12);
  border-radius: 999px;
  color: var(--havin-experimental-blue);
  background: rgba(63, 167, 225, 0.07);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.plan-chip-plus {
  border-color: rgba(212, 175, 55, 0.24);
  color: #f0d56e;
  background: rgba(212, 175, 55, 0.08);
}
.story-card h3 {
  margin-bottom: 10px;
}
.story-card p {
  margin-bottom: 0;
}
.story-card-dark .story-index {
  color: #9aa8bd;
}

.asset-tile img {
  object-fit: cover;
}
.asset-tile strong {
  font-size: 15px;
}
.asset-tile span {
  line-height: 1.45;
}

.usecases-section {
  background: linear-gradient(180deg, #f7f8fc 0%, #f2f4f9 100%);
}
.usecase-tabs button {
  cursor: pointer;
}
.usecase-panel[hidden] {
  display: none;
}
.usecase-panel:focus {
  outline: none;
}
.future-note {
  color: #6a7488;
  font-size: 11px;
}

.intelligence-copy h2 {
  text-wrap: balance;
}

.promise-preview {
  background: #fff;
}
.promise-grid h2 {
  text-wrap: balance;
}
.promise-points p {
  line-height: 1.55;
}
.text-link {
  gap: 6px;
}

.pricing-footnote {
  font-size: 12px;
}
.pricing-footnote a {
  color: var(--havin-experimental-blue);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.mobile-coming .button {
  margin-top: 4px;
}
.store-banner-wrap {
  margin-top: 20px;
}
.store-banner-image {
  width: min(100%, 600px);
}

.start-section {
  position: relative;
}
.legacy-anchor {
  position: absolute;
  top: calc(-1 * var(--header-height));
}
.start-grid {
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  gap: 72px;
  align-items: center;
}
.start-grid h2 {
  max-width: 650px;
  text-wrap: balance;
}
.start-grid > div:first-child > p:not(.eyebrow) {
  max-width: 640px;
}
.start-grid > div:first-child > .button {
  margin-top: 10px;
}
.waitlist-card > p {
  line-height: 1.55;
}
.waitlist-card > small {
  color: #a6b1c4;
  font-size: 10px;
}
.waitlist-form input::placeholder {
  color: #7a8496;
  opacity: 1;
}
.waitlist-form button:disabled,
.contact-form button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}
.form-message {
  min-height: 18px;
}

.footer-brand img {
  height: auto;
}
.footer-column a {
  width: fit-content;
}

/* Long-form and contact pages */
.legal-hero {
  padding: 78px 0 56px;
}
.legal-hero h1 {
  text-wrap: balance;
}
.legal-body {
  padding: 68px 0 92px;
}
.legal-grid {
  gap: 68px;
}
.legal-grid article p {
  font-size: 16px;
  line-height: 1.72;
}
.legal-grid article section {
  scroll-margin-top: calc(var(--header-height) + 20px);
}
.legal-aside-card a {
  line-height: 1.4;
}
.legal-aside-card a:focus-visible {
  border-radius: 4px;
}
.legal-next-action {
  margin-top: 10px;
  padding: 28px;
  border: 1px solid #d9deea;
  border-radius: 18px;
  background: #f7f8fc;
}
.legal-next-action h2 {
  margin-bottom: 10px;
  font-size: 25px;
}
.legal-next-action p {
  margin-bottom: 18px;
}
.contact-form label {
  font-size: 13px;
}
.contact-form input,
.contact-form textarea {
  font-size: 16px;
}
.contact-form > label {
  margin-bottom: -10px;
}
.contact-form > input,
.contact-form > textarea {
  margin-top: 0;
}
.contact-form textarea {
  min-height: 170px;
}
.form-privacy {
  color: #6a7488;
  font-size: 11px;
  line-height: 1.5;
}
.form-privacy a {
  color: var(--havin-experimental-blue);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.error-main {
  min-height: 62vh;
  display: grid;
  align-items: center;
}
.error-card {
  max-width: 690px;
  padding: 72px 0;
}
.error-code {
  margin-bottom: 14px;
  color: var(--havin-aviator-gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
}
.error-card h1 {
  margin-bottom: 20px;
}
.error-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

@media (max-width: 960px) {
  .mobile-menu-button {
    display: block;
  }
  .nav-links {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 13px 24px 23px;
    border-bottom: 1px solid rgba(198, 204, 214, 0.7);
    background: rgba(250, 251, 254, 0.99);
    box-shadow: 0 20px 35px rgba(17, 28, 51, 0.08);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    padding: 14px 0;
  }
  .nav-links > a:after {
    display: none;
  }
  .nav-links .nav-signin {
    margin-top: 5px;
    border-top: 1px solid #d9deea;
  }
  .nav-links .nav-cta {
    margin-top: 6px;
    padding: 13px 16px;
    text-align: center;
  }
  .start-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
}

@media (max-width: 860px) {
  .section {
    padding: 76px 0;
  }
  .hero {
    padding-top: 74px;
  }
  .problem-grid {
    gap: 42px;
  }
  .problem-visual {
    justify-self: center;
  }
  .usecase-tabs {
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .usecase-tabs::-webkit-scrollbar {
    display: none;
  }
  .usecase-tabs button {
    flex: 0 0 auto;
    min-width: 150px;
    scroll-snap-align: start;
  }
  .legal-grid {
    gap: 22px;
  }
}

@media (max-width: 620px) {
  :root {
    --header-height: 66px;
  }
  .section {
    padding: 64px 0;
  }
  h2 {
    line-height: 1.06;
  }
  .hero {
    padding: 58px 0 30px;
  }
  .hero-pill {
    margin-bottom: 18px;
  }
  .hero-copy h1 {
    font-size: clamp(43px, 13vw, 52px);
  }
  .hero-actions {
    margin-top: 24px;
  }
  .hero-footnote {
    justify-content: flex-start;
  }
  .phone-stage {
    height: 450px;
  }
  .ownership-strip {
    font-size: 10px;
  }
  .problem-grid {
    gap: 30px;
  }
  .problem-visual {
    max-width: 430px;
  }
  .story-rail {
    gap: 12px;
  }
  .asset-gallery {
    padding-bottom: 14px;
  }
  .asset-tile,
  .asset-tile-wide {
    flex-basis: 88%;
  }
  .usecase-panel {
    padding: 20px;
  }
  .usecase-copy h3 {
    font-size: 29px;
  }
  .promise-grid {
    gap: 28px;
  }
  .price-card {
    border-radius: 18px;
  }
  .mobile-grid {
    gap: 26px;
  }
  .mobile-preview-art {
    min-height: 430px;
  }
  .start-grid {
    gap: 34px;
  }
  .start-grid h2 {
    font-size: 34px;
  }
  .waitlist-card {
    border-radius: 18px;
  }
  .legal-hero {
    padding: 60px 0 46px;
  }
  .legal-hero h1 {
    font-size: 43px;
  }
  .legal-body {
    padding: 46px 0 70px;
  }
  .legal-grid article p {
    font-size: 15.5px;
  }
  .legal-next-action {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link,
  .nav-links > a:after {
    transition: none;
  }
}
