/* Flightline landing page
   Geometry follows the 1920px-wide layout comp: 1 --u == 1 design px,
   scaling down proportionally on narrower desktop screens. */

:root {
  --tan: #989379;
  --slate: #56595c;
  --orange: #da681a;
  --ink: #000;
  --muted: #adaaa0;
  --white: #fff;

  --u: min(1px, calc(100vw / 1920));
  --container: min(1683px, calc(100vw - 2 * max(16px, 6vw)));
  --radius-lg: calc(40 * var(--u));

  /* Apotek from Adobe Fonts (kit linked in index.html). Saira is the
     fallback if the kit doesn't load, e.g. on a domain the kit doesn't allow. */
  --font: "apotek", "Saira", "Arial Narrow", system-ui, sans-serif;
  --font-cond: "apotek-cond", "apotek-condensed", "Saira", "Arial Narrow", sans-serif;
  --font-ext: "apotek-extended", "Saira", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--tan);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.wrap {
  width: var(--container);
  margin-inline: auto;
}

/* ---------- Masthead ---------- */

.topbar {
  height: calc(22.5 * var(--u));
  min-height: 8px;
  background: var(--slate);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: var(--container);
  margin: calc(33 * var(--u)) auto calc(42 * var(--u));
  position: relative;
  min-height: calc(178 * var(--u));
}

/* Orange tab bleeds off the left edge of the viewport */
.brand {
  position: relative;
  display: flex;
  align-items: center;
  align-self: stretch;
  padding-right: calc(250 * var(--u));
  color: var(--white);
}

.brand::before {
  content: "";
  position: absolute;
  inset: 0 0 0 -100vw;
  background: var(--orange);
  border-radius: 0 calc(16 * var(--u)) calc(8 * var(--u)) 0;
  clip-path: polygon(0 0, 100% 0, 100% 8%, calc(100% - 150 * var(--u)) 100%, 0 100%);
  z-index: -1;
}

.brand img {
  width: calc(205 * var(--u));
  min-width: 110px;
}

.tagline {
  text-align: right;
  color: var(--white);
  text-transform: uppercase;
  line-height: 1;
}

.tagline {
  /* Line 2 is sized so it runs the same width as line 1 */
  --tagline-size: clamp(16px, calc(43 * var(--u)), 43px);
}

.tagline span { display: block; }

.tagline__top {
  font-size: var(--tagline-size);
  font-weight: 600;
  font-stretch: 85%;
  letter-spacing: 0.01em;
}

.tagline__bottom {
  margin-top: 0.12em;
  font-size: calc(var(--tagline-size) * 1.245);
  font-weight: 800;
  font-stretch: 85%;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  aspect-ratio: 1683 / 951;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  z-index: 1;
}

.hero__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--ink);
}

/* Pause/play for the autoplaying sizzle reel */
.hero__toggle {
  position: absolute;
  right: clamp(12px, calc(28 * var(--u)), 28px);
  bottom: clamp(12px, calc(28 * var(--u)), 28px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.55);
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.hero__toggle:hover { background: var(--orange); }
.hero__toggle:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.hero__toggle svg { width: 20px; height: 20px; fill: currentColor; }
.hero__toggle .icon-play,
.hero__toggle[aria-pressed="true"] .icon-pause { display: none; }
.hero__toggle[aria-pressed="true"] .icon-play { display: block; }

/* ---------- Black panel ---------- */

.panel {
  position: relative;
  margin-top: calc(-500 * var(--u));
  padding: calc(600 * var(--u)) calc(62 * var(--u)) 0 calc(85 * var(--u));
  background: var(--ink);
  border-radius: 0 0 calc(50 * var(--u)) calc(50 * var(--u));
  color: var(--muted);
}

.intro {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: calc(40 * var(--u));
  padding-bottom: calc(80 * var(--u));
}

.intro h2 {
  font-size: clamp(18px, calc(33 * var(--u)), 33px);
  font-weight: 500;
  font-stretch: 85%;
  line-height: 1.45;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding-right: 1em;
}

.intro p {
  font-size: clamp(13px, calc(15.5 * var(--u)), 15.5px);
  font-stretch: 112%;
  font-family: var(--font-ext);
  line-height: 1.87;
}

.rule {
  margin: 0;
  border: 0;
  height: calc(10 * var(--u));
  min-height: 4px;
  background: var(--slate);
}

/* ---------- Stats ---------- */

.stats {
  position: relative;
  min-height: calc(728 * var(--u));
  margin-left: calc(-85 * var(--u));
  margin-right: calc(-62 * var(--u));
  display: flex;
  align-items: center;
}

.stats__photo {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 35%;
  border-bottom-left-radius: calc(50 * var(--u));
  pointer-events: none;
}

.stats__grid {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  row-gap: calc(70 * var(--u));
  padding-block: calc(90 * var(--u)) calc(50 * var(--u));
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-transform: uppercase;
  line-height: 1;
}

.stat__value {
  color: var(--orange);
  font-size: clamp(34px, calc(74 * var(--u)), 74px);
  font-weight: 800;
  font-stretch: 80%;
  font-family: var(--font-cond);
}

.stat__label {
  margin-top: calc(12 * var(--u));
  color: var(--white);
  font-size: clamp(16px, calc(36 * var(--u)), 36px);
  font-weight: 500;
  font-stretch: 85%;
}

/* Played once by script.js when the stats scroll into view */
.stat--animate {
  animation: stat-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.stat--animate .stat__label {
  animation: stat-label 0.9s ease-out both;
  animation-delay: inherit;
}

@keyframes stat-rise {
  from { opacity: 0; transform: translateY(calc(40 * var(--u) + 12px)); }
  to   { opacity: 1; transform: none; }
}

@keyframes stat-label {
  from { opacity: 0; letter-spacing: 0.25em; }
  to   { opacity: 1; letter-spacing: normal; }
}

.stat__value { font-variant-numeric: tabular-nums; }

.stat--buildings  { grid-area: 1 / 9 / 2 / 15; }
.stat--sf         { grid-area: 1 / 18 / 2 / 23; }
.stat--owner      { grid-area: 2 / 5 / 3 / 11; }
.stat--market     { grid-area: 2 / 12 / 3 / 18; }
.stat--available  { grid-area: 2 / 19 / 3 / 24; }

/* ---------- Contacts ---------- */

.contacts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: calc(20 * var(--u)) calc(24 * var(--u));
}

.contacts__list {
  display: flex;
  flex: 1;
  gap: calc(100 * var(--u));
  justify-content: space-between;
  max-width: calc(1150 * var(--u));
}

.contact {
  display: flex;
  align-items: center;
  gap: calc(15 * var(--u));
}

.contact img {
  width: calc(138 * var(--u));
  min-width: 56px;
  border-radius: 50%;
  outline: 1px solid var(--ink);
  outline-offset: -1px;
}

.contact__name {
  font-size: clamp(14px, calc(22 * var(--u)), 22px);
  font-weight: 700;
  font-stretch: 120%;
  font-family: var(--font-ext);
  line-height: 1.2;
}

.contact__name a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.contact__name a:hover,
.contact__name a:focus-visible { color: var(--white); }

.contact__phone {
  color: inherit;
  text-decoration: none;
  font-size: clamp(13px, calc(18 * var(--u)), 18px);
  font-stretch: 120%;
  font-family: var(--font-ext);
}

.contact__phone:hover,
.contact__phone:focus-visible { text-decoration: underline; }

.contacts__stream {
  width: calc(176 * var(--u));
  min-width: 96px;
  flex-shrink: 0;
}

/* ---------- Tablet & mobile ---------- */

@media (max-width: 1000px) {
  .intro {
    grid-template-columns: 1fr;
    row-gap: 16px;
    padding-bottom: 32px;
  }

  .intro h2 { padding-right: 0; margin-bottom: 8px; }

  .stats {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
  }

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 32px;
    padding: 40px 16px 32px;
  }

  .stat--buildings,
  .stat--sf,
  .stat--owner,
  .stat--market,
  .stat--available { grid-area: auto; }

  .stat--available { grid-column: 1 / -1; }

  .stats__photo {
    position: relative;
    width: min(60%, 320px);
    border-bottom-left-radius: 20px;
    order: 2;
  }

  .contacts { flex-direction: column; align-items: flex-start; padding-block: 24px 32px; }
  .contacts__list { flex-direction: column; gap: 16px; max-width: none; }
}

@media (max-width: 700px) {
  .masthead__inner {
    flex-direction: column;
    align-items: flex-start;
    margin-block: 0 24px;
    gap: 16px;
  }

  .brand { padding: 20px 64px 20px 0; align-self: flex-start; }
  .brand::before { clip-path: polygon(0 0, 100% 0, calc(100% - 44px) 100%, 0 100%); border-radius: 0; }
  .tagline { text-align: left; }

  .hero { aspect-ratio: 16 / 9; border-radius: 20px; }
  .panel {
    margin-top: -60px;
    padding: 92px 20px 0;
    border-radius: 0 0 20px 20px;
  }
  .stats { margin-inline: -20px; }
}
