/* ============================================================
   Petrona Construction — static site styles
   Recreated from the Shopify (Dawn-based) theme.
   Fonts: Jost (headings) / Inter (body)
   Active color scheme: black background, off-white text,
   teal (#103948 / #18566c) and rust (#bc5631) accents.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #000000;
  --bg-elevated: #0c0c0c;
  --text: #fcfcfc;
  --muted: rgba(252, 252, 252, 0.66);
  --teal-deep: #103948;
  --teal: #18566c;
  --rust: #bc5631;
  --line: rgba(252, 252, 252, 0.14);

  --page-width: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --btn-radius: 14px;

  --font-head: "Jost", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }

.caption {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 1rem;
}

.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); }

/* ---------- Layout helpers ---------- */
.page-width {
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--tight { padding-block: clamp(1.5rem, 3vw, 2.5rem); }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  border: 1px solid var(--text);
  background: var(--text);
  color: #000;
  cursor: pointer;
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.button:hover { background: #fff; color: #000; }

.button--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}
.button--outline:hover { background: var(--text); color: #000; }

.button--accent {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}
.button--accent:hover { background: #a8482a; border-color: #a8482a; color: #fff; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 90px;            /* desktop nav bar: max 100px */
  padding-block: 0.5rem;
}
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { width: auto; height: 58px; max-width: 220px; }
.site-header__logo .logo-fallback {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.site-nav a {
  font-size: 0.93rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding-block: 0.4rem;
  transition: color 0.25s ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 24px;
  margin-inline: auto;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
/* Hamburger morphs into an X when the menu is open */
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Dimming overlay behind the open mobile menu (click to close) */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 40;            /* below header (50), above page content */
}
.nav-overlay.is-open { opacity: 1; visibility: visible; }
body.nav-open { overflow: hidden; }   /* lock background scroll while menu is open */

@media (max-width: 749px) {
  .site-header__inner { height: 50px; padding-block: 0.25rem; }   /* mobile nav bar: max 50px */
  .site-header__logo img { height: 34px; }
  .nav-toggle { display: flex; width: 40px; height: 40px; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #000;
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .site-nav.is-open { max-height: 60vh; }
  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .site-nav a { display: block; width: 100%; padding-block: 0.85rem; font-size: 1rem; }
}

/* ============================================================
   Rich text blocks
   ============================================================ */
.rich-text { text-align: left; }
.rich-text--center { text-align: center; }
.rich-text__inner { max-width: 760px; }
.rich-text--center .rich-text__inner { margin-inline: auto; }
.rich-text h2 { margin-bottom: 0.5rem; }
.rich-text .lead { margin: 0; }

/* ============================================================
   Video / media hero
   ============================================================ */
.media-hero {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a, #14323d);
  overflow: hidden;
}
.media-hero video,
.media-hero img {
  width: 100%;
  height: clamp(440px, 64vw, 880px);
  object-fit: cover;
  display: block;
}
.media-hero__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(440px, 64vw, 880px);
  color: var(--muted);
  font-family: var(--font-head);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.9rem;
}
.media-hero__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 55%);
  pointer-events: none;
}
.media-hero__overlay .button { pointer-events: auto; }

/* ============================================================
   Combined image banner (two side-by-side panels)
   ============================================================ */
.combined-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.combined-banner__item {
  position: relative;
  min-height: clamp(560px, 66vw, 920px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  padding: clamp(2rem, 4vw, 3rem) 1.5rem;
  overflow: hidden;
  background-color: #14323d;
  background-size: cover;
  background-position: center;
}
.combined-banner__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0.15) 40%, rgba(0,0,0,0.4));
}
.combined-banner__content { position: relative; z-index: 2; margin-top: 1.25rem; }
.combined-banner__content h2 { color: #fff; margin-bottom: 0.5rem; }
.combined-banner__content p { color: #fff; margin-bottom: 1.75rem; }
.combined-banner__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 749px) {
  .combined-banner { grid-template-columns: 1fr; }
  .combined-banner__item { min-height: 580px; }
}

/* ============================================================
   Multicolumn (image cards + text columns)
   ============================================================ */
.multicolumn__grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 2.5rem);
}
.multicolumn__grid--2 { grid-template-columns: repeat(2, 1fr); }
.multicolumn__grid--3 { grid-template-columns: repeat(3, 1fr); }
.multicolumn__grid--4 { grid-template-columns: repeat(2, 1fr); }

.multicol-card { text-align: left; }
.multicol-card__media {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #14323d;
  background-size: cover;
  background-position: center;
  border-radius: 4px;
  overflow: hidden;
}
.multicol-card__media--square { aspect-ratio: 1 / 1; }
.multicol-card__title {
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  margin: 1rem 0 0.4rem;
}
.multicol-card__text { color: var(--muted); margin: 0; }
.multicol-card__text p { margin-bottom: 0.6rem; }

/* text-only columns (no media) */
.feature-col__title {
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  margin: 0 0 0.6rem;
}
.feature-col__text { color: var(--muted); margin: 0; }

@media (max-width: 989px) {
  .multicolumn__grid--3 { grid-template-columns: 1fr; gap: 1.75rem; }
}
@media (max-width: 749px) {
  .multicolumn__grid--2,
  .multicolumn__grid--4 { grid-template-columns: 1fr; }
}

/* ============================================================
   Custom image banner (background + foreground render)
   ============================================================ */
.custom-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(480px, 70vh, 820px);
  padding: clamp(3rem, 6vw, 5rem) var(--gutter);
  text-align: center;
  overflow: hidden;
  background-color: #0e2832;
  background-size: cover;
  background-position: center;
}
.custom-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.custom-banner__content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.custom-banner__content h2 { color: #fff; margin: 0; }
.custom-banner__content p { color: rgba(255,255,255,0.9); margin: 0; }
.custom-banner__foreground { max-width: min(640px, 80%); margin-top: 0.5rem; }
.custom-banner__buttons { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* ============================================================
   Slideshow
   ============================================================ */
.slideshow { position: relative; }
.slideshow__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.slideshow__track::-webkit-scrollbar { display: none; }
.slideshow__slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 16 / 9;
  background-color: #14323d;
  background-size: cover;
  background-position: center;
}
.slideshow__dots {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  padding-top: 1.25rem;
}
.slideshow__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1px solid var(--text);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.25s ease;
}
.slideshow__dot.is-active { background: var(--text); }

/* ============================================================
   Page / image banner (contact hero)
   ============================================================ */
.page-banner {
  position: relative;
  min-height: clamp(280px, 42vw, 460px);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0e2832;
  background-size: cover;
  background-position: center;
}
.page-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
}

/* ============================================================
   Contact form
   ============================================================ */
.contact-form { max-width: 720px; margin-inline: auto; }
.form-row { margin-bottom: 1.1rem; }
.form-row--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
.contact-form label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  transition: border-color 0.25s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--text);
}
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-form .button { margin-top: 0.5rem; }

@media (max-width: 600px) {
  .form-row--split { grid-template-columns: 1fr; }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  background: #000;
  padding-block: clamp(2rem, 4vw, 3rem);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: flex-start;
  justify-content: space-between;
}
.site-footer__brand img { width: 130px; }
.site-footer__brand .logo-fallback {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-footer__tagline { color: var(--muted); margin: 0.75rem 0 0; max-width: 28ch; }
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}
.footer-nav a { color: var(--muted); font-size: 0.92rem; transition: color 0.25s ease; }
.footer-nav a:hover { color: var(--text); }
.site-footer__contact { color: var(--muted); font-size: 0.92rem; }
.site-footer__contact a:hover { color: var(--text); }
.site-footer__bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
}
.site-footer__bottom a:hover { color: var(--text); }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Reveal on scroll (matches theme's animations_reveal_on_scroll) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}
