/* Flash Networks static site.
   Layout and type scale reproduce the original Squarespace (fluid engine) design:
   24-column grid on desktop, 8-column grid on phones, fluid type sizes. */

@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/raleway-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Raleway";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/raleway-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
}

:root {
  --bg: #f5f5f5;
  --text: #000;
  --heading-font: "Space Grotesk", sans-serif;
  --body-font: "Raleway", sans-serif;
  --gutter: 4vw;
  --max-width: 2000px;
  --header-h: calc(158px + 1.6vw);

  /* Fluid type: same formula as the original site. */
  --h1: min(calc(3.6 * 1.2vw + 1rem), max(calc(3.6 * 24px + 1rem), 4.6rem));
  --h2: min(calc(2.1 * 1.2vw + 1rem), max(calc(2.1 * 24px + 1rem), 3.1rem));
  --h3: min(calc(1.6 * 1.2vw + 1rem), max(calc(1.6 * 24px + 1rem), 2.6rem));
  --p: min(calc(0.2 * 1.2vw + 1rem), max(calc(0.2 * 24px + 1rem), 1.2rem));
  --meta: min(calc(-0.2 * 1.2vw + 1rem), max(calc(-0.2 * 24px + 1rem), 0.8rem));
}

@media screen and (max-width: 767px) and (orientation: portrait) {
  :root {
    --unit: min(1.2vh, 10.8px);
    --h1: calc(3.6 * var(--unit) + 1rem);
    --h2: calc(2.1 * var(--unit) + 1rem);
    --h3: calc(1.6 * var(--unit) + 1rem);
    --p: calc(0.2 * var(--unit) + 1rem);
    --meta: calc(-0.2 * var(--unit) + 1rem);
  }
}

@media screen and (max-width: 799px), only screen and (pointer: coarse) and (max-width: 1024px) {
  :root { --header-h: calc(12vw + 158px); }
}
@media screen and (max-width: 767px) {
  :root { --header-h: calc(12vw + 51px); }
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  font-weight: 500;
  font-size: var(--p);
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; border: 0; }
a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute;
  left: -16000px;
  top: 24px;
  z-index: 100;
  padding: 16px 20.8px;
  background: #000;
  color: #fff;
  font-size: 16px;
}
.skip-link:focus { left: 24px; }

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: var(--heading-font);
  font-weight: 500;
  letter-spacing: -0.05em;
  margin: 2rem 0;
}
h1 { font-size: var(--h1); line-height: calc(1.2em * (1 + (1 - 4.6) / 25)); }
h2 { font-size: var(--h2); line-height: calc(1.2em * (1 + (1 - 3.1) / 25)); }
h3 { font-size: var(--h3); line-height: calc(1.2em * (1 + (1 - 2.6) / 25)); }

p {
  margin: 1rem 0;
  font-size: var(--p);
  line-height: 1.5em;
}
strong { font-weight: 700; }

.html > :first-child { margin-top: 0; }
.html > :last-child { margin-bottom: 0; }
.text h1, .text h2, .text h3, .text p { white-space: pre-wrap; }
.center { text-align: center; }
.white { color: #fff; }

.text p a,
.footer-link {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* Underline "highlight" drawn under the section headings. */
.underline {
  white-space: normal;
  padding: 0 0.12em;
  margin: 0 -0.12em;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 100% 0.1em;
  background-position: 0 calc(100% - 0.067em);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

pre {
  margin: 1em 0;
  font-family: monospace, serif;
  font-size: var(--p);
  line-height: 1.5em;
  white-space: pre-wrap;
}
pre code {
  font-family: var(--body-font);
  font-weight: 500;
  font-size: var(--meta);
  line-height: 1em;
  letter-spacing: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}
.header-bar {
  position: relative;
  padding: 0.8vw var(--gutter);
}
.header-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.header-shadow { box-shadow: 0 12px 12px 0 #000; opacity: 0.15; }
.header-blur { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@supports not ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) {
  .header-blur { background-color: rgba(255, 255, 255, 0.5); }
}
.header-gradient { background: linear-gradient(#fff, rgba(0, 0, 0, 0)); opacity: 0.28; }

.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}
.logo { display: block; line-height: 0; margin-right: auto; }
.logo img { width: auto; height: auto; max-width: 100%; max-height: 158px; }

.btn {
  display: inline-block;
  padding: 16px 20.8px;
  font-family: var(--heading-font);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #000;
  background: transparent;
  cursor: pointer;
}
.btn-underline { border-bottom: 2px solid #000; }
.header-cta { margin-left: 2vw; white-space: nowrap; }

.burger {
  display: none;
  position: relative;
  padding: 1px 6px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.burger-box { position: relative; display: block; width: 35px; height: 35px; }
.bun {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  margin: auto;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: transform 250ms cubic-bezier(0.2, 0.6, 0.3, 1), width 250ms cubic-bezier(0.2, 0.6, 0.3, 1);
}
.bun-top { transform: translateY(-5.5px); }
.bun-bottom { transform: translateY(5.5px); }

/* Mobile menu overlay */
.menu {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: var(--header-h);
  background: var(--bg);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: visibility 600ms cubic-bezier(0.4, 0, 0.2, 1), opacity 400ms cubic-bezier(0.4, 0, 0.2, 1);
}
.menu-cta {
  display: flex;
  justify-content: center;
  transform: translateY(100%);
  transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}
.menu-cta .btn { min-width: 210px; margin: 4vw 6vw 6vw; text-align: center; }

.menu-open { overflow: hidden; }
.menu-open .site-header { position: fixed; }
.menu-open .header-layer { visibility: hidden; }
.menu-open .menu { opacity: 1; visibility: visible; }
.menu-open .menu-cta { transform: none; }
.menu-open .burger { color: #000; }
.menu-open .bun-top { transform: translateX(3.5px) rotate(-135deg); width: 28px; }
.menu-open .bun-bottom { transform: translateX(3.5px) rotate(135deg); width: 28px; }

@media screen and (max-width: 799px), only screen and (pointer: coarse) and (max-width: 1024px) {
  .header-bar { padding: 6vw; }
  .header-cta { display: none; }
  .burger { display: block; }
  .header-inner { min-height: 51px; align-items: center; }
  .logo { align-self: flex-start; }
}
@media screen and (max-width: 767px) {
  .logo img { max-height: 48px; }
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 33vh;
  overflow: hidden;
}
.section-first { padding-top: var(--header-h); }
.section-bg { position: absolute; inset: 0; background: var(--bg); }
.section-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.section-overlay { position: absolute; inset: 0; background: var(--bg); opacity: var(--overlay, 0); }
.section-black .section-bg { background: #000; }
.section-black { color: #fff; }
.section-black .footer-link { color: #d9d9d9; }

.content { position: relative; padding: 3.3vmax 0; }
.content-lg { padding: 6.6vmax 0; }
.content-none { padding: 0; }

/* Fluid-engine style grid. Each block sets --m / --d (grid-area on phone / desktop). */
.grid {
  --gap: 11px;
  --grid-gutter: calc(6vw - var(--gap));
  --cell-max-width: calc((var(--max-width) - var(--gap) * 7) / 8);
  position: relative;
  display: grid;
  grid-template-columns:
    minmax(var(--grid-gutter), 1fr)
    repeat(8, minmax(0, var(--cell-max-width)))
    minmax(var(--grid-gutter), 1fr);
  grid-template-rows: repeat(var(--rows-m), minmax(24px, auto));
  row-gap: var(--gap);
  column-gap: var(--gap);
  overflow-x: hidden;
  overflow-x: clip;
}
.grid-tight { --gap: 0px; }

@media (min-width: 768px) {
  .grid {
    --grid-gutter: calc(var(--gutter) - var(--gap));
    --cell-max-width: calc((var(--max-width) - var(--gap) * 23) / 24);
    --container-width: min(var(--max-width), calc(100vw - var(--gutter) * 2));
    grid-template-columns:
      minmax(var(--grid-gutter), 1fr)
      repeat(24, minmax(0, var(--cell-max-width)))
      minmax(var(--grid-gutter), 1fr);
    grid-template-rows: repeat(var(--rows-d), minmax(calc(var(--container-width) * 0.0215), auto));
  }
}

.block {
  grid-area: var(--m);
  z-index: var(--zm, 1);
  display: flex;
  flex-direction: column;
  justify-content: var(--jm, flex-start);
  min-width: 0;
}
@media (min-width: 768px) {
  .block {
    grid-area: var(--d);
    z-index: var(--zd, 1);
    justify-content: var(--jd, flex-start);
  }
}

.block-image { position: relative; }
.block-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* ---------- Contact form (opens the visitor's email app) ---------- */

.contact-form { margin: 0; }
.contact-form fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.contact-form legend,
.field-title {
  display: block;
  padding: 0 0 4px;
  font-size: var(--p);
  line-height: 1.5em;
}
.contact-form legend { line-height: normal; padding: 0; }
.contact-form legend span { display: block; padding-bottom: 4px; line-height: 1.5em; }
.field { display: grid; margin: 0 0 20px; flex: 1 1 0; min-width: 0; }
.field-full { width: 100%; }
.field-title { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.52em; }
.caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8.352px;
  margin-top: 4px;
  padding-bottom: 2px;
  font-size: 16px;
  line-height: 24px;
}
.required { font-size: 16px; line-height: 1; opacity: 0.7; }
.field-title .required { line-height: 24px; }

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 15px;
  font: inherit;
  font-size: var(--p);
  line-height: 1.5em;
  letter-spacing: 0.01em;
  color: #000;
  background: rgba(255, 255, 255, 0);
  border: 1px solid #000;
  border-radius: calc(var(--p) + 7.8px);
  -webkit-appearance: none;
  appearance: none;
}
.contact-form textarea { height: 100px; resize: vertical; }
.contact-form .btn { border: 1px solid #000; line-height: normal; }
.form-note { margin: 12px 0 0; font-size: 16px; line-height: 1.5; }
.form-note[hidden] { display: none; }

footer.section { margin-top: auto; }

/* ---------- 404 ---------- */

.system-page {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--header-h) + var(--gutter)) var(--gutter) var(--gutter);
  line-height: 1.5em;
}
.system-page ul { margin: 1rem 0; padding-left: 40px; }
.system-page li { font-size: var(--p); }
@media screen and (max-width: 767px) {
  .system-page { padding-left: 6vw; padding-right: 6vw; }
}
