@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  /* Colors */
  --background: #fdfdfd;
  --color-primary: #1a4db3;
  --color-secondary: #89cff0;

  /* Layout */
  --site-max-width: 1750px;
  --site-margin: 96px;
  --section-padding: 48px;
  --border-radius: 75px !important;

  /* Header & Logo */
  --logo-height: 75px;
  --logo-aspect-ratio: 607 / 335;
  --header-padding-top: 1.1rem;
  --header-height: calc(var(--logo-height) / 2 + var(--header-padding-top));

  /* Hero */
  --hero-image-width: min(52vw, 910px);
  --hero-content-bottom: 0; /* Updated dynamically via JS */

  /* Typography */
  --title-font-size: min(8.5vw, 150px);
  --subtitle-font-size: clamp(24px, 1.7vw, 30px);
  --h3-font-size: clamp(45px, 3.5vw, 61.25px);
  --h4-font-size: 1.6rem;
  --h5-font-size: 1.4rem;
  --p-font-size: 1.15rem;
  --subheading-letter-spacing: -0.05em;
}

body,
html {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background: var(--background);
  scroll-behavior: smooth;
}

h1 {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 400;
  letter-spacing: -0.09em;
}

h3,
.heading {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 500;
  font-size: var(--h3-font-size);
  line-height: 1;
  letter-spacing: var(--subheading-letter-spacing);
  width: 80%;
  margin: 0 auto;
}

h3.heading {
  text-align: center;
}

h4 {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 400;
  font-size: var(--h4-font-size);
  line-height: 1;
  letter-spacing: var(--subheading-letter-spacing);
  margin: 0;
}

p,
ul {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--p-font-size);
  margin: 0;
}

.container {
  position: relative;
  max-width: calc(var(--site-max-width) - var(--site-margin) * 2);
  margin: 0 var(--site-margin);
}

.section-container {
  max-width: calc(var(--site-max-width) - var(--section-padding) * 2);
  margin: 0 auto;
  padding: 0 var(--section-padding);
}

.block {
  margin: 3.5em auto;
}

.logo {
  aspect-ratio: 607 / 335;
  height: var(--logo-height);
  width: auto;
  color: var(--color-primary);
  z-index: 11;
}

button {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 400;
  font-size: var(--p-font-size);
  padding: 1em 3rem;
  border: 1px solid white;
  border-radius: var(--border-radius);
  box-sizing: border-box;
  background: var(--color-primary);
  color: white;
  text-transform: uppercase;
  cursor: pointer;
}

header {
  position: absolute;
  width: 100%;
  height: var(--header-height);
  background: var(--background);
  z-index: 10;
}

header .logo {
  position: relative;
  top: var(--header-padding-top);
}

header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(-1 * var(--header-height));
  height: var(--header-height);
  background: linear-gradient(to bottom, var(--background) 0%, transparent 100%);
  pointer-events: none;
}

#hero {
  position: relative;
  display: flex;
  gap: 2.5%;
  max-height: fit-content;
}

#hero h1 {
  position: absolute;
  top: calc(var(--header-height) * 2);
  font-size: var(--title-font-size);
  line-height: 1.05;
  margin: 0;
  z-index: 2;
}

#hero h1 span {
  font-size: 110%;
}

#hero p {
  font-size: var(--subtitle-font-size);
  letter-spacing: var(--subheading-letter-spacing);
}

#hero_content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: max(24px, 15%);
  width: 37%;
  margin-top: clamp(325px, 33%, 500px);
  margin-left: 64px;
  margin-bottom: 5vh;
  font-size: initial;
}

#hero button {
  min-width: 17em;
  width: 65%;
  padding: initial 0;
}

#hero_image {
  width: var(--hero-image-width);
  height: auto;
  max-height: max(calc(100vh - 2 * var(--header-padding-top)), 750px);
  margin: var(--header-padding-top) 0;
  border-radius: var(--border-radius);
  object-fit: cover;
  object-position: center bottom;
}

#hero_image--mobile {
  display: none;
}

#how-it-works h3 {
  margin-bottom: 1.5em;
}

#how-it-works_steps {
  display: flex;
  justify-content: space-between;
}

#how-it-works_steps .step {
  width: 20%;
  font-size: var(--p-font-size);
}

#how-it-works_steps .step:nth-of-type(even) {
  margin-top: 4em;
}

#how-it-works_steps p {
  margin-top: 0.4em;
}

#how-it-works_steps h4 {
  margin-top: 2em;
}

#how-it-works_steps .steps_icon {
  display: block;
  height: 180px;
  width: auto;
  margin: 0 auto;
}

#frequently-asked-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  width: 100%;
  margin-top: 180px;
}

#frequently-asked-questions h3.heading {
  flex-basis: max(12ch, 30%);
  padding-left: 56px;
  margin: 0;
  text-align: start;
}

#frequently-asked-questions_questions {
  flex: 1;
}

#frequently-asked-questions details {
  box-sizing: border-box;
  font-size: var(--h4-font-size);
  padding: 0.65em 0;
  border-top: 1px solid color-mix(in srgb, currentColor 50%, transparent);
}

#frequently-asked-questions details:last-of-type {
  border-bottom: 1px solid color-mix(in srgb, currentColor 50%, transparent);
}

#frequently-asked-questions summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  cursor: pointer;
}

#frequently-asked-questions summary::-webkit-details-marker {
  display: none;
}

#frequently-asked-questions .toggle-icon {
  position: relative;
  width: 0.05em;
  height: 1em;
  margin: 0 16px;
  background: currentColor;
  transition: background-color 0.3s ease;
}

#frequently-asked-questions .toggle-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1em;
  height: 0.05em;
  background: currentColor;
  transform: translate(-50%, -50%);
}

#frequently-asked-questions details[open] .toggle-icon {
  background-color: transparent;
}

#frequently-asked-questions .faq-content {
  overflow: hidden;
  padding: 12px 0;
  margin: 24px 32px 0 128px;
}

#frequently-asked-questions .faq-content p {
  margin-bottom: 1em;
}

#frequently-asked-questions .faq-content li {
  margin-bottom: 0.25em;
}

#frequently-asked-questions_contact-us {
  margin-top: 2em;
  font-size: var(--h4-font-size);
  letter-spacing: var(--subheading-letter-spacing);
}

#join-the-waitlist {
  width: 100%;
  padding-top: 64px;
  background: var(--color-secondary);
  font-size: var(--h5-font-size);
}

#waitlist_description {
  width: 50%;
  max-width: 750px;
  margin: 0 auto;
  padding: 1.75em 0 3.5em;
  font-size: inherit;
  text-align: center;
}

#join-the-waitlist form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 24px;
  column-gap: 16px;
  width: 650px;
  margin: 0 auto;
}

#join-the-waitlist form > div {
  display: flex;
  flex-direction: column;
  grid-column: 1 / -1;
  width: 100%;
}

#join-the-waitlist form > div:has(> input#first-name) {
  grid-column: 1;
}

#join-the-waitlist form > div:has(> input#last-name) {
  grid-column: 2;
}

#join-the-waitlist form input,
#join-the-waitlist form select,
#join-the-waitlist form .input-wrapper {
  appearance: none;
  border: none;
  border-radius: var(--border-radius);
  background-color: Field;
  padding: 10px 24px;
  margin-top: 4px;
  outline: none;
  box-shadow: none;
  font-size: var(--p-font-size);
}

#join-the-waitlist form .input-wrapper {
  display: flex;
  align-items: baseline;
  padding-top: 0;
  padding-bottom: 0;
}

#join-the-waitlist form .input-wrapper > input {
  flex: 1;
  padding-left: 8px;
}

#join-the-waitlist form .phone-prefix {
  font-size: inherit;
  color: #666;
  user-select: none;
}

#join-the-waitlist form select {
  cursor: pointer;
}

#join-the-waitlist form button {
  grid-column: 1 / -1;
  width: 100%;
  padding: 24px 0;
}

#waitlist_form-error {
  /* color: red; */
  display: none;
  width: 100%;
  color: darkred;
  grid-column: 1 / -1;
  text-align: center;
  margin-top: -0.5em;
}

footer {
  padding: 16px 0;
  background: var(--color-secondary);
}

footer div {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 4px;
}

footer .logo {
  color: black;
}

footer p {
  font-size: 0.75rem;
  text-align: right;
}

@media (max-width: 1250px) {
  :root {
    --site-margin: 40px;
    --section-padding: 40px;
    --subtitle-font-size: 2.2vw;
  }

  #hero #hero_image {
    margin-top: var(--header-height);
  }

  #how-it-works_steps .steps_icon {
    height: 140px;
  }

  #how-it-works_steps .step {
    width: 22.5%;
  }

  #frequently-asked-questions h3.heading {
    padding-left: 40px;
  }

  #frequently-asked-questions .faq-content {
    margin-left: 64px;
  }
}

@media (min-width: 751px) and (max-width: 1000px) {
  :root {
    --logo-height: 55px;
    --h3-font-size: 4vw;
    --h4-font-size: 2.5vw;
    --h5-font-size: 2.25vw;
    --p-font-size: 1.8vw;
  }

  #hero #hero_content {
    margin-top: max(260px, 33%);
    margin-left: 20px;
  }

  #how-it-works_steps .steps_icon {
    height: 14vw;
  }

  #frequently-asked-questions h3.heading {
    padding-left: 0;
  }

  #frequently-asked-questions .faq-content {
    margin-left: 40px;
  }
}

@media (max-width: 750px) {
  :root {
    --header-height: calc(var(--logo-height) + var(--header-padding-top) * 2);
    --site-margin: 32px;
    --section-padding: 32px;
    --title-font-size: 11.5vw;
    --subtitle-font-size: max(1.4rem, 3.5vw);
    --h3-font-size: 2.2rem;
    --h4-font-size: 1.3rem;
    --h5-font-size: 1rem;
    --p-font-size: 0.95rem;
  }

  /* Header - Mobile */
  header {
    position: static;
    background: unset;
  }

  header .logo {
    position: static;
    padding: var(--header-padding-top) 0;
  }

  header::after {
    display: none;
  }

  .block {
    width: 100%;
    margin: 5em 0;
  }

  /* Hero - Mobile */
  #hero {
    flex-direction: column;
    align-items: center;
    min-height: calc(760px - var(--header-height));
    height: calc(100vh - var(--header-height));
    max-height: unset;
  }

  #hero h1 {
    position: static;
    line-height: 1.1;
  }

  #hero h1 span {
    font-size: 110%;
  }

  #hero p {
    margin: 1.5em 0 2em;
  }

  #hero_content {
    flex: unset;
    display: flex;
    flex-direction: column;
    gap: unset;
    width: 100%;
    margin: 0;
  }

  #hero button {
    position: relative;
    z-index: 10;
    min-width: unset;
    width: 75%;
  }

  #hero_image {
    display: none;
  }

  #hero_image--mobile {
    display: block;
    position: absolute;
    bottom: 0;
    right: 16px;
    height: 350px;
  }

  /* How It Works - Mobile */
  #how-it-works_steps {
    flex-direction: column;
  }

  #how-it-works_steps .step {
    display: flex;
    flex-direction: column;
    width: 47%;
    margin-bottom: -8em;
  }

  #how-it-works_steps .step:nth-of-type(even) {
    align-self: end;
    margin: 0;
    margin-bottom: -4em;
  }

  #how-it-works_steps h4 {
    margin-top: 1em;
  }

  #how-it-works_steps .steps_icon {
    height: 125px;
  }

  /* FAQ - Mobile */
  #frequently-asked-questions h3.heading {
    flex-basis: 100%;
    padding: 0;
  }

  #frequently-asked-questions .faq-content {
    margin-left: 40px;
  }

  #frequently-asked-questions_contact-us {
    margin-top: 1.5em;
  }

  /* Join Waitlist - Mobile */
  #join-the-waitlist p {
    width: 100%;
    margin: 32px 0 64px;
    text-align: center;
    font-size: inherit;
  }

  #join-the-waitlist form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 24px;
    column-gap: 16px;
    width: 100%;
    margin: 0 auto;
  }

  #join-the-waitlist form > div {
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    width: 100%;
  }

  #join-the-waitlist form > div:nth-of-type(1) {
    grid-column: 1;
  }

  #join-the-waitlist form > div:nth-of-type(2) {
    grid-column: 2;
  }

  #join-the-waitlist form input,
  #join-the-waitlist form select,
  #join-the-waitlist form .input-wrapper {
    appearance: none;
    border: none;
    border-radius: var(--border-radius);
    background-color: Field;
    padding: 10px 24px;
    margin-top: 4px;
    outline: none;
    box-shadow: none;
    font-size: var(--p-font-size);
  }

  #join-the-waitlist form .input-wrapper {
    display: flex;
    align-items: baseline;
    padding-top: 0;
    padding-bottom: 0;
  }

  #join-the-waitlist form .input-wrapper > input {
    flex: 1;
    padding-left: 8px;
  }

  #join-the-waitlist form .phone-prefix {
    font-size: inherit;
    color: #666;
    user-select: none;
  }

  #join-the-waitlist form button {
    grid-column: 1 / -1;
    width: 100%;
    padding: 24px 0;
  }

  /* Footer - Mobile */
  footer {
    padding-top: 48px;
  }

  footer .logo {
    height: 55px;
  }
}

@media (min-width: 1751px) {
  .container {
    margin: 0 auto;
  }
}
