/* Base UI — Variant A (sales polish, keep your colors via lotus vars where available)
   Goals:
   - Premium light UI (no black brick buttons)
   - Clean CTA hierarchy (primary/secondary)
   - Good card rhythm and predictable media
   - No “CTA stuck to far right edge”
*/

:root{
  --container-max: 1200px;
  --container-pad: 16px;

  --radius: 16px;
  --radius-sm: 12px;

  /* Prefer lotus-theme variables if present, fallback to your existing palette */
  --pp-ink: var(--lotus-ink, #111);
  --pp-paper: var(--lotus-paper, #efe4d1);
  --pp-card: var(--lotus-card, rgba(255,255,255,.72));
  --pp-card-border: var(--lotus-card-border, rgba(0,0,0,.12));

  /* Accent is taken from your kicker tone */
  --pp-accent: rgba(0,95,106,1);
  --pp-accent-weak: rgba(0,95,106,.14);

  --pp-muted: rgba(17,17,17,.72);
  --pp-border: rgba(17,17,17,.14);
  --pp-border-strong: rgba(17,17,17,.22);

  --focus-ring: rgba(0, 120, 255, .35);

  /* Header palette */
  --hdr-bg: rgba(239,228,209,.72);
  --hdr-border: rgba(17,17,17,.10);
  --hdr-ink: var(--lotus-ink, #111);
  --hdr-link: rgba(17,17,17,.78);
  --hdr-link-hover: rgba(17,17,17,.95);

  /* Sizing tokens */
  --logo-size: 56px;
  --logo-size-mobile: 46px;

  /* Hero video height (2x) */
  --hero-video-h: clamp(480px, 84vw, 1120px);
  --hero-video-h-mobile: clamp(360px, 70vw, 720px);
}

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

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

body{
  margin: 0;
  color: var(--pp-ink);
  background: #fff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

img, svg, video{ max-width: 100%; height: auto; display: block; }

a{ color: inherit; text-decoration-thickness: from-font; text-underline-offset: 0.18em; }
a:hover{ text-decoration-thickness: 2px; }

.container{
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.section{ padding: 28px 0; }
@media (min-width: 768px){
  :root{ --container-pad: 24px; }
  .section{ padding: 56px 0; }
}

/* Typography */
h1,h2,h3,h4{
  margin: 0 0 .55em;
  line-height: 1.12;
  letter-spacing: -0.012em;
}
p{ margin: 0 0 1em; color: var(--pp-muted); }

.kicker{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(0,95,106,.88);
}
.lead{
  font-size: 16px;
  color: var(--pp-muted);
}
@media (min-width: 768px){
  .lead{ font-size: 18px; }
}

/* Layout helpers */
.grid{
  display: grid;
  gap: 18px;
}
@media (min-width: 768px){
  .grid{ gap: 24px; }
}

/* Page title block: CTA must NOT float at far right */
.pageTitle{
  display: grid;
  gap: 12px;
  align-items: start;
}
.pageTitle > a.btn,
.pageTitle > .btn{
  justify-self: start;
  text-decoration: none;
  margin-top: 14px;
}
@media (min-width: 901px){
  .pageTitle{
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .pageTitle > a.btn,
  .pageTitle > .btn{
    justify-self: end;
    margin-top: 0;
  }
}

/* Buttons (PRIMARY = accent, not black) */
button,
input[type="button"],
input[type="submit"],
input[type="reset"]{ font: inherit; }

.btn,
button,
input[type="submit"],
input[type="button"],
input[type="reset"]{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 12px 16px;
  min-height: 44px;

  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,.06);

  background: var(--pp-accent);
  color: #fff;

  cursor: pointer;
  user-select: none;
  text-decoration: none;

  box-shadow: 0 10px 22px rgba(0,0,0,.10);
  transition: transform .06s ease, opacity .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover{
  opacity: 1;
  box-shadow: 0 14px 26px rgba(0,0,0,.12);
}

.btn:active,
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active{ transform: translateY(1px); }

.btn[disabled],
button[disabled],
input[disabled]{ opacity: .55; cursor: not-allowed; box-shadow: none; }

/* Ghost / secondary */
.btn--ghost{
  background: transparent;
  color: var(--pp-accent);
  border-color: rgba(0,95,106,.28);
  box-shadow: none;
}
.btn--ghost:hover{
  background: rgba(0,95,106,.10);
  border-color: rgba(0,95,106,.40);
  box-shadow: none;
}

/* Small buttons */
.btn--sm{
  padding: 10px 14px;
  min-height: 40px;
  border-radius: 14px;
}

/* Forms */
label{ display: block; margin: 0 0 6px; font-weight: 600; }

input,
select,
textarea{
  width: 100%;
  font: inherit;
  color: inherit;

  padding: 12px 14px;
  min-height: 44px;

  border-radius: var(--radius-sm);
  border: 1px solid var(--pp-border);
  background: #fff;

  transition: border-color .12s ease, box-shadow .12s ease;
}

textarea{ min-height: 120px; resize: vertical; }

input::placeholder,
textarea::placeholder{ color: rgba(17,17,17,.45); }

input:focus,
select:focus,
textarea:focus{ outline: none; }

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
.btn:focus-visible{
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-color: rgba(0,120,255,.55);
}

/* Error hooks */
.is-error,
input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"]{
  border-color: rgba(220, 53, 69, .65);
}
.form-error{
  margin-top: 6px;
  font-size: 14px;
  color: rgba(220, 53, 69, .95);
}

/* Cards — premium rhythm */
.card{
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--pp-card-border);
  background: var(--pp-card);
  box-shadow: 0 18px 48px rgba(0,0,0,.10);
}

.card__media{
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(0,0,0,.04);
}
.card__media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__body{
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.card__top{
  display: grid;
  gap: 6px;
}

.card__title a{
  text-decoration: none;
}
.card__title a:hover{
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.card__desc{
  margin: 0;
  min-height: 3.2em; /* keeps cards even */
  color: var(--pp-muted);
}

/* CTA: consistent two buttons */
.card__actions{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.card__actions .btn{
  flex: 1 1 220px;
}

/* Pills (if present) */
.pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--pp-border);
  background: rgba(255,255,255,.55);
  color: rgba(0,0,0,.74);
  font-size: 13px;
}
.pill--soft{
  background: rgba(0,95,106,.08);
  border-color: rgba(0,95,106,.18);
  color: rgba(0,95,106,.92);
}

/* Header / footer safety */
.site-header, header,
.site-footer, footer{ width: 100%; }

/* Mobile menu: respect hidden attribute */
.mobileMenu[hidden]{ display: none !important; }

/* ===========================================================
   Header (single source of truth)
   =========================================================== */

.header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--hdr-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hdr-border);
  overflow: visible;
}

/* One row: brand | nav | actions */
.header__inner{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;

  /* keep header tight; no giant padding */
  min-height: calc(var(--logo-size) + 16px);
  padding: 8px 0;
}

/* Brand */
.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  line-height: 1;
}

.brand__name{
  font-weight: 800;
  letter-spacing: .02em;
}

/* Logo holder */
.brand__mark{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: var(--logo-size);
  height: var(--logo-size);

  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;

  line-height: 0;
  flex: 0 0 var(--logo-size);
}

/* If old theme drew dot via pseudo-elements, disable */
.brand__mark::before,
.brand__mark::after{
  content: none !important;
  display: none !important;
}

.site-logo{
  width: var(--logo-size);
  height: var(--logo-size);
  display: block;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.18));
}

/* Center nav */
.header nav,
.header .nav{
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.55);
}

.header nav a,
.header .nav a{
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 650;
  color: var(--hdr-link);
  transition: background-color .12s ease, color .12s ease, transform .06s ease;
}
.header nav a:hover,
.header .nav a:hover{
  background: rgba(0,0,0,.06);
  color: var(--hdr-link-hover);
}
.header nav a:active,
.header .nav a:active{ transform: translateY(1px); }

/* Right actions */
.header__actions,
.header .actions{
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Header buttons must match logo height */
.header .btn,
.header button.btn,
.header a.btn{
  min-height: var(--logo-size);
  height: var(--logo-size);
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.60);
  color: var(--hdr-ink);
  border: 1px solid rgba(17,17,17,.16);
  box-shadow: none;
}
.header .btn:hover,
.header a.btn:hover{
  background: rgba(255,255,255,.78);
  border-color: rgba(17,17,17,.22);
}

@media (min-width: 901px){
  .burger{ display: none !important; }
  .mobileMenu{ display: none !important; }
}

@media (max-width: 900px){
  :root{ --logo-size: var(--logo-size-mobile); }

  /* Hide pill-nav on mobile; keep brand + actions + burger if exists */
  .header nav,
  .header .nav{ display: none; }

  .header__inner{
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }

  .header .btn,
  .header button.btn,
  .header a.btn{
    min-height: var(--logo-size);
    height: var(--logo-size);
    padding: 0 14px;
  }
}

/* ===========================================================
   Hero: video as a block. Content is immediately BELOW video.
   =========================================================== */

/* Remove any top “air” between header and hero */
main{ padding-top: 0; }

.hero{
  padding: 0;
  margin: 0;
}

/* Video block */
.hero__video{
  display: block;
  width: 100%;
  height: var(--hero-video-h);
  object-fit: cover;
}

/* Content block below video */
.hero > .container{
  padding-top: 18px;
  padding-bottom: 22px;
}

.hero__wrap{
  border-radius: 22px;
  overflow: hidden;
}
.hero__grid{
  display: grid;
  gap: 18px;
  padding-top: 0;
}
.hero__content{
  padding: 18px 16px 16px;
}
@media (min-width: 901px){
  .hero__content{ padding: 26px 26px 22px; }
}

@media (max-width: 640px){
  .hero__video{ height: var(--hero-video-h-mobile); }
  .hero > .container{
    padding-top: 14px;
    padding-bottom: 18px;
  }
}

/* Hero stats: readable stat cards (centered, scannable) */
.hero__stats{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  gap: 12px;
  margin-top: 16px;

  justify-content: center;
  align-items: stretch;
  text-align: center;
}

.stat{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(17,17,17,.14);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(8px);
}

.stat b{
  display: block;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: rgba(17,17,17,.92);
  margin-bottom: 6px;
}

.stat .muted{
  display: block;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(17,17,17,.70);
  margin: 0;
}

/* breakpoints */
@media (max-width: 900px){
  .hero__stats{ grid-template-columns: repeat(2, minmax(0, 240px)); }
}
@media (max-width: 520px){
  .hero__stats{ grid-template-columns: 1fr; }
}

/* Hero CTA centered */
.hero__actions{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.hero__actions .btn{ min-width: 220px; }
@media (max-width: 520px){
  .hero__actions .btn{
    width: 100%;
    min-width: 0;
  }
}

/* Gallery (if used) */
.gallery{
  position: relative;
  z-index: 5;
  background: #fff;
  padding: 32px;
  margin: 48px 0;
  border-radius: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Hotfix: Safari broken-image placeholders (empty src / no src) */
img:not([src]),
img[src=""]{
  display: none !important;
}
