/* Base */
html,
body {
  height: 100%;
  overflow: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, sans-serif;
}

/* Background */
.page {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #f4b400 0%, #fff9d6 100%);
  color: #240a46;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.header {
  flex-shrink: 0;
  padding-top: 22px;
  padding-bottom: 12px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.header .container {
  max-width: 1280px;
  padding-left: 40px;
  padding-right: 40px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.main {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}

/* Logo */
.logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  user-select: none;
}

.logo-main {
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.logo-img {
  display: block;
  height: 40px;
  width: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding-left: 18px;
  padding-right: 18px;
  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 140ms ease, transform 80ms ease, opacity 140ms
    ease;
}

.btn-outline {
  border: 1px solid #240a46;
  color: #240a46;
  background: transparent;
}

.btn-outline:hover {
  background: rgba(0, 0, 0, 0.08);
}

.btn-solid {
  background: #ffffff;
  color: #240a46;
}

.btn-solid:hover {
  background: rgba(255, 255, 255, 0.85);
}

.btn:active {
  transform: translateY(1px);
}

button.btn {
  border: none;
  cursor: pointer;
  font: inherit;
}

button.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.hero-cta {
  height: 44px;
  padding-left: 22px;
  padding-right: 22px;
  width: 50%;
  max-width: 210px;
}

.focus-visible-ring:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.35);
}

/* Hero */
.hero {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1280px;
  min-height: 0;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
  padding-bottom: 0;
}

.hero-grid {
  flex: 1 1 0%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-rows: 1fr;
  align-items: stretch;
  gap: 24px;
  width: 100%;
  min-height: 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 26px;
  align-self: center;
  min-height: 0;
}

.hero-title {
  font-size: 44px;
  line-height: 1.05;
  font-weight: 700;
  margin: 0;
}

.hero-subtitle {
  margin: 0;
  max-width: 420px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(36, 10, 70, 0.9);
}

.hero-art-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: 100%;
  min-height: 0;
  align-self: stretch;
}

.hero-art {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: min(100%, 820px);
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: transparent;
}

.hero-art-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: bottom right;
  flex-shrink: 1;
  transform: none;
}

@media (max-width: 1000px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow: auto;
  }

  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: #f4b400;
    padding-top: calc(22px + env(safe-area-inset-top, 0px));
  }

  .page {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    max-height: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
  }

  .main {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: visible;
    /* Offset for fixed header (~74px) + notch safe area */
    padding-top: calc(74px + env(safe-area-inset-top, 0px));
  }

  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }

  .header-actions {
    width: auto;
    justify-content: flex-end;
  }

  .header .container {
    padding-left: 32px;
    padding-right: 32px;
  }

  .hero {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-width: 1040px;
    padding-left: 32px;
    padding-right: 32px;
    padding-top: 36px;
    padding-bottom: 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    flex: 1 1 0%;
    min-height: 0;
    gap: 42px;
  }

  .hero-copy {
    align-self: center;
    align-items: center;
    text-align: center;
    gap: 28px;
    padding-top: 40px;
  }

  .hero-art-wrap {
    align-items: flex-end;
    justify-content: center;
    min-height: 0;
    align-self: stretch;
  }

  .hero-art {
    width: min(100%, 520px);
  }

  .hero-art-img {
    object-position: bottom center;
  }

  .hero-subtitle {
    max-width: 620px;
    font-size: 15px;
    font-weight: 500;
  }

  .hero-cta {
    width: auto;
    min-width: 180px;
  }

  .hero-title {
    font-size: clamp(19px, 6.8vw, 36px);
  }
}

@media (max-width: 420px) {
  .header .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 0;
  }

  .hero-art {
    width: min(100%, 380px);
  }

  .hero-subtitle {
    font-size: 15px;
    line-height: 1.5;
  }

  .hero-title {
    font-size: clamp(20px, 7.2vw, 34px);
  }
}

/* Contact dialog */
.contact-dialog {
  border: none;
  padding: 0;
  max-width: calc(100vw - 32px);
  width: min(440px, 100%);
  background: transparent;
  color: #240a46;
}

.contact-dialog::backdrop {
  background: rgba(36, 10, 70, 0.45);
}

.contact-dialog__panel {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 28px 24px 22px;
  box-shadow: 0 20px 50px rgba(36, 10, 70, 0.2);
}

.contact-dialog__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 9999px;
  background: rgba(36, 10, 70, 0.06);
  color: #240a46;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 140ms ease, transform 80ms ease;
}

.contact-dialog__close:hover {
  background: rgba(36, 10, 70, 0.12);
}

.contact-dialog__close:active {
  transform: translateY(1px);
}

.contact-dialog__title {
  margin: 0 40px 10px 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: #240a46;
}

.contact-dialog__subtitle {
  margin: 0 0 20px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(36, 10, 70, 0.85);
}

.contact-dialog__success {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  color: #0d4d2d;
  background: rgba(34, 160, 90, 0.15);
}

.contact-dialog__form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-dialog__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #240a46;
}

.contact-dialog__input {
  width: 100%;
  height: 46px;
  margin-top: 2px;
  padding: 0 14px;
  border: 2px solid rgba(36, 10, 70, 0.2);
  border-radius: 12px;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: #240a46;
  background: #fffef8;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.contact-dialog__input::placeholder {
  color: rgba(36, 10, 70, 0.35);
}

.contact-dialog__input:hover {
  border-color: rgba(36, 10, 70, 0.35);
}

.contact-dialog__input:focus {
  outline: none;
  border-color: #240a46;
  box-shadow: 0 0 0 3px rgba(36, 10, 70, 0.2);
}

.contact-dialog__input[aria-invalid="true"] {
  border-color: #b42318;
}

.contact-dialog__error {
  min-height: 1.25rem;
  margin: 4px 0 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #b42318;
}

.contact-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.contact-dialog__submit {
  min-width: 112px;
}

.contact-dialog__submit .contact-dialog__submit-loading {
  display: none;
}

.contact-dialog__submit.is-loading .contact-dialog__submit-label {
  display: none;
}

.contact-dialog__submit.is-loading .contact-dialog__submit-loading {
  display: inline;
}

html.dialog-open,
html.dialog-open body {
  overflow: hidden;
}

