:root {
  color-scheme: light dark;

  --brand-primary: rgb(18 18 52);
  --light-primary: #fff;
  --dark-primary: #0d0d1f;
  --link-light: #4B4B77;
  --link-dark: #A4A4E5;
  --boarding-pass-border-color: rgb(18 18 52 / 25%);
  --boarding-pass-shadow-color: rgb(18 18 52 / 12%);
  --boarding-pass-border-width: 3px;
  --boarding-pass-shadow-width: calc(var(--boarding-pass-border-width) * -1);
  --light-gradient: linear-gradient(180deg, rgb(18 18 52 / 5%) 0%, transparent 35%);
  --dark-gradient: linear-gradient(180deg, rgb(100 100 180 / 8%) 0%, transparent 35%);
  --body-font:
    "Inter", -apple-system, blinkmacsystemfont, "avenir next", avenir, "segoe ui", "helvetica neue", "Adwaita Sans",
    cantarell, ubuntu, roboto, noto, helvetica, arial, sans-serif;
  --monospace-font: ui-monospace, "Cascadia Code", "Source Code Pro", menlo, consolas, "DejaVu Sans Mono", monospace;
}

@view-transition {
  navigation: auto;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  background: light-dark(var(--light-primary), var(--dark-primary));
  color: light-dark(var(--dark-primary), var(--light-primary));
  font-family: var(--body-font), sans-serif;
  font-size: 1.25rem;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  text-wrap: pretty;
}

img,
video {
  display: block;
  max-width: 100%;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.6;
  text-wrap: balance;
}

@media print {
  body {
    font-size: 8pt;
  }
}

a {
  color: light-dark(var(--link-light), var(--link-dark));
  text-underline-offset: 4px;

  :visited,
  :hover,
  :focus {
    text-decoration: none;
  }
}

select,
textarea,
input,
button {
  font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.15;
  font-weight: 700;
  margin-top: 2.3rem;
  margin-bottom: 0;
}

h1 {
  font-size: clamp(1.6rem, 2vw + 1rem, 2.5rem);
}

h2 {
  font-size: clamp(1.35rem, 1.5vw + 0.85rem, 2rem);
}

h3 {
  font-size: clamp(1.2rem, 1.2vw + 0.75rem, 1.75rem);
}

h4 {
  font-size: 1.424rem;
}

h5 {
  font-size: 1.266rem;
}

h6 {
  font-size: 1.125rem;
}

blockquote {
  font-style: italic;
}

.site-container {
  display: grid;
  width: 100%;
  min-height: 100vh;
  grid-template-rows: max-content 1fr max-content;
  grid-template-areas:
    "header"
    "content"
    "footer";
}

.site-header {
  grid-area: header;
  align-content: start;
  padding: 1rem 0;
  background-color: light-dark(var(--brand-primary), var(--light-primary));
  color: light-dark(var(--light-primary), var(--brand-primary));
  box-shadow: 0 2px 16px rgb(0 0 0 / 35%);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header__branding {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.site-header__branding-text {
  display: flex;
  flex-direction: column;
}

.site-header__icon {
  flex-shrink: 0;
}

.site-header__title {
  font-size: 1.266rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.site-header__subtitle {
  font-size: 0.875rem;
  opacity: 0.75;
}

/* Nav — mobile-first hamburger */

.site-nav {
  position: relative;
}

.site-nav__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

.site-nav__list {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: var(--light-primary);
  color: var(--dark-primary);
  border: 1px solid var(--boarding-pass-border-color);
  border-radius: 4px;
  min-width: 12rem;
  z-index: 10;
  box-shadow: 0 4px 8px rgb(0 0 0 / 10%);
}

.site-nav__list.site-nav__list--open {
  display: block;
}

.site-nav__list li {
  display: block;
}

.site-nav__list a {
  display: block;
  padding: 0.5rem 1rem;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.site-nav__list a:hover,
.site-nav__list a:focus {
  text-decoration: underline;
  text-underline-offset: 4px;
  opacity: 0.8;
}

/* Nav — wider screens: inline links */

@media (width >=600px) {
  .site-nav__toggle {
    display: none;
  }

  .site-nav__list {
    display: flex;
    position: static;
    gap: 1.25rem;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
    color: inherit;
    min-width: unset;
    box-shadow: none;
  }

  .site-nav__list a {
    padding: 0;
  }
}

.site-content {
  grid-area: content;
  align-content: start;
}

.page-home .site-content {
  background: light-dark(var(--light-gradient), var(--dark-gradient));
}

.site-content>.section-content {
  padding-block: 2rem;
}

.site-footer {
  grid-area: footer;
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid light-dark(rgb(18 18 52 / 15%), rgb(180 180 220 / 15%));
  font-size: 0.875rem;
}

.section-content {
  padding: 0 2rem;
  max-width: 60rem;
  margin: 0 auto;
}


.flight-tracker {
  background-color: var(--light-primary);
  color: var(--dark-primary);
  padding: 2rem;
  border: 2px solid var(--link-light);
  border-radius: 2rem;

  a {
    color: var(--link-light);
  }
}

.flight-progress {
  display: grid;
  grid-template-areas:
    "content content content"
    "progress progress progress"
    "origin . destination" ;
  gap: 1rem;
}

.flight-progress-content {
  grid-area: content;
}

.flight-progress-current {
  display: grid;
  grid-template-areas: 
  "logo details"
  "footnote footnote";
  grid-template-columns: 48px 1fr;
  gap: 1rem;

  .logo {
    grid-area: logo;
  }

  .flight-progress-current-details {
    grid-area: details;
  }

  .flight-progress-current-footnote {
    grid-area: footnote;
  }
}

.flight-progress-current-content{
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  gap: 1rem;

  .flight-progress-cta {
    align-self: flex-start;
  }
}

.flight-progress-cta {
  display: inline-block;
  padding: 0.75rem 2rem;
  background:  #e8e8f2;
  color: var(--brand-primary);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  transition: opacity 0.15s ease;

  &:hover,
  &:focus {
    opacity: 0.85;
    color: var(--brand-primary);
  }
}

.flight-progress-bar-container {
  grid-area: progress;
  display: grid;
  grid-template-areas: "bar";
  position: relative;

  &::before,
  &::after {
    content: " ";
    display: block;
    height: 2rem;
    width: 2rem;
    clip-path: circle(1rem);
    position: absolute;
    z-index: 2;
    top: -0.5rem;
  }

  &::before {
    left: -0.25rem;
  }

  &::before,
  [data-complete="true"] &::after {
    background-color: var(--link-light);
  }

  &::after {
    background-color: var(--link-dark);
    right: -0.25rem;
  }

  .flight-progress-bar-template {
    background-color: var(--link-dark);
    height: 1rem;
    grid-area: bar;
    align-self: center;
  }

  .flight-progress-bar {
    background: linear-gradient(90deg, var(--link-light) 96%, var(--link-dark));
    height: 1rem;
    grid-area: bar;
    align-self: center;
    position: relative;

    &::after {
      content: url("/images/airplane.png");
      right: 0;
      top: -8px;
      z-index: 3;
      position: absolute;
      animation: float 1s ease-in-out infinite alternate;
    }

    @media (prefers-reduced-motion: reduce) {
      &::after {
        animation: none;
      }
    }
  }
}

@keyframes float {
  0% { transform: translateY(2px); }
  100% { transform: translateY(-2px); }
}





.flight-progress-detail {
  margin: 0;

  dl,
  dt,
  dd {
    margin: 0;
    padding: 0;
  }

  .title {
    font-weight: bold;
    margin-bottom: 1rem;
  }

  .progress-title {
    font-weight: bold;
  }

  .status {
    font-weight: bold;
    color:#4c774b;
    font-variant: small-caps;
  }

  .link,
  .date {
    font-size: 0.75rem;
  }

  .time {
    display: block;
  }
}

.flight-progress-origin {
  grid-area: origin;
  justify-self: start;
}

.flight-progress-destination {
  grid-area: destination;
  justify-self: end;
  text-align: end;
}


.boarding-pass {
  max-width: 95%;
  justify-self: center;
  font-family: var(--monospace-font), monospace;
  display: flex;
  flex-direction: column;
  border: var(--boarding-pass-border-width) solid var(--boarding-pass-border-color);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgb(18 18 52 / 12%);
  overflow: hidden;
  background-color: var(--light-primary);
  color: var(--dark-primary);

  .header {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    gap: 2rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border-bottom: var(--boarding-pass-border-width) dotted var(--boarding-pass-border-color);

    .details {
      display: flex;
      flex-direction: row;
      gap: 2rem;
    }
  }

  .logo {
    filter: grayscale(1);
  }

  dl,
  dd,
  dt {
    margin: 0;
    padding: 0;
  }

  .title,
  .description {
    text-transform: uppercase;
    line-height: 1;
  }

  .title {
    font-size: 0.75rem;
  }

  .description {
    font-size: 1rem;
    font-weight: 600;
  }

  .vote {
    text-transform: uppercase;
    font-size: 0.75rem;
  }

  .body {
    padding: 1rem;
  }

  .body>div+div {
    margin: 1.25rem 0 0;
  }

  .origin-destination {
    display: flex;
    flex-flow: row wrap;
    gap: 1rem;

    >* {
      flex: 1;
    }
  }

  .origin-destination .title {
    font-size: 1rem;
  }

  .origin-destination .description {
    font-size: 2rem;
  }

  .footer {
    text-align: center;
  }
}

.wallet-link {
  display: inline-block;
  padding: 0.5rem;
}

/* Focus */

:focus-visible {
  outline: 2px solid currentcolor;
  outline-offset: 3px;
  border-radius: 2px;
}

/* View transitions */

::view-transition-old(root) {
  animation: 200ms ease both vt-fade-out;
}

::view-transition-new(root) {
  animation: 200ms ease both vt-fade-in;
}

@keyframes vt-fade-out {
  to {
    opacity: 0;
  }
}

@keyframes vt-fade-in {
  from {
    opacity: 0;
  }
}

/* Motion preferences */

@media (prefers-reduced-motion: reduce) {
  .site-nav__list a {
    transition: none;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

/* Make blockquotes look like headlines on little newspapers.
Expected markup:
<div class="newsprint">
    <blockquote>Foo</blockquote>
    <blockquote>Blah</blockquote>
</div>
*/
.newsprint {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.newsprint blockquote {
  margin: 0;
  width: 90%;
  padding: 1rem;
  color: #1a1a1a;
  background: #f6eee3;
  border: 1px solid #ccc;
  font:
    700 1.2rem/1.15 Georgia,
    serif;
  text-transform: uppercase;
  box-shadow: 0 1px 4px rgb(0 0 0 / 14%);
}

/* slight skew */
.newsprint blockquote:nth-child(odd) {
  transform: rotate(-1.5deg) translateY(0.4rem);
}

.newsprint blockquote:nth-child(even) {
  transform: rotate(1.5deg) translateY(-0.4rem);
  align-self: flex-end;
}

/* fake newsprint */
.newsprint blockquote::after {
  content: "";
  display: block;
  height: 1rem;

  /* by default, few lines on small screens */
  margin-top: 0.8rem;
  background: repeating-linear-gradient(#555 0 3px, transparent 2px 7px);
}

/* Non-small mobile — allow more usage of width and height */
@media (width > 480px) {
  .newsprint {
    flex-direction: row;
  }

  .newsprint blockquote {
    flex: 1;
    width: auto;
    align-self: auto;
  }

  .newsprint blockquote::after {
    height: 3rem;
  }
}

/* flyers in browser */

.flyers {
  background-color: #fff;
}

.boarding-pass-tiles {
  display: flex;
  flex-wrap: wrap;

  .boarding-pass {
    border-radius: 0;
    justify-self: flex-start;
    box-shadow: none;
  }
}

@media print {
  .boarding-pass {
    break-inside: avoid;
  }

  @page {
    size: auto;
    margin: 6mm;
  }
}