/* Eternus public inquiry form — standalone skin.
   Ported from the app's design tokens (packages/core/src/index.css +
   tenants/eternus/customer.config.json) so this page and the admin app stay
   visually the same product. Values are inlined on purpose: no build step,
   no Tailwind, nothing to install. */

:root {
  --c-primary: #c2a984;
  --c-primary-light: #d6c6a4;
  --c-primary-dark: #9c8460;
  --c-on-primary: #080c14;
  --c-background: #080c14;
  --c-surface: #11161f;
  --c-text: #f3eeeb;
  --c-text-muted: #c9c0bc;
  --c-border: #1c2330;
  --c-danger: #b5897e;
  --c-warning: #b3a283;

  --font-body: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-heading: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--c-background);
  color: var(--c-text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

/* ── Hero ──────────────────────────────────────────────────────────────
   The photo (2000×1333) is ~70% empty sky; the couple stands between 72%
   and 97% of its height, faces at ~72%. Desktop is an aspect ratio, not a
   fixed height: with cover, a fixed band shows a smaller slice of the image
   as the viewport widens, so only a ratio keeps the band at 24% of the photo
   — bottom-anchored, that is 76%→100%, below the faces at every width.
   Mobile shows nearly the whole frame. */
.hero {
  width: 100%;
  height: 16rem;
  background-image: url('assets/hero.jpg');
  background-size: cover;
  background-position: 50% 96%;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem 2.5rem;
}

.card {
  position: relative;
  margin-top: -1.5rem;
  border: 1px solid var(--c-border);
  border-radius: 1rem;
  background-color: var(--c-surface);
  padding: 1.5rem 1.25rem;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.55);
}

.card__logo {
  width: 3rem;
  height: 3rem;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--c-border);
  border-radius: 9999px;
  background-color: rgb(8 12 20 / 0.6);
}

/* Phones: the header is pure preamble, so it stays compact — every line it
   takes is a line of form pushed below the fold. */
.card__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.375;
  letter-spacing: -0.01em;
}

.card__intro {
  margin: 0.5rem 0 0;
  max-width: 48rem;
  font-size: 0.875rem;
  line-height: 1.375;
  color: var(--c-text-muted);
}

.lang-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--c-border);
  border-radius: 0.5rem;
  background-color: rgb(8 12 20 / 0.5);
  backdrop-filter: blur(8px);
  color: var(--c-text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.lang-toggle:hover {
  border-color: color-mix(in srgb, var(--c-primary) 40%, transparent);
  color: var(--c-primary-light);
}

.notice {
  margin-top: 1.25rem;
  padding: 0.5rem 1rem;
  border: 1px solid color-mix(in srgb, var(--c-warning) 40%, transparent);
  border-radius: 0.5rem;
  background-color: color-mix(in srgb, var(--c-warning) 10%, transparent);
  color: var(--c-warning);
  font-size: 0.875rem;
}

/* ── Form grid ─────────────────────────────────────────────────────── */
.form {
  display: grid;
  gap: 1.25rem 2rem;
  margin-top: 1.5rem;
}

.field--wide {
  grid-column: 1 / -1;
}

/* The app-wide .form-field-label is 10px uppercase — right for dense admin
   modals, unreadable on a public form. Overridden here, as InquiryPage did. */
.field__label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text-muted);
}

.field__req {
  color: var(--c-danger);
  transition: color 0.2s ease;
}

.field[data-satisfied] .field__req {
  color: color-mix(in srgb, var(--c-text-muted) 50%, transparent);
}

.field__error {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--c-danger);
}

.field__error:empty {
  display: none;
}

/* ── Info tip ──────────────────────────────────────────────────────────
   The app's InfoTip: an “i” beside the label that reveals a one-line
   explanation on hover or focus. The bubble is a pseudo-element, so there is
   no positioning code — it is anchored to the icon's left edge, which is also
   why it can never run off the side of a phone. */
.field__info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin: 0 0.375rem;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: none;
  color: color-mix(in srgb, var(--c-text-muted) 70%, transparent);
  vertical-align: middle;
  cursor: help;
  transition: color 0.2s ease;
}

.field__info:hover,
.field__info:focus-visible {
  color: var(--c-text);
}

.field__info:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-primary) 50%, transparent);
}

.field__info::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: -0.5rem;
  z-index: 60;
  width: max-content;
  max-width: 16rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  background-color: var(--c-text);
  color: var(--c-background);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
  text-align: left;
  white-space: normal;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

/* The arrow, pointing down at the icon. */
.field__info::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 0.25rem;
  z-index: 60;
  border: 4px solid transparent;
  border-top-color: var(--c-text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

/* Delayed on the way in, immediate on the way out — the app's 300 ms. */
.field__info:hover::after,
.field__info:hover::before,
.field__info:focus::after,
.field__info:focus::before {
  opacity: 1;
  transition-delay: 0.3s;
}

/* ── Controls ──────────────────────────────────────────────────────── */
.control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--c-border);
  border-radius: 0.5rem;
  background-color: var(--c-background);
  color: var(--c-text);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.control::placeholder {
  color: color-mix(in srgb, var(--c-text-muted) 60%, transparent);
}

.control:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--c-primary) 40%, transparent);
}

.control:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--c-primary) 40%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-primary) 20%, transparent);
}

.control:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

textarea.control {
  resize: vertical;
  min-height: 5.5rem;
}

/* ── Select ────────────────────────────────────────────────────────────
   A button plus a panel, not a native <select>: the answer lives in a hidden
   input, so what Zoho receives is unchanged. Ported from the app's SelectMenu
   — same trigger, same panel, same search affordance on long lists. */
.select {
  position: relative;
}

.select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2.375rem;
  text-align: left;
  cursor: pointer;
}

.select__trigger:disabled {
  cursor: not-allowed;
}

.select__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select__value[data-placeholder] {
  color: color-mix(in srgb, var(--c-text-muted) 60%, transparent);
}

.select__chevron {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  background-color: var(--c-text-muted);
  transition: transform 0.2s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.select__trigger[aria-expanded='true'] .select__chevron {
  transform: rotate(180deg);
}

.panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  border: 1px solid color-mix(in srgb, var(--c-border) 60%, transparent);
  border-radius: 0.75rem;
  background-color: color-mix(in srgb, var(--c-surface) 95%, transparent);
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.45);
  backdrop-filter: blur(16px);
  transform-origin: top left;
  animation: scale-in 0.2s ease-out both;
}

/* Flipped up when the field sits too close to the bottom of the viewport. */
.panel--up {
  top: auto;
  bottom: calc(100% + 4px);
  transform-origin: bottom left;
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel {
    animation: none;
  }
}

.select__panel {
  min-width: 100%;
  padding: 0.25rem 0;
}

.select__search {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--c-border) 50%, transparent);
  background-color: color-mix(in srgb, var(--c-surface) 95%, transparent);
  backdrop-filter: blur(16px);
}

.select__search .control {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.select__list {
  max-height: 18rem;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.select__option {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--c-text);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.select__option[data-active] {
  background-color: color-mix(in srgb, var(--c-primary) 10%, transparent);
}

.select__option[aria-selected='true'] {
  color: var(--c-primary);
  font-weight: 500;
}

.select__empty {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--c-text-muted);
}

/* ── Date field ────────────────────────────────────────────────────────
   Same shape as the app's DateField: calendar button, value button, popover
   month grid. A native date input was the one control on this page that
   looked like a browser default instead of Eternus. */
.date {
  position: relative;
}

.control.date__shell {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  min-height: 2.375rem;
  padding: 0;
}

.control.date__shell:focus-within {
  border-color: color-mix(in srgb, var(--c-primary) 40%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-primary) 20%, transparent);
}

.date__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 0 0.625rem;
  border: 0;
  border-right: 1px solid color-mix(in srgb, var(--c-border) 50%, transparent);
  background: none;
  color: var(--c-primary);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.date__icon:hover {
  background-color: color-mix(in srgb, var(--c-primary) 10%, transparent);
}

.date__value {
  flex: 1;
  min-width: 0;
  padding: 0.375rem 0.75rem;
  border: 0;
  background: none;
  color: var(--c-text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}

.date__value[data-filled] {
  color: var(--c-text);
}

.date__panel {
  width: 18rem;
  padding: 0.5rem;
}

.date__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.date__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  color: var(--c-primary);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.date__arrow:hover:not(:disabled) {
  background-color: color-mix(in srgb, var(--c-primary) 15%, transparent);
}

.date__arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.date__captions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.date__caption {
  appearance: none;
  padding: 0.25rem 1.25rem 0.25rem 0.5rem;
  border: 1px solid var(--c-border);
  border-radius: 0.375rem;
  background-color: var(--c-background);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9c0bc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.3rem center;
  background-size: 0.7rem;
  color: var(--c-text);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.date__caption option {
  background-color: var(--c-surface);
  color: var(--c-text);
}

.date__caption:focus {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-primary) 25%, transparent);
}

.date__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.date__weekday {
  padding-bottom: 0.25rem;
  color: color-mix(in srgb, var(--c-text-muted) 60%, transparent);
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
}

.date__day {
  height: 2rem;
  border: 0;
  border-radius: 0.375rem;
  background: none;
  color: var(--c-text);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.date__day:hover:not(:disabled) {
  background-color: color-mix(in srgb, var(--c-primary) 10%, transparent);
}

.date__day:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.date__day--today {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-primary) 45%, transparent);
  color: var(--c-primary);
  font-weight: 700;
}

.date__day--selected {
  background-color: color-mix(in srgb, var(--c-primary) 20%, transparent);
  color: var(--c-primary);
  font-weight: 600;
}

.date__day--empty {
  visibility: hidden;
}

.phone {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.phone__country {
  width: 8rem;
  flex-shrink: 0;
}

/* A required field still unanswered — a tinted edge, not a message. Focus
   keeps its own colour: being in the field is not the moment to be told it
   is empty. */
.field:not([data-satisfied]) .control {
  border-color: color-mix(in srgb, var(--c-danger) 32%, transparent);
}

.field:not([data-satisfied]) .control:focus,
.field:not([data-satisfied]) .control:focus-within {
  border-color: color-mix(in srgb, var(--c-primary) 40%, transparent);
}

/* Honeypot — in the DOM, never on screen. */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Submit ────────────────────────────────────────────────────────── */
.submit {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0.875rem 1rem;
  border: 0;
  border-radius: 0.5rem;
  background-color: var(--c-primary);
  color: var(--c-on-primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 2px 6px color-mix(in srgb, var(--c-primary) 30%, transparent),
    inset 0 1px 0 rgb(255 255 255 / 0.15);
}

.submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.14) 0%, transparent 50%);
  pointer-events: none;
}

/* A light sweeps across the button once on hover-enter. */
.submit::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 35%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.3), transparent);
  transform: translateX(-250%) skewX(-18deg);
  pointer-events: none;
}

.submit:hover:not(:disabled)::before {
  animation: btn-shine 0.7s var(--ease-out);
}

@keyframes btn-shine {
  to {
    transform: translateX(400%) skewX(-18deg);
  }
}

.submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 6px 16px -2px color-mix(in srgb, var(--c-primary) 40%, transparent),
    0 0 0 1px var(--c-primary-dark),
    inset 0 1px 0 rgb(255 255 255 / 0.2);
}

.submit:active:not(:disabled) {
  transform: scale(0.97) translateY(0);
  transition-duration: 0.1s;
}

.submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Thank-you ─────────────────────────────────────────────────────── */
.thanks {
  padding: 1.5rem 0;
}

.thanks__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: 0.025em;
}

.thanks__body {
  margin: 0.75rem 0 0;
  max-width: 32rem;
  color: var(--c-text-muted);
}

[hidden] {
  display: none !important;
}

@media (min-width: 640px) {
  .hero {
    height: 20rem;
  }

  .wrap {
    padding: 0 1.5rem 2.5rem;
  }

  .card {
    padding: 2.5rem 3rem;
  }

  .card__logo {
    width: 3.5rem;
    height: 3.5rem;
    padding: 0.625rem;
  }

  .card__title {
    font-size: 1.875rem;
  }

  .card__intro {
    font-size: 1rem;
  }

  .form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .hero {
    aspect-ratio: 25 / 4;
    height: auto;
    background-position: bottom;
  }

  /* The deep hero overlap only kicks in here — below this it swallows most
     of the hero. */
  .card {
    margin-top: -10rem;
  }

  .card__title {
    font-size: 2.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .submit,
  .submit:hover:not(:disabled) {
    transform: none;
    transition: none;
  }

  .submit:hover:not(:disabled)::before {
    animation: none;
  }
}
