:root {
  --yellow: #ffc72c;
  --green: #0d4a3a;
  --green-deep: #093529;
  --red: #d9203f;
  --pink: #ff8fb8;
  --blue: #2b62c9;
  --ink: #10271f;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --display: "Chango", "Arial Black", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--yellow);
  color: var(--ink);
  font: 1.0625rem/1.5 "Bricolage Grotesque", system-ui, sans-serif;
}
h1, h2, h3, p { margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.1; }
input, textarea, button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.button {
  display: inline-block;
  padding: .7rem 1.3rem;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}
.button:hover { background: #b31430; }
.button:disabled { opacity: .6; cursor: wait; }

label { display: grid; gap: .25rem; font-size: .9rem; font-weight: 600; }
input, textarea {
  width: 100%;
  padding: .6rem .8rem;
  border: 2px solid var(--green);
  border-radius: .6rem;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}

/* Header */
.bar {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: .8rem var(--gutter);
  background: var(--yellow);
}
.brand { font-family: var(--display); font-size: clamp(1rem, 4vw, 1.35rem); line-height: 1.1; color: var(--red); text-decoration: none; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--gutter) clamp(2.5rem, 5vw, 4.5rem);
}
h1 { font-size: clamp(2.5rem, 5.6vw, 5.25rem); line-height: 1; color: var(--green); }
.hero p { max-width: 34ch; margin: 1.4rem 0 1.8rem; font-size: 1.25rem; }
.plane { width: 100%; height: auto; overflow: visible; animation: sway 7s ease-in-out infinite alternate; }
@keyframes sway { from { transform: translateY(-6px) rotate(-3deg); } to { transform: translateY(8px) rotate(0deg); } }

/* Bandeirinhas */
.flags {
  height: 58px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 3px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='224' height='48'%3E%3Cpath d='M6 0h44v46L28 30 6 46z' fill='%23d9203f'/%3E%3Cpath d='M62 0h44v46L84 30 62 46z' fill='%23fff'/%3E%3Cpath d='M118 0h44v46l-22-16-22 16z' fill='%232b62c9'/%3E%3Cpath d='M174 0h44v46l-22-16-22 16z' fill='%23ff8fb8'/%3E%3C/svg%3E") 0 2px repeat-x,
    var(--green);
}

/* Suggestion form, shaped like a boarding pass */
.terminal { padding: 2.5rem var(--gutter) 5rem; background: var(--green); color: #fff; }
.terminal h2 { color: var(--yellow); }
.lead { max-width: 52ch; margin: .8rem 0 2rem; font-size: 1.15rem; }
.ticket {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
  max-width: 72rem;
  border-radius: 1.1rem;
  background: #fff;
  color: var(--ink);
  overflow: hidden;
}
.ticket-main, .ticket-stub { display: grid; align-content: start; gap: 1.2rem; padding: clamp(1.2rem, 3vw, 2rem); }
.ticket-stub { border-left: 3px dashed var(--green); background: var(--pink); }
.route { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
textarea { display: block; resize: vertical; }
::placeholder { color: #61756d; opacity: 1; }
fieldset { display: grid; gap: .5rem; min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: .25rem; padding: 0; font-size: .9rem; font-weight: 600; }
.hint { font-size: .95rem; line-height: 1.4; }
.ticket-send {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem 1.2rem;
  padding: 1.2rem clamp(1.2rem, 3vw, 2rem);
  border-top: 3px dashed var(--green);
}
.error { flex: 1 1 16rem; color: #b31430; font-weight: 600; overflow-wrap: anywhere; }
.error:empty { display: none; }
.trap { position: absolute; left: -999rem; }
.done { max-width: 40rem; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 1.1rem; background: #fff; color: var(--ink); }
.done:focus { outline: none; }
.done h3 { font-size: 1.6rem; line-height: 1.1; color: var(--red); }
.done p { margin: .8rem 0 1.4rem; }

footer { padding: 2rem var(--gutter) 2.5rem; background: var(--green-deep); color: #fff; }

@media (max-width: 900px) {
  .hero, .ticket { grid-template-columns: minmax(0, 1fr); }
  .ticket-stub { border-left: 0; border-top: 3px dashed var(--green); }
}
@media (max-width: 520px) {
  .route { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plane { animation: none; }
}
