/* ============================================================
   Flights to the wedding — styled to match eceyouri.love:
   soft cream ground, washed pastel fills, gold hairlines and
   gold text accents, italic serif + geometric sans.

   Pastels are fills only. Anything that has to be read uses
   --ink, --ink-soft or --gold-deep; --gold is for rules,
   borders and marks.
   ============================================================ */

:root {
  --parchment: #f7efdf;
  --parchment-deep: #f0e5d2;
  --card: #fffcf8;
  --ink: #3a332c;
  --ink-soft: #746a60;

  --mint: #a9d5cd;
  --blush: #f0c3c8;
  --lilac: #cfc2e6;

  --gold: #c9a24e;
  --gold-deep: #856728;
  --gold-pale: rgba(201, 162, 78, 0.55);

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', -apple-system, BlinkMacSystemFont, sans-serif;

  --direct: #4a7d63;
  --stop: #a8763a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.55;
  background:
    radial-gradient(ellipse 700px 420px at 85% -5%, rgba(169,213,205,0.10), transparent 60%),
    radial-gradient(ellipse 600px 500px at 8% 12%, rgba(201,162,78,0.12), transparent 55%),
    var(--parchment);
  /* kills the double-tap-to-zoom delay; pinch-zoom is off via the
     viewport meta, which together keep the form steady on a phone */
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

/* ---------- language switch (centred, as on the main site) ---------- */

.lang-switch {
  /* absolute, not fixed: this page scrolls straight into a form, and a
     pinned pill would sit on top of the fields */
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-deep);
  background: rgba(247, 239, 223, 0.92);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 7px 16px;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-switch:hover,
.lang-switch:focus-visible {
  background: var(--gold-deep);
  color: var(--parchment);
}

/* ---------- header ---------- */

header {
  padding: 84px 24px 8px;
  text-align: center;
}

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 14px;
}

header h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.1;
  margin: 0;
  color: var(--ink);
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 22px auto 20px;
  max-width: 320px;
}

.divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-pale), transparent);
}

.divider .dots { display: flex; gap: 7px; }

.divider .dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blush);
}
.divider .dots i:nth-child(2) { background: var(--gold); }
.divider .dots i:nth-child(3) { background: var(--lilac); }

.subtitle {
  margin: 0.3rem 0;
  color: var(--ink-soft);
  font-size: 14.5px;
}

.subtitle strong { color: var(--ink); font-weight: 500; }

.mock-banner {
  background: rgba(246, 210, 176, 0.5);
  border-bottom: 1px solid var(--gold-pale);
  color: var(--gold-deep);
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 13px;
}

/* ---------- form ---------- */

main {
  max-width: 660px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 40px) 4rem;
}

form {
  background: var(--card);
  border: 1px solid var(--gold-pale);
  border-radius: 10px;
  padding: clamp(20px, 4vw, 32px);
  margin-top: 28px;
}

.field { margin-bottom: 1.4rem; position: relative; }
fieldset.field { border: none; padding: 0; margin: 0 0 1.4rem; }

label,
legend {
  display: block;
  padding: 0;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

input[type="text"],
input[type="date"] {
  width: 100%;
  /* without this a date input keeps its intrinsic width and pushes its
     sibling out of the row on a narrow screen */
  min-width: 0;
  max-width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid rgba(58,51,44,0.18);
  border-radius: 6px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* iOS renders date inputs as a centred pill unless normalised */
input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  text-align: left;
  height: 46px;
}

input:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 2px 0 0 var(--gold);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin-bottom: 0;
  cursor: pointer;
}
.checkbox input {
  width: auto;
  margin: 0;
  accent-color: var(--gold-deep);
  width: 17px;
  height: 17px;
}

/* ---------- travelers stepper ---------- */

.stepper {
  display: inline-flex;
  align-items: center;
  background: var(--card);
  border: 1px solid rgba(58,51,44,0.18);
  border-radius: 6px;
  overflow: hidden;
}

.stepper button {
  width: 46px;
  height: 46px;
  border: none;
  background: transparent;
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1;
  color: var(--gold-deep);
  cursor: pointer;
  transition: background 0.2s ease;
}

.stepper button:hover:not(:disabled) { background: var(--parchment); }
.stepper button:disabled { color: rgba(58,51,44,0.25); cursor: default; }

.stepper span {
  min-width: 52px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* ---------- dates ---------- */

.exact-dates {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* min-width:0 lets the columns actually shrink; without it the two date
   inputs overflow their row and visually overlap on a phone */
.field-inline { flex: 1 1 0; min-width: 0; }

.field-inline label {
  font-size: 11.5px;
  letter-spacing: 0.14em;
}

/* ---------- origin suggestions ---------- */

.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--gold-pale);
  border-radius: 6px;
  margin-top: 4px;
  z-index: 10;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 6px 18px rgba(58,51,44,0.10);
}

.suggestion-item {
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  font-size: 15px;
}
.suggestion-item:hover { background: var(--parchment); }

/* ---------- submit ---------- */

button[type="submit"] {
  width: 100%;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--parchment);
  background: var(--gold-deep);
  border: none;
  border-radius: 999px;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
}

button[type="submit"]:hover,
button[type="submit"]:focus-visible { background: #6b521f; }
button[type="submit"]:active { transform: scale(0.985); }
button[type="submit"]:disabled { opacity: 0.55; cursor: default; transform: none; }

.status {
  text-align: center;
  color: var(--ink-soft);
  margin-top: 1.2rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
}

/* ---------- results ---------- */

#results-section { margin-top: 2.5rem; }

#results-section h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 30px;
  margin: 0 0 0.3rem;
  color: var(--ink);
}

.hint {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 1.2rem;
  max-width: 52ch;
}

.results { display: flex; flex-direction: column; gap: 0.9rem; }

.result-card {
  background: var(--card);
  border: 1px solid var(--gold-pale);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.journeys {
  flex: 1;
  min-width: 240px;
  display: flex;
  flex-direction: column;
}

.journey { padding: 0.5rem 0; }
.journey + .journey { border-top: 1px solid var(--gold-pale); }

.journey-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold-deep);
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.journey-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.endpoint .time {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.endpoint .code {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  font-weight: 500;
}
.endpoint-right { text-align: right; }

.journey-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.duration-pill {
  background: rgba(201,162,78,0.14);
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
  font-size: 12px;
  color: var(--gold-deep);
  font-weight: 500;
}

.journey-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-pale) 12%, var(--gold-pale) 88%, transparent);
}

.stops { font-size: 12px; font-weight: 500; letter-spacing: 0.04em; }
.stops.direct-text { color: var(--direct); }
.stops.stop-text { color: var(--stop); }

.result-price {
  text-align: right;
  white-space: nowrap;
}

.result-price .amount {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  color: var(--gold-deep);
  line-height: 1.1;
}

.result-price .airlines {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 0.15rem;
}

/* ---------- responsive ---------- */

@media (max-width: 560px) {
  header { padding-top: 76px; }

  /* stack the date fields rather than squeezing two native pickers
     into one row, where they crowd and clip on small screens */
  .exact-dates { flex-direction: column; gap: 0.9rem; }

  .result-card { align-items: flex-start; }
  .result-price { text-align: left; }
  .endpoint .time { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 0.01ms !important; }
}
