/* ==================================================
   CUSTOS FACADES
   Zero One global refinements
   ================================================== */

/*
 * No separator under the navigation: over a transparent navbar it draws a
 * hairline straight across the hero image.
 */

/* Sticky / non-transparent navbar */
.uk-navbar-container:not(.uk-navbar-transparent) {
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Warm body text on black and photographic sections */
.uk-light,
.uk-light p,
.uk-section-secondary,
.uk-section-secondary p {
  color: #E3E2DF;
}

/* Headings remain white on dark sections */
.uk-light h1,
.uk-light h2,
.uk-light h3,
.uk-light h4,
.uk-light h5,
.uk-light h6,
.uk-section-secondary h1,
.uk-section-secondary h2,
.uk-section-secondary h3,
.uk-section-secondary h4,
.uk-section-secondary h5,
.uk-section-secondary h6 {
  color: #FFFFFF;
}

/* Branded text selection */
::selection {
  background: #C00000;
  color: #FFFFFF;
}

/* Accessible keyboard focus */
:focus-visible {
  outline: 2px solid #CAAD79;
  outline-offset: 3px;
}

/* ==================================================
   HOMEPAGE HERO

   Section class: custos-hero
   Column class: custos-hero-content
   ================================================== */

.custos-hero-content {
  width: 100%;
  max-width: 960px;
}

/* Gold introductory tagline */
.custos-hero-content > p:first-child,
.custos-hero-content > :first-child > p:first-child {
  max-width: none;
  margin: 0 0 24px;
  color: #CAAD79 !important;
  font-family: "Bodoni Moda", serif;
  font-size: clamp(1.125rem, 1.4vw, 1.3rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
}

/* Main homepage heading */
.custos-hero h1 {
  max-width: 960px;
  margin: 0 0 26px;
  color: #FFFFFF;
  font-size: clamp(3.25rem, 4vw, 4rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* Hero supporting copy */
.custos-hero-content p {
  max-width: 610px;
  color: #E3E2DF;
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  line-height: 1.65;
}

/* Shared hero-button geometry */
.custos-hero .uk-button {
  width: auto;
  max-width: 100%;
  border-radius: 2px;
  box-sizing: border-box;
}

/*
 * Secondary hero button (outlined).
 * Targeted by button style, not by href, so the anchor can change freely.
 */
.custos-hero a.uk-button-default,
.custos-hero a.uk-button-default:visited {
  background: rgba(0, 0, 0, 0.18) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  box-shadow: none !important;
}

.custos-hero a.uk-button-default:hover,
.custos-hero a.uk-button-default:focus,
.custos-hero a.uk-button-default:active {
  background: #FFFFFF !important;
  color: #000000 !important;
  border-color: #FFFFFF !important;
}

/* ==================================================
   INTRODUCTION

   Section class: custos-intro
   Left column: custos-intro-copy
   Right column: custos-intro-image
   Image block: custos-intro-photo
   ================================================== */

.custos-intro {
  overflow: hidden;
  background: #F7F6F3;
}

/*
 * This class sits on the COLUMN, so a max-width here shrinks the column and
 * breaks the 50/50 split, pushing the image out of alignment. The individual
 * text elements below carry their own measure instead.
 */

/* Introduction eyebrow */
.custos-intro-copy > p:first-child,
.custos-intro-copy > :first-child > p:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: none;
  margin: 0 0 24px;
  color: #C00000 !important;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Short red rule after the eyebrow */
.custos-intro-copy > p:first-child::after,
.custos-intro-copy > :first-child > p:first-child::after {
  content: "";
  display: block;
  width: 36px;
  height: 1px;
  background: #C00000;
}

/* Introduction heading */
.custos-intro-copy h2 {
  max-width: 620px;
  margin: 0 0 28px;
  color: #000000;
  font-size: clamp(2.5rem, 3.2vw, 3.35rem);
  font-weight: 500;
  line-height: 1.07;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* Introduction body copy */
.custos-intro-copy p {
  max-width: 610px;
  color: #292826;
  font-size: clamp(1rem, 1.02vw, 1.075rem);
  line-height: 1.7;
}

/*
 * No divider between the columns. The grid gutter (padding-left) must stay:
 * zeroing it pulls the image column left, out of alignment with the page.
 */
.custos-intro-image {
  border: 0;
}

/* Image wrappers */
.custos-intro-photo,
.custos-intro-photo figure,
.custos-intro-photo picture {
  display: block;
  width: 100%;
  margin: 0;
}

/* Preserve the photograph's natural proportions */
.custos-intro-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  border-radius: 2px;
}

/* ==================================================
   SHARED SECTION TYPOGRAPHY

   Eyebrow block class: custos-eyebrow
     + custos-eyebrow-dark on black sections
   Heading block class: custos-section-h2
   ================================================== */

.custos-eyebrow p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  color: #C00000;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.custos-eyebrow p::after {
  content: "";
  display: block;
  width: 36px;
  height: 1px;
  background: currentColor;
}

/* Red is unreadable on black, so dark sections use the gold accent */
.custos-eyebrow-dark p {
  color: #CAAD79;
}

h2.custos-section-h2 {
  max-width: 20em;
  margin: 0 0 28px;
  font-size: clamp(2.625rem, 3.2vw, 3.375rem);
  font-weight: 500;
  line-height: 1.07;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* ==================================================
   PRODUCT PORTFOLIO  (black, three-column grid)

   Intro section: custos-portfolio-intro
   Grid rows:     custos-sys-grid
   Grid entry:    custos-sys-item
   ================================================== */

.custos-portfolio-intro {
  padding-bottom: 20px;
}

.custos-portfolio-lead p {
  max-width: 720px;
  margin: 0;
  color: #E3E2DF;
  font-size: clamp(1rem, 1.02vw, 1.075rem);
  line-height: 1.7;
}

/*
 * Grid rows carry no section padding of their own: vertical rhythm comes
 * from the entries, so consecutive rows read as one continuous grid.
 */
.custos-sys-grid {
  padding-top: 0;
  padding-bottom: 0;
}

.custos-sys-grid-last {
  padding-bottom: 34px;
}

/*
 * Photographs live in their own row, not inside the category grid. Sitting
 * beside a category they implied they illustrated it, which they don't —
 * they are section imagery. The gap above separates the two ideas.
 */
.custos-sys-photos {
  padding-top: 22px;
  padding-bottom: 26px;
}

/*
 * No full-width rules between rows: a line spanning all three columns made
 * the rows read as groups. Each entry is marked individually instead.
 */
.custos-sys-item {
  padding-top: 4px;
  padding-bottom: 34px;
}

h3.custos-sys-title {
  margin: 0 0 12px;
  color: #FFFFFF;
  font-size: 1.3125rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* Short red rule per entry — carries the rhythm without implying a sequence */
h3.custos-sys-title::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin: 0 0 18px;
  background: #C00000;
}

.custos-sys-desc p {
  margin: 0;
  color: #E3E2DF;
  font-size: 0.9375rem;
  line-height: 1.7;
}

/*
 * Portrait photographs completing the final grid row.
 * These sources are portrait (~2:3), so they are shown at their own
 * proportions — no forced landscape ratio, no cropping, no upscaling.
 */
.custos-sys-portrait {
  max-width: none !important;
  margin: 0;
}

/*
 * Both sources are close to 2:3 (0.649 and 0.667) but not identical, which
 * left the two photographs at different heights. A shared 2:3 frame lines
 * their bases up; the wider of the two loses ~2.6% of its height, which is
 * imperceptible — unlike forcing a landscape ratio onto a portrait.
 */
.custos-sys-portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 2px;
}

/* ==================================================
   IMAGE BANDS

   custos-figure-band  — contained figure, shown uncropped
   custos-band         — full-bleed background image
   ================================================== */

/*
 * Lead image for Project Support. It sits below that section's heading and
 * on the same container axis as the text, so it reads as part of the section
 * rather than floating between two others. Shown in full — the drawing
 * resolving into a photograph is the point, so it is never cropped.
 */
.custos-figure-band {
  padding-top: 28px;
  padding-bottom: 4px;
}

.custos-figure-wide {
  max-width: none !important;
  margin: 0;
}

.custos-figure-wide img {
  display: block;
  width: 100%;
  height: auto;
}

.custos-band {
  min-height: 520px;
  padding-top: 0;
  padding-bottom: 0;
}

/* ==================================================
   PROJECT SUPPORT  (warm light, four steps)
   ================================================== */

.custos-support-intro {
  padding-bottom: 8px;
}

.custos-support {
  padding-top: 40px;
}

/*
 * The divider is drawn by the container, not by the columns. A border on a
 * grid column spans its border box, which includes UIkit's gutter padding —
 * that made the rule overshoot the left gutter and stop short on the right.
 * An in-flow ::before inside .uk-container is laid out in the container's
 * content box, so it matches the text axis at every breakpoint by itself.
 */
.custos-support .uk-container::before,
.custos-clients .uk-container::before {
  content: "";
  display: block;
  height: 1px;
  background: #D2CEC7;
  margin-bottom: 42px;
}

.custos-step {
  padding-top: 0;
}

.custos-step-num p {
  margin: 0 0 14px;
  color: #C00000;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

h3.custos-step-title {
  margin: 0 0 10px;
  color: #000000;
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.custos-step-desc p {
  margin: 0;
  color: #625F5B;
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ==================================================
   WHO WE WORK WITH  (muted, quietest section)
   ================================================== */

.custos-clients-intro {
  padding-bottom: 8px;
}

.custos-clients {
  padding-top: 24px;
}

/* Divider comes from .custos-clients .uk-container::before — see above */
.custos-client-col {
  padding-top: 0;
}

h3.custos-client-title {
  margin: 0 0 10px;
  color: #000000;
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.custos-client-desc p {
  margin: 0;
  color: #625F5B;
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ==================================================
   CONTACT  (black)
   ================================================== */

/*
 * Address and phone live in the footer only — not repeated here.
 * Centred: as a short closing statement, left-aligning it left ~52% of a
 * 627px-tall black band empty, which read as a hole in the final CTA.
 */
.custos-contact .uk-container {
  text-align: center;
}

.custos-contact .custos-eyebrow p {
  justify-content: center;
}

.custos-contact h2.custos-section-h2 {
  max-width: 22em;
  margin-left: auto;
  margin-right: auto;
}

.custos-contact-lead p {
  max-width: 600px;
  margin: 0 auto;
  color: #E3E2DF;
  font-size: clamp(1.0625rem, 1.15vw, 1.1875rem);
  line-height: 1.7;
}

/* ==================================================
   FOOTER

   Section class: custos-footer
   Brand column: custos-footer-brand
   Info columns: custos-footer-col
   ================================================== */

.custos-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.custos-footer-logo img {
  width: 100%;
  max-width: 240px;
  height: auto;
}

/* Gold italic brand line, matching the hero */
.custos-footer-tagline p {
  margin: 22px 0 0;
  color: #CAAD79;
  font-family: "Bodoni Moda", serif;
  font-size: 1.0625rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
}

.custos-footer-col p {
  margin: 0;
  color: #E3E2DF;
  font-size: 0.9375rem;
  line-height: 1.8;
}

.custos-footer-col a {
  color: #E3E2DF;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.custos-footer-col a:hover,
.custos-footer-col a:focus {
  color: #FFFFFF;
  border-bottom-color: #FFFFFF;
}

/* Subfooter: copyright line */
.custos-subfooter {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.custos-subfooter-col p {
  margin: 0;
  color: #625F5B;
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* ==================================================
   TABLET
   ================================================== */

@media (max-width: 1099px) {
  /*
   * Transparent navbar overlays the hero.
   * Reserve space below the tablet navbar.
   */
  .custos-hero {
    padding-top: 132px !important;
    padding-bottom: 76px !important;
  }

  .custos-hero-content {
    width: 100%;
    max-width: 700px;
  }

  .custos-hero h1 {
    max-width: 680px;
    font-size: clamp(2.75rem, 5.7vw, 3.35rem);
    line-height: 1.06;
    letter-spacing: -0.028em;
  }

  .custos-hero-content p {
    max-width: 590px;
  }

  /* Introduction stacks into one contained column */
  .custos-intro-copy {
    max-width: 700px;
    padding-right: 0;
  }

  .custos-intro-copy h2 {
    max-width: 660px;
    font-size: clamp(2.4rem, 5vw, 3rem);
  }

  .custos-intro-image {
    margin-top: 42px;
  }

  /*
   * Portfolio cards go single-column below desktop. Each grid row is its own
   * three-column section, so a two-up layout strands every third card.
   */
  .custos-sys-item {
    margin-top: 26px;
  }

  .custos-sys-grid .custos-sys-item:first-child {
    margin-top: 0;
  }

  /* three-up throughout, so no wrap margin is needed until they stack */
  .custos-sys-photos .custos-sys-photo {
    margin-top: 0;
  }

  /*
   * Once the columns wrap, one rule above the row no longer separates them,
   * so each entry carries its own. An in-flow ::before sits in the column's
   * content box, so it lines up with the text instead of bleeding into the
   * gutter the way a border would.
   */
  .custos-support .uk-container::before,
  .custos-clients .uk-container::before {
    display: none;
  }

  .custos-step,
  .custos-client-col {
    margin-top: 30px;
  }

  .custos-step::before,
  .custos-client-col::before {
    content: "";
    display: block;
    height: 1px;
    margin-bottom: 24px;
    background: #D2CEC7;
  }

  .custos-band {
    min-height: 380px;
  }

  /*
   * Portraits drop below their category once the row stops being side-by-side.
   * Scoped to the grid so it outranks UIkit's .uk-grid-margin.
   */
  .custos-sys-grid .custos-sys-photo {
    margin-top: 16px;
  }
}

/* ==================================================
   MOBILE
   ================================================== */

@media (max-width: 639px) {
  .custos-hero {
    padding-top: 126px !important;
    padding-bottom: 68px !important;
  }

  .custos-hero-content {
    width: 100%;
    max-width: 100%;
  }

  /* Mobile tagline */
  .custos-hero-content > p:first-child,
  .custos-hero-content > :first-child > p:first-child {
    margin-bottom: 18px;
    font-size: 1.05rem;
    line-height: 1.3;
  }

  /* Mobile H1 */
  .custos-hero h1 {
    max-width: 100%;
    margin-bottom: 22px;
    font-size: clamp(2.25rem, 9.5vw, 2.75rem);
    line-height: 1.06;
    letter-spacing: -0.025em;
    text-wrap: pretty;
  }

  /* Mobile hero copy */
  .custos-hero-content p {
    max-width: none;
    font-size: 1rem;
    line-height: 1.55;
  }

  /* Compact mobile buttons */
  .custos-hero .uk-button,
  .custos-hero .uk-button-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    max-width: 100%;
    min-height: 48px;
    padding: 0 22px !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
    white-space: normal;
  }

  .custos-intro-copy {
    max-width: none;
    padding-right: 0;
  }

  /* Mobile introduction eyebrow */
  .custos-intro-copy > p:first-child,
  .custos-intro-copy > :first-child > p:first-child {
    margin-bottom: 20px;
    font-size: 0.74rem;
  }

  /* Mobile introduction heading */
  .custos-intro-copy h2 {
    max-width: none;
    margin-bottom: 24px;
    font-size: clamp(2.1rem, 8.6vw, 2.5rem);
    line-height: 1.08;
    letter-spacing: -0.026em;
  }

  /* Mobile introduction copy */
  .custos-intro-copy p {
    max-width: none;
    font-size: 1rem;
    line-height: 1.65;
  }

  .custos-intro-image {
    margin-top: 34px;
  }

  .custos-intro-photo img {
    width: 100%;
    height: auto;
  }

  /* ---- Product Portfolio ---- */
  .custos-sys-item {
    padding-top: 2px;
    padding-bottom: 28px;
  }

  h3.custos-sys-title {
    font-size: 1.25rem;
  }

  h3.custos-sys-title::before {
    margin-bottom: 14px;
  }

  .custos-band {
    min-height: 260px;
  }

  .custos-sys-desc p {
    font-size: 1rem;
    line-height: 1.65;
  }

  /* ---- Shared headings ---- */
  h2.custos-section-h2 {
    max-width: none;
    margin-bottom: 24px;
    font-size: clamp(2.125rem, 8.6vw, 2.5rem);
    line-height: 1.08;
    letter-spacing: -0.026em;
  }

  .custos-eyebrow p {
    margin-bottom: 20px;
    font-size: 0.74rem;
  }

  .custos-sys-photos .custos-sys-photo {
    margin-top: 22px;
  }

  /* ---- Project Support / Clients ---- */
  .custos-step,
  .custos-client-col {
    margin-top: 26px;
  }

  .custos-step::before,
  .custos-client-col::before {
    margin-bottom: 20px;
  }
}