/* ==========================================================================
   Novaxcorp — site styles
   Type scale, spacing and colours are taken from the original novaxcorp.com.
   Headings use Archivo in place of the original Adobe Fonts "acumin-pro",
   which is licence-locked to the Squarespace domain and cannot be self-hosted.
   ========================================================================== */

:root {
  --ink: #000;
  --paper: #fff;
  /* Headings on the live site are red — set there on a <span> inside each
     heading. Measured #d00404 on most blocks and #ef0404 on one; a single
     value is used here since the two are indistinguishable in practice. */
  --heading: #d00404;
  /* Sampled from the Novaxcorp logo (the red also drives the favicon). */
  --brand-grey: #3b3d43;
  --muted: var(--brand-grey);
  --rule: #d8d8d8;
  --rule-strong: #8a8a8a;

  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Poppins', 'Helvetica Neue', Arial, sans-serif;

  --step-h1: clamp(2.25rem, 1.2rem + 4.2vw, 3.88rem);
  --step-h2: clamp(1.75rem, 1.15rem + 2.4vw, 2.73rem);
  --step-h3: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
  /* Body copy is 16px/1.8 site-wide, matching the live site. The oversized
     23.68px setting is specific to the home-page intro, not a global default. */
  --step-body: 1rem;
  --step-lede: clamp(1.1rem, 0.92rem + 0.9vw, 1.48rem);

  --container: 1400px;
  --gutter: clamp(1.25rem, 4vw, 3.2rem);
  --section-y: clamp(3rem, 7vw, 5.75rem);
}

/* --- reset ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

body,
h1, h2, h3, p, ul, ol, li, figure, figcaption, blockquote { margin: 0; padding: 0; }

ul, ol { list-style: none; }

img, iframe { display: block; max-width: 100%; }
img { height: auto; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--step-body);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: -0.005em;
  color: var(--heading);
}

/* Card and accordion titles are body-coloured on the live site, not red. */
.card__title,
.accordion summary { color: var(--ink); }

h1 { font-size: var(--step-h1); }
h2 { font-size: var(--step-h2); line-height: 1.3; }
h3 { font-size: var(--step-h3); line-height: 1.4; }

a { color: inherit; }

/* currentColor keeps the ring visible in both contexts: black on the white
   page, white against the dark footer. A hardcoded dark ring disappeared
   entirely on the footer's near-black panel. */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* The UA's `bolder` resolves a 300 parent to 400, which would pick the 500
   face and read almost identically to the body text. The live site renders
   bold at 700, so request it explicitly. */
strong, b { font-weight: 700; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Products and Clients run in a narrower, inset column on the live site rather
   than the full content width the other pages use. The inset is proportional
   there, so it's expressed as a percentage. */
.container--narrow { padding-inline: var(--narrow-inset, 13.1%); }

@media (max-width: 800px) {
  .container--narrow { padding-inline: var(--gutter); }
}

/* --- header / nav --------------------------------------------------------- */
.site-header {
  padding-block: 1.75rem;
  border-bottom: 1px solid transparent;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo { flex: none; }
/* The live header sizes the logo by height (83px), not width. */
.site-logo img {
  height: clamp(46px, 6.5vw, 83px);
  width: auto;
}

.nav-toggle {
  display: none;
  flex: none;
  background: none;
  border: 1px solid var(--ink);
  color: inherit;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1;
  /* 44px tall — it gates all navigation on mobile. */
  padding: 0.86rem 1.1rem;
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.9rem, 1.35vw, 1.15rem);
  font-size: 1rem;
  line-height: 2;
}

.site-nav a {
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { border-bottom-color: currentColor; }
.site-nav a[aria-current='page'] { border-bottom-color: currentColor; }

/* --- generic section shapes ---------------------------------------------- */
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2rem, 4vw, 3rem); }
/* The card grids on Trading House and Our Work sit in much roomier sections
   than the tighter blocks on Logistics and Products. */
.section--spacious { padding-block: clamp(2.5rem, 10vw, 8rem); }
/* Products starts its accordion almost immediately under the heading. */
.section--accordion { padding-top: 13px; }

/* Our Work drops a lot of air between the page title and the first row. */
.page-work .section { padding-block: 5.6rem 11.3rem; }

/* Heading *level* is set by the document outline (one h1 per page, no skipped
   levels); heading *size* is set by these classes. That lets the markup be
   semantically correct without changing what the page looks like. */
.page-title {
  font-size: var(--step-h1);
  line-height: 1.24;
  max-width: 872px;
  margin-inline: auto;
  text-align: center;
}

.section-title {
  font-size: var(--step-h2);
  line-height: 1.3;
}

.subhead {
  font-size: var(--step-h3);
  line-height: 1.4;
}


/* Heading in the left column, body copy in the right — the layout the
   original uses for About, Trading House and Clients. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(1.5rem, 3vw, 2.25rem);
  align-items: start;
}

.split > :first-child { min-width: 0; }

.prose > * + * { margin-top: 1.4em; }

.lede { max-width: 62ch; }
/* Live leaves a gap between the contact heading and its intro line. */
.contact-grid .lede { margin-top: 25px; }

.rule {
  border: 0;
  width: 265px;
  max-width: 100%;
  height: 1px;
  background: var(--ink);
  margin: 42px 0 60px;
}

/* --- call to action ------------------------------------------------------- */
/* "Let's Work Together" sits on a full-bleed dark band on the live site, which
   is why its heading and button are white. Without the band they read as
   white-on-white; with it, the live colours work exactly as designed and need
   no alteration. */
.cta {
  background: var(--cta-bg, #28282a);
  padding-block: 43px 59px;
}
.cta h1,
.cta h2 { color: var(--paper); }
.cta p { margin-top: 33px; }

.btn {
  display: inline-block;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  line-height: normal;
  padding: 17.28px 28.86px;
  text-decoration: none;
  border: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn:hover,
.btn:focus-visible {
  background: #e6e6e6;
  color: var(--ink);
}

/* --- home ----------------------------------------------------------------- */
/* Padding values are set so the hero and intro land where they do on the live
   site (h1 at y=231, intro row at y=560, footer at y=985 for a 1280px view). */
.hero { padding-block: clamp(2.5rem, 7.2vw, 5.75rem) clamp(2.25rem, 7.1vw, 5.7rem); }

.home-intro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 2.5rem);
  align-items: start;
  padding-block: clamp(2rem, 6.6vw, 5.3rem);
}

/* The one oversized paragraph on the site. */
.home-intro p { font-size: var(--step-lede); }

/* --- full-bleed banner ---------------------------------------------------- */
/* Trading House opens with a full-bleed photographic banner that the heading
   and intro sit ON TOP of, in white, over a heavy black wash — not an image
   with a heading underneath. */
/* The live header is absolutely positioned and paints white OVER the top of
   this band, so only ~443px of the 582px section is actually visible. This
   header is a normal block, so the band itself is sized to the visible part
   and its content is anchored to the bottom to land at the same y. */
.hero-banner {
  position: relative;
  isolation: isolate;
  background: #000;
  color: var(--paper);
  display: flex;
  align-items: flex-end;
  min-height: clamp(300px, 34.6vw, 500px);
  padding-block: clamp(3rem, 9vw, 8rem) 3.2rem;
  overflow: hidden;
}

.hero-banner__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 69% 14%;
  z-index: -2;
}

.hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.53);
  z-index: -1;
}

.hero-banner__inner { max-width: 75%; }

.hero-banner h1,
.hero-banner h2 { color: var(--paper); }
.hero-banner p { color: var(--paper); margin-top: 2.1rem; }

@media (max-width: 700px) {
  .hero-banner__inner { max-width: 100%; }
}

/* Headings are red on most pages but plain black on Logistics and Contact. */
.heading--dark { color: var(--ink); }

/* --- card grids (trading house categories, work gallery) ------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(2rem, 4.7vw, 3.75rem);
}

.card__media {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Live: card title 19.46px/25.28 and description 14.27px/25.69 at a 1440
   viewport, both black — noticeably smaller than the page headings. */
/* Fixed, not fluid — the live site holds these at the same px across widths. */
.card__title {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.216rem; /* 19.456px */
  line-height: 1.3;
  font-weight: 500;
}

.card__body {
  margin-top: 1.5rem;
  font-size: 0.892rem; /* 14.272px */
  line-height: 1.8;
  color: var(--ink);
}
.card__body li + li { margin-top: 1rem; }

/* Work gallery puts the caption above the image. */
.card--caption-first .card__title { margin-top: 0; margin-bottom: 0.9rem; }
.card--caption-first .card__media { aspect-ratio: 4 / 3; }

/* --- logistics ------------------------------------------------------------ */
/* Live splits this block ~58/42 in favour of the image, not 50/50. */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.36fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 2.05vw, 1.7rem);
  align-items: start;
}

/* Shown whole on the live site — the intrinsic 1.88 ratio is the right one, so
   no aspect-ratio/cover crop (which was cutting ~20% off the frame). */
.feature__media {
  width: 100%;
  height: auto;
}

/* The live sub-head is display-sized and sits indented from the copy below. */
.feature .subhead {
  font-size: clamp(1.5rem, 0.85rem + 1.9vw, 2.152rem);
  line-height: 1.5;
  margin-left: clamp(0rem, 4.4vw, 3.5rem);
}

.checklist { margin-top: 1.4rem; padding-left: 1.25rem; }
.checklist li {
  list-style: disc;
  font-size: 1rem;
  line-height: 1.8;
}

@media (max-width: 900px) {
  .feature .subhead { margin-left: 0; }
}

/* --- products accordion --------------------------------------------------- */
/* The hairlines are solid black on the live site, not the pale grey used for
   rules elsewhere — they are the dominant texture of this page. */
.accordion { border-top: 1px solid var(--ink); }

.accordion details { border-bottom: 1px solid var(--ink); }

/* Live accordion titles are plain 16px light body text, not display type, and
   the +/- indicator sits at the FAR LEFT of the row, ahead of the label. */
.accordion summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row-reverse;
  gap: 0;
  padding-block: 15px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  line-height: normal;
}
.accordion summary::-webkit-details-marker { display: none; }

.accordion__title {
  flex: 1 1 auto;
  padding-left: 14px;
}

/* 14x14 plus drawn from two 2px bars, matching the live control. */
.accordion summary::after {
  content: '';
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 14px no-repeat;
}
.accordion details[open] summary::after {
  background: linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat;
}

.accordion__body {
  padding-bottom: 1.3rem;
  /* Live indents the expanded body ~140px from the summary at a 1280 view. */
  padding-left: clamp(1.25rem, 11vw, 9rem);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
}
.accordion__body li + li { margin-top: 1rem; }

/* --- clients -------------------------------------------------------------- */
/* Live stacks the heading above the list in one inset column, and sets the
   list slightly wider than Products. */
.clients { --narrow-inset: 15.4%; }
.clients h1 { margin-bottom: 1.6rem; }

/* Live: 14.39px client names in a single bulleted column, indented from the
   heading. (An earlier two-column version read better but did not match.) */
.client-list {
  padding-left: 2.5rem;
  font-size: 0.899rem; /* 14.386px */
  line-height: 1.8;
}
.client-list li { list-style: disc; margin-block: 0.45rem; }

/* --- contact -------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 465px) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
}

.contact-details {
  font-size: 1.05rem;
  line-height: 1.9;
}
/* These are the page's conversion targets and the link text is the same colour
   as the body copy, so the underline has to actually be visible. */
.contact-details a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.contact-details a:hover { border-bottom-color: currentColor; }
.contact-details > * + * { margin-top: 1.6rem; }

.map {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ececec;
}
.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- footer --------------------------------------------------------------- */
.site-footer {
  position: relative;
  color: var(--paper);
  background-color: #12161c;
  background-image: url('../images/particles.webp');
  background-size: cover;
  background-position: center;
  /* Asymmetric on the live site — 51px above, 85px below, for a 251px band. */
  padding-block: clamp(2.25rem, 4vw, 3.2rem) clamp(2.5rem, 6.6vw, 5.3rem);
}

/* The live site overlays the particle image at 15% black — matched here. */
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
}

.site-footer .container { position: relative; }

/* Live packs the two footer blocks into the left ~872px with unequal columns
   (a narrow address column, a wider contact column) rather than splitting the
   full width 50/50 — the right column starts ~26% across, not at midpoint. */
.site-footer__inner {
  display: grid;
  grid-template-columns: 23% 49%;
  gap: 1.5rem 2.9%;
  justify-content: start;
  font-size: 1rem;
  line-height: 1.8;
}

.site-footer a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.site-footer a:hover { border-bottom-color: currentColor; }


/* --- responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
  .split,
  .home-intro,
  .feature,
  .contact-grid,
  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  /* The desktop footer uses percentage tracks; reset the gap too. */
  .site-footer__inner { gap: 1.5rem; }

  .nav-toggle { display: block; }

  .site-header__inner { flex-wrap: wrap; }

  .site-nav {
    flex-basis: 100%;
    display: none;
  }
  .site-nav[data-open='true'] { display: block; }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding-top: 1rem;
  }
  .site-nav li { border-top: 1px solid var(--rule); }
  .site-nav a {
    display: block;
    padding-block: 0.7rem;
    border-bottom: 0;
  }
}

/* Without JS the toggle button can't work, so show the nav inline instead. */
@media (max-width: 900px) {
  .no-js .nav-toggle { display: none; }
  .no-js .site-nav { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* --- print ---------------------------------------------------------------- */
@media print {
  /* The footer is the only place the address and phone number appear on 7 of
     the 8 pages, so it prints — flattened to plain text. */
  .site-nav, .nav-toggle, .map, .skip-link { display: none; }

  body { font-size: 11pt; line-height: 1.5; color: #000; background: #fff; }

  /* The fluid --step-* clamps are viewport-relative and blow out on a page. */
  h1, .page-title { font-size: 20pt; line-height: 1.2; }
  h2, .section-title { font-size: 15pt; line-height: 1.25; }
  h3, .subhead, .card__title { font-size: 12pt; }

  .site-footer {
    background: none;
    color: #000;
    border-top: 1px solid #000;
    padding-block: 1rem;
  }
  .site-footer::before { display: none; }
  .site-footer a { border-bottom: 0; }

  a[href^='http']::after { content: ' (' attr(href) ')'; font-size: 9pt; }

  .card, .grid, .split { break-inside: avoid; }
}
