/* Skytop Aero website v2: shared styles for every page.
   Loaded after tokens.css (colors, spacing, buttons) and, on pages with a
   banner, hero.css and banner-c.css. Mobile-first: the base rules are the
   phone layout; media queries add columns at 600px (tablet) and 960px (desktop). */

/* ---------- Font: Montserrat, hosted on this site (one variable file, weights 400-800) ---------- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/montserrat-latin-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 { margin: 0; color: var(--ink); font-family: var(--font-display); text-wrap: balance; }
h1 { font-size: 28px; line-height: 36px; font-weight: 700; }
h2 { font-size: 24px; line-height: 32px; font-weight: 700; }
h3 { font-size: 18px; line-height: 26px; font-weight: 600; }
p { margin: 0 0 var(--space-4); }
.banner :is(h1, h2, h3) { color: inherit; }   /* banners are green, so their headings take the banner's white */
@media (min-width: 600px) {
  h1 { font-size: 36px; line-height: 44px; }
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ---------- Skip link (hidden until Tab reaches it) ---------- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -80px;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-2); }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
}
.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
/* Clear space around the logo = the height of the AERO line (about 7px at this size) */
.brand { display: block; padding: 7px 0; line-height: 0; }
.brand img { width: 96px; height: auto; }

.nav-toggle {
  display: none;               /* shown only when JavaScript is running (see .js below) */
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: 600 15px/20px var(--font-sans);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-raised); }
.js .nav-toggle { display: inline-flex; }

.site-nav { width: 100%; }
.js .site-nav { display: none; }
.js .site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: var(--space-2) 0 var(--space-4); }
.site-nav li + li { border-top: 1px solid var(--hairline); }
.site-nav a {
  display: block;
  padding: 12px 0;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--highlight);
  text-decoration-thickness: 4px;
  text-underline-offset: 8px;
}
.site-nav .nav-cta {
  display: inline-block;
  margin-top: var(--space-2);
  padding: 12px var(--space-6);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  text-align: center;
}
.site-nav .nav-cta:hover { background: var(--surface-deep); text-decoration: none; }
.site-nav .nav-cta[aria-current="page"] { text-decoration: none; outline: 3px solid var(--highlight); outline-offset: 2px; }
.site-nav li:last-child { border-top: 0; }

@media (min-width: 960px) {
  .nav-toggle, .js .nav-toggle { display: none; }
  .site-nav, .js .site-nav { display: block; width: auto; }
  .site-nav ul { display: flex; align-items: center; gap: var(--space-6); padding: 0; }
  .site-nav li + li { border-top: 0; }
  .site-nav a { padding: 8px 0; font-size: 14px; line-height: 20px; }
  .site-nav .nav-cta { margin-top: 0; padding: 10px var(--space-4); }
}

/* ---------- Page sections ---------- */
.section { padding: var(--space-10) 0; }
.section-alt { background: var(--surface-raised); }
@media (min-width: 960px) { .section { padding: var(--space-16) 0; } }

.section-head { max-width: 720px; margin-bottom: var(--space-6); }
.section-head .eyebrow { margin: 0 0 var(--space-2); color: var(--ink-muted); }
.section-head h2 { margin-bottom: var(--space-4); }
.section-head p:last-child { margin-bottom: 0; }

/* Call-to-action band: green, centered, yellow button */
.cta-band {
  padding: var(--space-10) 0;
  background: var(--surface-inverse);
  color: var(--ink-inverse);
  text-align: center;
}
.cta-band h2 { color: var(--ink-inverse); margin-bottom: var(--space-4); }
.cta-band p { max-width: 560px; margin: 0 auto var(--space-6); }
@media (min-width: 960px) { .cta-band { padding: var(--space-16) 0; } }

/* Two columns that stack on a phone */
.split { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 960px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-16); }
}

/* Photos: square corners, set width and height in the HTML so nothing jumps */
.photo { width: 100%; height: auto; border-radius: var(--radius-none); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  padding-top: calc(var(--space-10) + 9px);
  background: var(--surface-inverse);
  color: var(--ink-inverse);
}
/* Sunrise stripe along the top edge: yellow, then 1375, then 158 */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 9px;
  background: linear-gradient(
    var(--yellow-7548) 0 33.3%,
    var(--orange-1375) 33.3% 66.6%,
    var(--orange-158) 66.6% 100%
  );
}
.site-footer a { color: var(--ink-inverse); }
.footer-grid { display: grid; gap: var(--space-10); }
.footer-brand { display: block; width: 160px; margin-bottom: var(--space-4); line-height: 0; }
.footer-brand img { width: 160px; height: auto; }
.footer-about p { max-width: 380px; color: #dfe6e2; }
.footer-social { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; font-weight: 600; }
.footer-col h2 {
  margin: 0 0 var(--space-4);
  color: var(--yellow-7548);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: var(--space-2); color: #dfe6e2; }
.footer-col a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.footer-col li { margin-bottom: 0; }
.footer-col a:hover, .footer-social:hover { text-decoration: underline; }
.footer-bottom {
  margin-top: var(--space-10);
  padding: var(--space-4) 0 var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 14px;
  line-height: 20px;
  color: #dfe6e2;
}
@media (min-width: 600px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-about { grid-column: auto; }
}

/* ---------- Cards, tags and two-column groups (About, and later pages) ---------- */
.card {
  padding: var(--space-6);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
}
.section-alt .card { background: var(--surface); border: 1px solid var(--hairline); }
.card h2, .card h3 { margin-bottom: var(--space-2); font-size: 18px; line-height: 26px; font-weight: 600; }
.card p:last-child { margin-bottom: 0; }

.cols-2 { display: grid; gap: var(--space-6); }
@media (min-width: 960px) { .cols-2 { grid-template-columns: 1fr 1fr; } }

.stack { display: grid; gap: var(--space-6); }
.split-top { align-items: start; }

/* Tags: small pills (rounded edges are allowed for tags) */
.chip-list { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.chip-list li {
  padding: 4px 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-round);
  background: var(--surface);
  font-size: 14px;
  line-height: 20px;
}

/* ---------- About page ---------- */
.photo-wide { margin-top: var(--space-10); }
@media (min-width: 960px) { .photo-wide { margin-top: var(--space-16); } }
.portrait { display: block; width: 100%; max-width: 480px; }
@media (min-width: 960px) { .portrait { justify-self: end; } }

/* Team: 2 across on a phone, 4 on a desktop; a short last row is centered */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-6) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.team-card { flex: 0 0 calc(50% - 8px); text-align: center; }
@media (min-width: 600px) { .team-card { flex-basis: calc(25% - 12px); } }
@media (min-width: 960px) {
  .team-grid { column-gap: var(--space-6); }
  .team-card { flex-basis: calc(25% - 18px); }
}
.team-photo { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; margin-bottom: var(--space-2); border-radius: var(--radius-none); }
.team-card h3 { font-size: 18px; line-height: 26px; font-weight: 600; }
.team-role { margin: var(--space-1) 0 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* Platforms (Boeing, Airbus) */
.platform-block {
  padding: var(--space-6);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.platform-block h3 { margin-bottom: var(--space-2); }
.platform-block h4 {
  margin: var(--space-4) 0 var(--space-2);
  font: 600 14px/20px var(--font-sans);
  color: var(--ink-muted);
}
.platform-block .chip-list li { background: var(--surface-raised); }

/* Expertise tiles: 1 across on a phone, 2 on a tablet, 3 on a desktop */
.icon-grid { display: grid; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
@media (min-width: 600px) { .icon-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .icon-grid { grid-template-columns: repeat(3, 1fr); } }
.icon-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.icon-card h3 { font-size: 16px; line-height: 24px; }
.icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--accent);
}

/* ---------- Quality page: certificate card ---------- */
.cert-card {
  padding: var(--space-6);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
}
@media (min-width: 600px) { .cert-card { padding: var(--space-10); } }
.cert-card .icon { width: 56px; height: 56px; margin-bottom: var(--space-4); background: var(--surface); }
.cert-card h2 { margin-bottom: var(--space-2); }
.cert-image-link { display: block; max-width: 440px; margin: var(--space-6) 0 var(--space-2); border: 1px solid var(--hairline); background: var(--surface); line-height: 0; }
.cert-image-link img { width: 100%; height: auto; }
.cert-note { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* ---------- Giving Back: event cards ---------- */
.event-card { border: 1px solid var(--hairline); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.event-card .photo { display: block; }
.event-body { padding: var(--space-6); }
.event-body h2 { margin-bottom: var(--space-1); font-size: 18px; line-height: 26px; font-weight: 600; }
.event-meta { margin: 0; color: var(--ink-muted); }

/* ---------- Contact page ---------- */
.contact-list { display: grid; gap: var(--space-6); margin: 0 0 var(--space-6); padding: 0; list-style: none; }
.contact-list li { display: flex; gap: var(--space-4); align-items: flex-start; }
.contact-list h2 { margin-bottom: var(--space-1); font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink-muted); }
.contact-list a { display: inline-flex; align-items: center; min-height: 44px; }
.social-link, .footer-social { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; font-weight: 600; }
.map-frame { aspect-ratio: 4 / 3; border: 1px solid var(--hairline); background: var(--surface-raised); }
.map-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.map-link { margin: var(--space-4) 0 0; }
.map-link a { display: inline-block; padding: 8px 0; font-weight: 600; }

/* ---------- Terms and Conditions ---------- */
/* Plain green banner with no sun scene, to keep the legal page calm */
.banner-plain { background: var(--surface-inverse); color: var(--ink-inverse); }
.banner-plain .eyebrow { color: var(--yellow-7548); }

.terms-doc { max-width: 70ch; }
.terms-section { padding: var(--space-6) 0; border-top: 1px solid var(--hairline); }
.terms-section:first-child { padding-top: 0; border-top: 0; }
.terms-section h2 { margin-bottom: var(--space-2); font-size: 18px; line-height: 26px; font-weight: 600; }
.terms-section p:last-child { margin-bottom: 0; }
.terms-caps { font-size: 14px; line-height: 22px; }
.terms-sublist { margin: 0; padding-left: var(--space-6); }
.terms-sublist li { margin-bottom: var(--space-4); padding-left: var(--space-1); }
.terms-sublist li:last-child { margin-bottom: 0; }

/* ---------- Parts gallery (Home) ---------- */
/* 2 tiles across on a phone, 3 on a tablet, 5 on a desktop */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 600px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .gallery-grid { grid-template-columns: repeat(5, 1fr); gap: var(--space-6); } }

.part-card {
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.part-card .thumb {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--surface-raised);
  cursor: zoom-in;
}
.part-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}
.part-card .thumb:hover img { transform: scale(1.04); }
.part-card .thumb:focus-visible { outline-offset: -4px; }
@media (prefers-reduced-motion: reduce) {
  .part-card .thumb img { transition: none; }
  .part-card .thumb:hover img { transform: none; }
}
.part-caption {
  margin: 0;
  padding: 10px 12px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.part-caption .label {
  display: block;
  font-size: 11px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---------- Part viewer (a <dialog> pop-up) ---------- */
.part-viewer {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(15, 31, 25, 0.96);
  color: var(--ink-inverse);
}
.part-viewer::backdrop { background: rgba(15, 31, 25, 0.96); }
.pv-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 72px 64px 24px;
}
.pv-photo { display: block; flex: 0 1 auto; min-height: 0; max-width: 100%; }
.pv-photo img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 220px);
  max-height: calc(100dvh - 220px);
  margin: 0 auto;
  border-radius: var(--radius-none);
}
.pv-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-inverse);
  cursor: pointer;
}
.pv-btn:hover { background: var(--ink-inverse); color: var(--green-5535); }
.pv-close { top: var(--space-4); right: var(--space-4); }
.pv-prev { left: var(--space-2); top: 50%; transform: translateY(-50%); }
.pv-next { right: var(--space-2); top: 50%; transform: translateY(-50%); }
.pv-caption { flex: none; margin-top: var(--space-4); text-align: center; }
.pv-name { display: block; font-size: 18px; line-height: 26px; font-weight: 700; }
.pv-count { display: block; margin-bottom: var(--space-2); font-size: 14px; line-height: 20px; color: #dfe6e2; }
body.pv-open { overflow: hidden; }
@media (min-width: 600px) {
  .pv-stage { padding: 72px 96px 32px; }
  .pv-prev { left: var(--space-6); }
  .pv-next { right: var(--space-6); }
}
