:root {
  --paper: #f6f3eb;
  --navy: #172945;
  --red: #ed492e;
  --line: #c9c1b4;
  --white: #fffdf7;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  color: var(--navy);
  background-color: var(--paper);
  background-image:
    radial-gradient(#17294514 0.7px, transparent 0.7px),
    linear-gradient(90deg, transparent 49.8%, #17294508 50%, transparent 50.2%);
  background-size: 9px 9px, 80px 80px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

.nav {
  width: min(1400px, calc(100% - 64px));
  margin: auto;
  min-height: 88px;
  border-bottom: 2px solid var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.wordmark {
  color: var(--navy);
  font-size: 1.3rem;
  font-weight: 950;
  text-decoration: none;
}

.nav span {
  color: var(--red);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .13em;
}

main, footer {
  width: min(1400px, calc(100% - 64px));
  margin-inline: auto;
}

.hero {
  min-height: 750px;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(400px, .84fr);
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
  padding: 76px 2vw 90px;
}

.eyebrow {
  color: var(--red);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .15em;
}

h1 {
  max-width: 820px;
  margin: 17px 0 22px;
  font-size: clamp(3.3rem, 6vw, 6.6rem);
  line-height: .91;
  letter-spacing: -.065em;
}

h1 em {
  color: var(--red);
  font-style: normal;
}

.lead {
  margin: 0 0 38px;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.45;
}

form {
  max-width: 800px;
  padding-top: 22px;
  border-top: 2px solid var(--navy);
}

.fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 13px;
  align-items: end;
}

.field label {
  display: block;
  margin-bottom: 9px;
  font-size: .92rem;
  font-weight: 850;
}

.field label b {
  color: var(--red);
  margin-right: 7px;
}

.combobox { position: relative; }

input {
  width: 100%;
  min-width: 0;
  border: 2px solid var(--navy);
  border-radius: 0;
  background: var(--white);
  color: var(--navy);
  padding: 15px 14px;
  outline: none;
}

input:focus {
  box-shadow: 4px 4px 0 var(--red);
}

input:disabled {
  opacity: .68;
  cursor: wait;
}

.results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 270px;
  overflow: auto;
  margin: 0;
  padding: 5px;
  border: 2px solid var(--navy);
  background: var(--white);
  list-style: none;
  box-shadow: 7px 7px 0 #17294522;
}

.results:empty { display: none; }

.results li {
  padding: 10px;
  cursor: pointer;
  line-height: 1.25;
}

.results li[aria-selected="true"],
.results li:hover {
  color: var(--white);
  background: var(--navy);
}

.results small {
  display: block;
  margin-top: 3px;
  opacity: .75;
}

.swap {
  height: 53px;
  border: 0;
  color: var(--red);
  background: transparent;
  font-size: 1.7rem;
  cursor: pointer;
}

.swap:disabled {
  opacity: .45;
  cursor: wait;
}

.help {
  min-height: 20px;
  margin: 9px 0 15px;
  color: #526078;
  font-size: .8rem;
}

.primary, .secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--navy);
  padding: 15px 22px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.primary {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
  box-shadow: 5px 5px 0 var(--navy);
}

.primary:hover { transform: translate(-1px, -1px); }

.primary:disabled {
  opacity: .55;
  cursor: wait;
  transform: none;
}

.secondary {
  color: var(--navy);
  background: var(--paper);
}

.status {
  min-height: 28px;
  margin-top: 17px;
  font-weight: 750;
}

.status.loading::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 9px;
  border: 3px solid #ed492e44;
  border-top-color: var(--red);
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin .8s linear infinite;
}

.preview-column { min-width: 0; }

.example-poster {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 500px;
  margin: auto;
  overflow: hidden;
  border: 3px solid var(--navy);
  padding: 30px;
  background: #eee7d7;
  box-shadow: 16px 18px 0 var(--navy);
  transform: rotate(2.3deg);
}

.example-poster.poster-ready {
  padding: 0;
  aspect-ratio: 4 / 5;
}

.example-label {
  color: var(--red);
  font-size: .67rem;
  font-weight: 950;
  letter-spacing: .14em;
}

.example-poster h2 {
  max-width: 390px;
  margin: 13px 0;
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  line-height: .95;
  letter-spacing: -.045em;
}

.example-poster h2 strong {
  display: block;
  color: var(--red);
  font-size: 1.42em;
}

.city-art {
  position: relative;
  height: 48%;
  overflow: hidden;
  border: 2px solid var(--navy);
  background:
    linear-gradient(155deg, transparent 48%, #ed492e 49% 52%, transparent 53%),
    linear-gradient(#9bc1c9 0 48%, #dfc989 49%);
}

.sun {
  position: absolute;
  top: 12%;
  right: 12%;
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red);
}

.la, .bg {
  position: absolute;
  bottom: 0;
  color: var(--navy);
  font-size: 4rem;
  font-weight: 950;
  line-height: .8;
}

.la { left: 3%; }
.bg { right: 3%; }

.route {
  position: absolute;
  z-index: 2;
  top: 46%;
  left: 15%;
  right: 15%;
  color: var(--red);
  text-align: center;
  font-size: 2.2rem;
}

.route b {
  display: block;
  font-size: .75rem;
}

.city-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  font-size: 1.05rem;
  font-weight: 950;
}

.example-poster > p {
  position: absolute;
  bottom: 14px;
  font-size: .61rem;
  font-weight: 900;
}

.actions {
  justify-content: center;
  gap: 12px;
  margin-top: 42px;
}

.actions:not([hidden]) { display: flex; }

.actions .small { padding: 12px 18px; }

.preview-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 2px solid var(--navy);
}

.steps div {
  display: flex;
  gap: 20px;
  padding: 28px;
  border-right: 1px solid var(--line);
  font-weight: 850;
}

.steps div:last-child { border: 0; }
.steps b { color: var(--red); }

.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
  padding: 65px 0;
}

.notes h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.notes p {
  margin: 0;
  color: #43516a;
  line-height: 1.6;
}

.notes a {
  color: var(--navy);
  font-weight: 800;
}

footer {
  display: grid;
  grid-template-columns: .5fr 1.5fr;
  gap: 40px;
  padding: 40px 0 65px;
  border-top: 2px solid var(--navy);
}

footer p {
  max-width: 850px;
  margin: 0;
  line-height: 1.55;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-inline: 0;
  }

  .preview-column { grid-row: 2; }
  .example-poster { max-width: 430px; }
}

@media (max-width: 620px) {
  .nav, main, footer { width: min(100% - 32px, 1400px); }
  .nav { min-height: 70px; }
  .nav span { max-width: 120px; text-align: right; }
  .hero { padding: 48px 0 70px; gap: 60px; }
  h1 { font-size: clamp(3rem, 15vw, 4.6rem); }

  .fields { grid-template-columns: 1fr; }
  .swap { height: 28px; transform: rotate(90deg); }
  .primary { width: 100%; }

  .example-poster {
    width: calc(100% - 20px);
    padding: 20px;
    box-shadow: 10px 11px 0 var(--navy);
  }

  .example-poster.poster-ready { padding: 0; }

  .steps, .notes, footer { grid-template-columns: 1fr; }
  .steps div { border-right: 0; border-bottom: 1px solid var(--line); }
  .notes { gap: 30px; }
  .actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}

.preview-caption { text-align: center; margin: 35px 0 0; font-size: .65rem; font-weight: 800; letter-spacing: .06em; color: #526078; }
.example-poster.generated { padding: 0; }
.example-poster.generated .preview-image { height: auto; }
