/* Flying Eagle Express. Colors are sampled from the logo. */
:root {
  --navy: #0a1f44;
  --navy-soft: #1c3460;
  --blue: #0f62c4;
  --blue-light: #8fc0f5;
  --red: #d9131b;
  --white: #fff;
  --mist: #edf1f7;
  --ink: #16233b;
  --ink-soft: #4a586f;
  --line: #bcc6d6;
  --error: #b70f16;
  --success: #0b6b3a;
  --slant: -12deg; /* the lean of the logo's lettering */
  --gutter: clamp(1rem, 4vw, 3rem);
  --display: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  --body: Barlow, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.on-navy :focus-visible { outline-color: var(--white); }

h1, h2, h3 {
  margin: 0;
  color: var(--navy);
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.005em;
}
h1 { font-size: clamp(2.9rem, 7.2vw, 5.75rem); }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.1; }
p { margin: 0; max-width: 62ch; }

.wrap { width: min(100%, 78rem); margin-inline: auto; padding-inline: var(--gutter); }
.lede { font-size: clamp(1.15rem, 2vw, 1.375rem); line-height: 1.45; color: var(--ink); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 30;
  padding: .75rem 1rem; background: var(--navy); color: var(--white);
}
.skip:focus { top: 1rem; color: var(--white); }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center;
  column-gap: 2rem; padding-block: .75rem;
}
.brand { display: block; flex: none; padding-block: .25rem; }
.brand img { width: 230px; height: auto; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--navy); font-weight: 600; text-decoration: none;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--blue); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--red); }
.header-phone {
  color: var(--navy);
  font: italic 800 1.3rem/1 var(--display);
  text-decoration: none; white-space: nowrap;
}
.header-phone:hover { color: var(--blue); }

/* Buttons lean with the logo. The slant lives on ::before so the text stays upright. */
.btn {
  position: relative; z-index: 0;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: .5rem 1.75rem;
  border: 0; background: none; color: var(--white);
  font: italic 800 1.3rem/1.1 var(--display);
  text-align: center; text-decoration: none; cursor: pointer;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--blue); transform: skewX(var(--slant));
  transition: background-color .15s;
}
.btn:hover { color: var(--white); }
.btn:hover::before { background: var(--navy); }
.btn:focus-visible { outline: none; }
.btn:focus-visible::before { outline: 3px solid var(--blue); outline-offset: 3px; }
.btn--outline { color: var(--navy); }
.btn--outline::before { background: transparent; border: 2px solid var(--navy); }
.btn--outline:hover::before { background: var(--navy); }
.btn--light { color: var(--navy); }
.btn--light::before { background: var(--white); }
.btn--light:hover { color: var(--white); }
.btn--light:hover::before { background: var(--blue); }
.btn--light:focus-visible::before { outline-color: var(--white); }
.btn[disabled] { cursor: progress; opacity: .7; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; margin-top: 2rem; padding-inline: .4rem; }

/* Home hero. The streaks carry on from the logo's own, out to the edge of the page. */
.hero { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(4rem, 7vw, 6rem); overflow: hidden; }
.hero .wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1rem, 3vw, 3rem); align-items: end;
}
.hero-copy { padding-bottom: clamp(3.5rem, 6vw, 5.5rem); }
.hero h1 span { display: block; }
.hero h1 .h1-sub { color: var(--blue); font-size: .62em; line-height: 1.1; margin-top: .2em; }
.hero .lede { margin-top: 1.25rem; }
.hero-mark { width: 100%; height: auto; }
.mark-wrap { position: relative; }
.streaks {
  position: absolute; right: 96%; bottom: 3%;
  width: 100vw; height: clamp(2.5rem, 5vw, 4.5rem);
  transform-origin: right center;
  animation: streak-in .9s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes streak-in { from { transform: scaleX(0); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .streaks { animation: none; }
  .btn::before { transition: none; }
}

/* Sections */
.band { padding-block: clamp(3.5rem, 7vw, 6rem); }
.band--slant {
  padding-top: calc(clamp(3.5rem, 7vw, 6rem) + 4vw);
  clip-path: polygon(0 4vw, 100% 0, 100% 100%, 0 100%);
  margin-top: -4vw;
  position: relative; z-index: 2;
}
.on-navy { background: var(--navy); color: #dfe7f3; }
.on-navy h2, .on-navy h3 { color: var(--white); }
.on-navy a:not(.btn) { color: var(--white); }

.paths { display: grid; grid-template-columns: 1fr 1fr; margin-top: clamp(2rem, 4vw, 3.5rem); }
.paths > div { padding-block: .25rem; padding-right: clamp(1.5rem, 5vw, 5rem); }
.paths > div + div {
  position: relative;
  padding-left: clamp(1.5rem, 5vw, 5rem); padding-right: 0;
}
.paths > div + div::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  border-left: 2px solid var(--blue-light); transform: skewX(var(--slant));
}
.paths p { margin-top: .75rem; }

.intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.intro p + p { margin-top: 1rem; }
.link-strong { display: inline-block; margin-top: 1.25rem; font-weight: 600; }

/* The phone number is the page's loudest type, because it is how people reach the company. */
.call-band { border-top: 1px solid var(--line); }
.call-band h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
.big-phone {
  display: inline-block; margin-top: .5rem;
  color: var(--navy);
  font: italic 800 clamp(2.5rem, 10.5vw, 7.5rem)/1.05 var(--display);
  text-decoration: none; white-space: nowrap;
}
.big-phone:hover { color: var(--blue); }
.speed-rule {
  display: block; width: min(100%, 24rem); height: 5px; margin-top: 1rem;
  background: var(--red); clip-path: polygon(0 45%, 100% 0, 100% 100%, 0 55%);
}

/* Inner pages */
.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head .lede { margin-top: 1rem; }

/* Application form */
.apply-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; padding-bottom: clamp(3rem, 7vw, 6rem); }
.aside-call { padding-top: 1rem; border-top: 4px solid var(--navy); position: sticky; top: 1.5rem; }
.aside-call a.phone { display: inline-block; margin: .35rem 0 .75rem; color: var(--navy); font: italic 800 1.9rem/1.1 var(--display); text-decoration: none; white-space: nowrap; }
.aside-call a.phone:hover { color: var(--blue); }

.notice { padding: 1rem 1.25rem; border-left: 5px solid var(--navy); background: var(--mist); }
.notice strong { display: block; color: var(--navy); }
.notice--error { border-left-color: var(--error); background: #fdeeee; }
.notice--error strong { color: var(--error); }
.notice--success { border-left-color: var(--success); background: #e9f6ef; }
.notice--success strong { color: var(--success); }
.notice ul { margin: .5rem 0 0; padding-left: 1.25rem; }
.notice a { font-weight: 600; }

form fieldset { margin: 2.25rem 0 0; padding: 0; border: 0; }
form legend { padding: 0; color: var(--navy); font: italic 800 1.65rem/1.1 var(--display); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.5rem; margin-top: 1rem; }
.field { min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label, .field .label { display: block; margin-bottom: .3rem; color: var(--navy); font-weight: 600; }
.req { color: var(--ink-soft); font-weight: 400; }
.hint { display: block; margin-bottom: .35rem; color: var(--ink-soft); font-size: .95rem; line-height: 1.35; }
input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%; min-height: 3rem; padding: .6rem .75rem;
  border: 1.5px solid #6c7a90; border-radius: 2px; background: var(--white);
  color: var(--ink); font: inherit;
}
textarea { min-height: 7rem; resize: vertical; }
input:focus-visible, textarea:focus-visible { outline-offset: 1px; border-color: var(--blue); }
[aria-invalid="true"] { border-color: var(--error) !important; }
.err { display: block; margin-top: .3rem; color: var(--error); font-weight: 600; font-size: .95rem; }
.err:empty { display: none; }

.choices { display: flex; flex-wrap: wrap; gap: .5rem 2rem; }
.choice { display: flex; align-items: flex-start; gap: .6rem; min-height: 44px; padding-block: .55rem; font-weight: 500; cursor: pointer; }
.choice input { flex: none; width: 1.3rem; height: 1.3rem; margin: .15rem 0 0; accent-color: var(--blue); }
.consent { margin-top: 2rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin-top: 1.5rem; padding-inline: .4rem; }
#form-result:not(:empty) { margin-top: 1.25rem; }
#form-errors { margin-bottom: 1rem; }

/* About */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .75rem 2rem; margin: 1.5rem 0 0; }
.facts dt { color: var(--navy); font-weight: 600; }
.facts dd { margin: 0; }
.facts-row { display: contents; }
.placeholder {
  padding: .75rem 1rem; border: 2px dashed var(--ink-soft);
  color: var(--ink-soft); background: var(--mist);
}
.placeholder + .placeholder { margin-top: .75rem; }
.about-logo { width: min(100%, 30rem); height: auto; }
.stack > * + * { margin-top: 1.25rem; }
.band--mist { background: var(--mist); }
.band--mist .placeholder { background: var(--white); }

/* Footer */
.site-footer { padding-block: 2.5rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; }
.footer-name { color: var(--white); font: italic 800 1.6rem/1.1 var(--display); }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-footer ul a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-phone { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.footer-copy { flex-basis: 100%; color: #b6c3d8; font-size: .95rem; }

/* Fixed call and apply bar on phones */
.call-bar { display: none; }

@media (max-width: 860px) {
  body { padding-bottom: 3.75rem; }
  .site-header .wrap { padding-block: .5rem 0; }
  .brand { width: 100%; }
  .brand img { width: 200px; }
  .site-nav { margin-left: 0; width: 100%; }
  .site-nav ul { justify-content: space-between; gap: 0 .75rem; }
  .site-nav a { font-size: 1rem; }
  .header-phone { display: none; }

  .hero { padding-bottom: 2.5rem; }
  .hero .wrap { grid-template-columns: 1fr; }
  .mark-wrap { order: -1; width: min(100%, 34rem); margin-inline: auto; }
  .hero-copy { padding-bottom: 0; }
  .streaks { display: none; }
  .band--slant { margin-top: 0; }
  .paths, .intro, .apply-layout { grid-template-columns: 1fr; }
  .paths > div { padding-right: 0; }
  .paths > div + div { margin-top: 2rem; padding: 2rem 0 0; border-top: 2px solid var(--blue-light); }
  .paths > div + div::before { display: none; }
  .aside-call { position: static; }

  .call-bar {
    position: fixed; inset: auto 0 0; z-index: 20;
    display: grid; grid-template-columns: 1fr 1fr;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--navy);
  }
  .call-bar a {
    display: flex; align-items: center; justify-content: center;
    min-height: 3.75rem; color: var(--white);
    font: italic 800 1.3rem/1 var(--display); text-decoration: none;
  }
  .call-bar a:first-child { background: var(--blue); }
  .call-bar a:focus-visible { outline: 3px solid var(--white); outline-offset: -6px; }
}
@media (max-width: 560px) {
  .fields { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: .1rem; }
  .facts dd { margin-bottom: .75rem; }
  .actions .btn { flex: 1 1 100%; }
  .big-phone { font-size: 11vw; }
}
