
/* :::SECTION:Design Tokens::: */
:root {
  --font-display: 'Barlow Condensed', sans-serif;
  --font-accent: 'Cormorant Garamond', serif;
}

/* :::SECTION:Reset & Base::: */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-display);
  font-size: var(--wp--preset--font-size--base);
  color: var(--wp--preset--color--color-cream);
  background-color: var(--wp--preset--color--color-deep-rich);
  overflow-x: hidden;
}

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

/* :::SECTION:Scroll Animations::: */
.animate-on-scroll {
  opacity: 1;
  transform: translateY(0);
}

.js .animate-on-scroll:not(.is-visible) {
  opacity: 0;
  transform: translateY(30px);
}

.js .animate-on-scroll {
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.js .animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.js .animate-on-scroll:nth-child(2) { transition-delay: 0.15s; }
.js .animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.js .animate-on-scroll:nth-child(4) { transition-delay: 0.45s; }

/* :::SECTION:Hero::: */
.hero {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(4rem, 1fr) auto;
  gap: var(--wp--preset--spacing--30);
  min-height: 100vh;
  background-color: var(--wp--preset--color--color-deep);
  overflow: clip;
  font-family: var(--font-display);
  color: var(--wp--preset--color--color-cream);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% 45%, rgba(13, 30, 51, 0.55) 0%, rgba(13, 30, 51, 0.75) 50%, rgba(13, 30, 51, 0.92) 100%),
    linear-gradient(to bottom, rgba(232, 88, 46, 0.08) 0%, transparent 40%, transparent 60%, rgba(13, 30, 51, 0.4) 100%);
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.03;
  z-index: 2;
  pointer-events: none;
}

.hero-top {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--40) 0;
  animation: fadeSlideDown 1s ease-out 0.2s both;
}

.hero-coming-soon {
  font-family: var(--font-display);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--wp--preset--color--color-sand);
  margin: 0;
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
  text-align: center;
}

.hero-tagline {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  font-size: var(--wp--preset--font-size--3xl);
  color: var(--wp--preset--color--color-sand);
  margin: 0 0 var(--wp--preset--spacing--30) 0;
  letter-spacing: 0.03em;
  animation: fadeSlideUp 0.9s ease-out 0.5s both;
}

.hero-headline {
  margin: 0;
  line-height: 0.82;
  text-align: center;
  animation: fadeScale 1.1s ease-out 0.7s both;
}

.hero-line-sup {
  display: block;
  font-family: var(--font-display);
  font-size: var(--wp--preset--font-size--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--wp--preset--color--color-cream);
}

.hero-line-amp {
  display: block;
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  font-size: var(--wp--preset--font-size--ampersand);
  color: var(--wp--preset--color--color-sunset);
  line-height: 1.2;
  margin: var(--wp--preset--spacing--20) 0;
  position: relative;
}

.hero-line-amp::before,
.hero-line-amp::after {
  content: '';
  display: inline-block;
  width: clamp(40px, 8vw, 100px);
  height: 1px;
  background: var(--wp--preset--color--color-sunset);
  vertical-align: middle;
  opacity: 0.5;
}

.hero-line-amp::before { margin-right: var(--wp--preset--spacing--30); }
.hero-line-amp::after { margin-left: var(--wp--preset--spacing--30); }

.hero-line-away {
  display: block;
  font-family: var(--font-display);
  font-size: var(--wp--preset--font-size--display);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wp--preset--color--color-cream);
}

.hero-bottom {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wp--preset--spacing--30);
  padding: 0 var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
  animation: fadeSlideUp 0.9s ease-out 1.2s both;
}

.hero-horizon {
  width: clamp(60px, 12vw, 120px);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--wp--preset--color--color-sunset), transparent);
}

.hero-subtext {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--wp--preset--font-size--lg);
  color: var(--wp--preset--color--color-sand-dim);
  margin: 0;
  letter-spacing: 0.02em;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeScale {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

/* :::SECTION:Story Section::: */
.story {
  position: relative;
  padding: var(--wp--preset--spacing--65) var(--wp--preset--spacing--40);
  background: var(--wp--preset--color--color-deep-rich);
}

.story::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--wp--preset--color--color-sand-dim), transparent);
}

.story-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: var(--wp--preset--spacing--60);
  align-items: center;
}

.story-text {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--40);
}

.story-label {
  font-family: var(--font-display);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--wp--preset--color--color-sunset);
}

.story-headline {
  font-family: var(--font-accent);
  font-weight: 400;
  font-style: italic;
  font-size: var(--wp--preset--font-size--story-headline);
  line-height: 1.1;
  color: var(--wp--preset--color--color-cream);
  letter-spacing: -0.01em;
}

.story-line-1,
.story-line-2,
.story-line-3 {
  display: block;
}

.story-line-2 {
  color: var(--wp--preset--color--color-sand);
}

.story-body {
  font-family: var(--font-accent);
  font-size: var(--wp--preset--font-size--xl);
  line-height: 1.7;
  color: var(--wp--preset--color--color-sand-dim);
  max-width: 480px;
}

.story-image {
  position: relative;
}

.story-image-frame {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 3/4;
}

.story-image-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(201, 184, 161, 0.1);
  border-radius: 2px;
  pointer-events: none;
}

.story-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.story-image-frame:hover img {
  transform: scale(1.04);
}

/* :::SECTION:Pillars Section::: */
.pillars {
  position: relative;
  padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40) var(--wp--preset--spacing--65);
  background: var(--wp--preset--color--color-deep);
}

.pillars-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--wp--preset--spacing--40);
  margin-bottom: var(--wp--preset--spacing--60);
}

.pillars-line {
  width: clamp(40px, 10vw, 120px);
  height: 1px;
  background: var(--wp--preset--color--color-sand-dim);
}

.pillars-label {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--wp--preset--font-size--2xl);
  color: var(--wp--preset--color--color-sand);
  letter-spacing: 0.05em;
}

.pillars-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--wp--preset--spacing--50);
}

.pillar {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--30);
  padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
  position: relative;
  border-top: 1px solid rgba(232, 88, 46, 0.25);
  transition: border-color 0.5s ease;
}

.pillar:hover {
  border-top-color: var(--wp--preset--color--color-sunset);
}

.pillar-number {
  font-family: var(--font-display);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--wp--preset--color--color-sunset);
  opacity: 0.6;
}

.pillar-title {
  font-family: var(--font-display);
  font-size: var(--wp--preset--font-size--pillar-title);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--wp--preset--color--color-cream);
}

.pillar-text {
  font-family: var(--font-accent);
  font-size: var(--wp--preset--font-size--lg);
  line-height: 1.65;
  color: var(--wp--preset--color--color-sand-dim);
}

/* :::SECTION:Atmosphere Section::: */
.atmosphere {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--wp--preset--color--color-deep);
  overflow: clip;
}

.atmosphere::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, var(--wp--preset--color--color-deep-rich) 0%, rgba(9, 21, 38, 0.4) 30%, rgba(9, 21, 38, 0.4) 70%, var(--wp--preset--color--color-deep-rich) 100%),
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 0%, rgba(9, 21, 38, 0.6) 100%);
  z-index: 1;
}

.atmosphere-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--wp--preset--spacing--65) var(--wp--preset--spacing--40);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wp--preset--spacing--40);
}

.atmosphere-tagline {
  font-family: var(--font-display);
  font-size: var(--wp--preset--font-size--huge);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wp--preset--color--color-cream);
  line-height: 1.15;
}

.atmosphere-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--wp--preset--color--color-sunset), transparent);
}

.atmosphere-sub {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--wp--preset--font-size--2xl);
  color: var(--wp--preset--color--color-sand);
  letter-spacing: 0.03em;
}

/* :::SECTION:Footer::: */
.site-footer {
  position: relative;
  padding: var(--wp--preset--spacing--65) var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
  background: var(--wp--preset--color--color-deep-rich);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--wp--preset--color--color-sand-dim), transparent);
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wp--preset--spacing--40);
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: baseline;
  gap: var(--wp--preset--spacing--20);
}

.footer-logo-sup {
  font-family: var(--font-display);
  font-size: var(--wp--preset--font-size--footer-brand);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--wp--preset--color--color-cream);
}

.footer-logo-amp {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: calc(var(--wp--preset--font-size--footer-brand) * 0.6);
  color: var(--wp--preset--color--color-sunset);
}

.footer-logo-away {
  font-family: var(--font-display);
  font-size: var(--wp--preset--font-size--footer-brand);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wp--preset--color--color-cream);
}

.footer-horizon {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--wp--preset--color--color-sunset), transparent);
}

.footer-note {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--wp--preset--font-size--lg);
  color: var(--wp--preset--color--color-sand-dim);
  letter-spacing: 0.02em;
}

.footer-copy {
  font-family: var(--font-display);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(201, 184, 161, 0.3);
}

/* :::SECTION:Responsive Tablet::: */
@media (max-width: 1024px) {
  .hero {
    --font-size-display: clamp(4rem, 15vw, 10rem);
    --font-size-ampersand: clamp(2rem, 5vw, 3.5rem);
  }

  .hero-bottom {
    padding-bottom: var(--wp--preset--spacing--40);
  }

  .story-inner {
    grid-template-columns: 1fr 0.9fr;
    gap: var(--wp--preset--spacing--50);
  }

  .pillars-grid {
    gap: var(--wp--preset--spacing--40);
  }

  .pillar {
    padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
  }
}

/* :::SECTION:Responsive Mobile::: */
@media (max-width: 768px) {
  .hero {
    --font-size-display: clamp(3.5rem, 20vw, 6rem);
    --font-size-ampersand: clamp(1.8rem, 5vw, 2.5rem);
    --font-size-3xl: clamp(1.2rem, 3vw, 1.6rem);
  }

  .hero-content {
    padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--30);
  }

  .hero-headline {
    line-height: 0.85;
  }

  .hero-line-amp::before,
  .hero-line-amp::after {
    width: 30px;
  }

  .hero-bottom {
    padding-bottom: var(--wp--preset--spacing--40);
  }

  .story {
    padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--30);
  }

  .story-inner {
    grid-template-columns: 1fr;
    gap: var(--wp--preset--spacing--50);
  }

  .story-text {
    order: 1;
  }

  .story-image {
    order: 2;
    max-width: 400px;
    margin: 0 auto;
  }

  .story-body {
    max-width: none;
  }

  .pillars {
    padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--30) var(--wp--preset--spacing--60);
  }

  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 480px;
  }

  .pillar {
    padding: var(--wp--preset--spacing--40) 0;
    border-top: 1px solid rgba(232, 88, 46, 0.15);
  }

  .atmosphere {
    min-height: 50vh;
  }

  .atmosphere-content {
    padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--30);
  }

  .site-footer {
    padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
  }
}

/* :::SECTION:Responsive Small Mobile::: */
@media (max-width: 480px) {
  .hero {
    --font-size-display: clamp(2.8rem, 22vw, 4.5rem);
    --font-size-ampersand: clamp(1.5rem, 6vw, 2rem);
    --font-size-3xl: 1.1rem;
  }

  .hero-top {
    padding-top: var(--wp--preset--spacing--30);
  }

  .hero-line-away {
    letter-spacing: 0.04em;
  }

  

  .pillars-header {
    margin-bottom: var(--wp--preset--spacing--50);
  }
}

/* :::SECTION:Hero::: */

/* Hero section: grid layout is in original CSS, block uses layout:default — no conflict */

:root :where(.hero-top) {
  display: flex;
  justify-content: center;
  padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--40) 0;
}

:root :where(.hero-content) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
  text-align: center;
}

:root :where(.hero-tagline) {
  margin: 0 0 var(--wp--preset--spacing--30) 0;
}

:root :where(.hero-bottom) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wp--preset--spacing--30);
  padding: 0 var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
}

/* Hero horizon decorative line */
:root :where(.hero-horizon) {
  width: clamp(60px, 12vw, 120px);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--wp--preset--color--color-sunset), transparent);
}

/* Footer brand: WordPress wraps in <p> with text-align center, but original uses flex */
:root :where(.footer-brand) {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--wp--preset--spacing--20);
}

:root :where(.footer-brand a) {
  display: flex;
  align-items: baseline;
  gap: var(--wp--preset--spacing--20);
  text-decoration: none;
  color: inherit;
}

/* :::SECTION:Story Section::: */

:root :where(.story-inner) {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: var(--wp--preset--spacing--60);
  align-items: center;
}

:root :where(.story-text) {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--40);
}

:root :where(.story-image-frame) {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 3/4;
}

/* WordPress wraps img in <figure> — ensure figure fills the frame */
:root :where(.story-image-frame .wp-block-image) {
  height: 100%;
  margin: 0;
}

:root :where(.story-image-frame .wp-block-image img) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

:root :where(.story-image-frame:hover .wp-block-image img) {
  transform: scale(1.04);
}

/* :::SECTION:Pillars Section::: */

:root :where(.pillars-header) {
  gap: var(--wp--preset--spacing--40);
  margin-bottom: var(--wp--preset--spacing--60);
}

:root :where(.pillars-line) {
  width: clamp(40px, 10vw, 120px);
  height: 1px;
  background: var(--wp--preset--color--color-sand-dim);
}

:root :where(.pillars-grid) {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--wp--preset--spacing--50);
}

:root :where(.pillar) {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--30);
  padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
  position: relative;
  /* Derived from --color-sunset (#E8582E) */
  border-top: 1px solid rgba(232, 88, 46, 0.25);
  transition: border-color 0.5s ease;
}

:root :where(.pillar:hover) {
  border-top-color: var(--wp--preset--color--color-sunset);
}

:root :where(.pillar-number) {
  opacity: 0.6;
}

/* :::SECTION:Atmosphere Section::: */

:root :where(.atmosphere-content) {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--wp--preset--spacing--65) var(--wp--preset--spacing--40);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wp--preset--spacing--40);
}

:root :where(.atmosphere-divider) {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--wp--preset--color--color-sunset), transparent);
}

/* :::SECTION:Footer::: */

:root :where(.footer-inner) {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wp--preset--spacing--40);
  text-align: center;
}

:root :where(.footer-horizon) {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--wp--preset--color--color-sunset), transparent);
}

:root :where(.footer-copy) {
  /* Derived from --color-sand (#C9B8A1) */
  color: rgba(201, 184, 161, 0.3);
}

/* :::SECTION:Responsive Tablet::: */

@media (max-width: 1024px) {
  :root :where(.story-inner) {
    grid-template-columns: 1fr 0.9fr;
    gap: var(--wp--preset--spacing--50);
  }

  :root :where(.pillars-grid) {
    gap: var(--wp--preset--spacing--40);
  }

  :root :where(.pillar) {
    padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
  }
}

/* :::SECTION:Responsive Mobile::: */

@media (max-width: 768px) {
  :root :where(.story-inner) {
    grid-template-columns: 1fr;
    gap: var(--wp--preset--spacing--50);
  }

  :root :where(.story-text) {
    order: 1;
  }

  :root :where(.story-image) {
    order: 2;
    max-width: 400px;
    margin: 0 auto;
  }

  :root :where(.story-body) {
    max-width: none;
  }

  :root :where(.pillars-grid) {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 480px;
  }

  :root :where(.pillar) {
    padding: var(--wp--preset--spacing--40) 0;
    /* Derived from --color-sunset (#E8582E) */
    border-top: 1px solid rgba(232, 88, 46, 0.15);
  }
}

/* :::SECTION:Responsive Small Mobile::: */

@media (max-width: 480px) {
  :root :where(.pillars-header) {
    margin-bottom: var(--wp--preset--spacing--50);
  }
}

/* :::SECTION:Editor Fixes::: */

/* Grid/flex containers in editor */
.editor-styles-wrapper .story-inner {
  display: grid !important;
  grid-template-columns: 1fr 0.85fr !important;
  gap: var(--wp--preset--spacing--60) !important;
  align-items: center !important;
}

.editor-styles-wrapper .story-inner > .block-editor-block-list__block {
  margin: 0 !important;
}

.editor-styles-wrapper .story-text {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--wp--preset--spacing--40) !important;
}

.editor-styles-wrapper .story-text > .block-editor-block-list__block {
  margin: 0 !important;
}

.editor-styles-wrapper .pillars-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: var(--wp--preset--spacing--50) !important;
}

.editor-styles-wrapper .pillars-grid > .block-editor-block-list__block {
  margin: 0 !important;
}

.editor-styles-wrapper .pillar {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--wp--preset--spacing--30) !important;
}

.editor-styles-wrapper .pillar > .block-editor-block-list__block {
  margin: 0 !important;
}

.editor-styles-wrapper .pillars-header {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--wp--preset--spacing--40) !important;
}

.editor-styles-wrapper .pillars-header > .block-editor-block-list__block {
  margin: 0 !important;
}

.editor-styles-wrapper .hero-top {
  display: flex !important;
  justify-content: center !important;
}

.editor-styles-wrapper .hero-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.editor-styles-wrapper .hero-bottom {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: var(--wp--preset--spacing--30) !important;
}

.editor-styles-wrapper .hero-bottom > .block-editor-block-list__block {
  margin: 0 !important;
}

.editor-styles-wrapper .atmosphere-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: var(--wp--preset--spacing--40) !important;
}

.editor-styles-wrapper .atmosphere-content > .block-editor-block-list__block {
  margin: 0 !important;
}

.editor-styles-wrapper .footer-inner {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: var(--wp--preset--spacing--40) !important;
}

.editor-styles-wrapper .footer-inner > .block-editor-block-list__block {
  margin: 0 !important;
}

.editor-styles-wrapper .footer-brand {
  display: flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: var(--wp--preset--spacing--20) !important;
}

/* Editor margin parity */
.editor-styles-wrapper .pillars-header {
  margin-bottom: var(--wp--preset--spacing--60) !important;
}

.editor-styles-wrapper .hero-tagline {
  margin-bottom: var(--wp--preset--spacing--30) !important;
}

/* Editor responsive tablet */
@media (max-width: 1024px) {
  .editor-styles-wrapper .story-inner {
    grid-template-columns: 1fr 0.9fr !important;
    gap: var(--wp--preset--spacing--50) !important;
  }

  .editor-styles-wrapper .pillars-grid {
    gap: var(--wp--preset--spacing--40) !important;
  }
}

/* Editor responsive mobile */
@media (max-width: 768px) {
  .editor-styles-wrapper .story-inner {
    grid-template-columns: 1fr !important;
    gap: var(--wp--preset--spacing--50) !important;
  }

  .editor-styles-wrapper .pillars-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
}



/* WordPress Admin Bar Offset */
.admin-bar .nav,
.admin-bar [class*="nav"][style*="position: fixed"],
.admin-bar [class*="header"][style*="position: fixed"] {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .nav,
  .admin-bar [class*="nav"][style*="position: fixed"],
  .admin-bar [class*="header"][style*="position: fixed"] {
    top: 46px;
  }
}

/* Reset paragraph wrapper styles for inline content converted to wp:paragraph */
:where(.wp-block-paragraph) {
  margin: 0;
}

/* Reset WordPress button line-height to match original CSS */
.wp-block-button__link {
  line-height: normal;
}

/* CRITICAL: Reset WordPress button wrappers to prevent double styling. */
.wp-block-button {
  padding: 0 !important;
  background: none !important;
  border: none !important;
  margin: 0;
  box-shadow: none !important;
}

/* Navigation link styling - remove default underlines in nav contexts */
:where([class*="nav"] a),
:where([class*="nav"] .wp-block-paragraph a),
:where([class*="-link-wrapper"] a) {
  text-decoration: none;
}

/* Reset paragraph margins inside navigation */
:where([class*="nav"] .wp-block-paragraph) {
  margin: 0;
}

/* Editor-specific: override WordPress editor link styles */
.editor-styles-wrapper [class*="nav"] a,
.editor-styles-wrapper [class*="-link-wrapper"] a {
  text-decoration: none;
}

/* wp:navigation block resets */
:where(.wp-block-navigation),
:where(.wp-block-navigation-item__content) {
  font-family: inherit;
  text-decoration: none;
  color: inherit;
}

:where(.wp-block-navigation__container) {
  padding: 0;
}

/* Spacer inside navigation */
:where(.wp-block-navigation .wp-block-spacer) {
  flex-grow: 1;
  height: 0 !important;
  min-height: 0 !important;
}

/* Reset responsive container */
.wp-block-navigation .wp-block-navigation__responsive-container:not(.is-menu-open.is-menu-open) {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Desktop navigation layout */
.wp-block-navigation__responsive-container-content {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  overflow: visible;
}

/* Gap between nav items */
:where(.wp-block-navigation .wp-block-navigation__container) {
  gap: var(--nav-gap, 1.5rem);
}

/* Nav containers must shrink to fit */
.wp-block-navigation__responsive-container-content > .wp-block-navigation__container {
  flex-shrink: 1;
  min-width: 0;
}

:where(.wp-block-navigation__responsive-container-content > .wp-block-navigation__container) {
  display: flex;
  align-items: center;
}

/* CRITICAL: Reset inner UL elements */
.wp-block-navigation__container {
  position: static !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  z-index: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.wp-block-navigation__responsive-container-content > * {
  flex-shrink: 0;
}

:where(.wp-block-navigation .wp-block-search) {
  flex-shrink: 0;
}

.wp-block-navigation .wp-block-site-title {
  margin: 0;
}

.wp-block-navigation .wp-block-site-title a {
  text-decoration: none;
  color: inherit;
}

.wp-block-navigation .wp-block-navigation-item__content {
  display: inline;
  white-space: nowrap;
}

/* wp:navigation mobile menu defaults */
.wp-block-navigation__responsive-container-open {
  background: transparent;
  border: none;
  color: inherit;
}

/* Mobile menu overlay: explicit viewport dimensions needed because parent transforms
   (e.g. on sticky headers) create new containing blocks, breaking position:fixed */
.wp-block-navigation__responsive-container.is-menu-open {
  background: var(--mobile-nav-background, #1a1a1a);
  color: var(--mobile-nav-text, #ffffff);
  width: 100vw;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile browsers */
  padding: var(--mobile-nav-padding, 1.5rem); /* Ensure close button has breathing room */
  box-sizing: border-box;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  font-size: var(--mobile-nav-font-size, 1.5rem);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: var(--mobile-nav-gap, 1.5rem);
}

/* Mobile menu: override desktop justification for centered mobile layout */
/* WordPress sets --navigation-layout-justification-setting from block attributes (e.g. justifyContent:"right") */
/* which bleeds into mobile menu. Reset the variable so WordPress's own CSS uses center alignment. */
.wp-block-navigation__responsive-container.is-menu-open {
  --navigation-layout-justification-setting: center;
  --navigation-layout-justify: center;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  flex-direction: column;
  align-items: center;
  gap: var(--mobile-nav-gap, 1.5rem);
}

/* Mobile menu z-index fix: When header and content are siblings with same z-index,
   content paints above header due to DOM order. Elevate only the template part containing
   the open navigation menu. Use :has() for precise targeting without affecting other elements. */
.wp-block-template-part:has(.wp-block-navigation .is-menu-open),
header:has(.wp-block-navigation .is-menu-open) {
  z-index: 100001;
  position: relative;
}


/* Editor-specific fixes */
.editor-styles-wrapper .wp-block-navigation .wp-block-navigation-item {
  margin: 0;
}


/* Editor navigation structure fix - ensure flex display is applied */
/* Gap values should come from theme-specific CSS adjustments, not here */
.editor-styles-wrapper .wp-block-navigation__container {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

.editor-styles-wrapper .wp-block-navigation__responsive-container-content {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

/* Overlay header — transparent nav overlaying the hero section.
 * Uses CSS Grid overlap so header and hero share the same grid row.
 * No height assumptions needed.
 *
 * Frontend only — in the editor the header stacks normally above the hero,
 * which is fine for editing. The overlay is a visual presentation concern. */

/* Frontend: header in page content (homepage) */
body:not(.wp-admin) .wp-block-post-content:has(> .overlay-header) {
  display: grid !important;
  grid-template-columns: 1fr;
}
body:not(.wp-admin) .wp-block-post-content > .overlay-header {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
}
body:not(.wp-admin) .wp-block-post-content > .overlay-header + * {
  grid-column: 1;
  grid-row: 1;
}

/* Frontend: header in template (sub-pages) */
body:not(.wp-admin):has(> .wp-site-blocks > .overlay-header) .wp-site-blocks {
  display: grid !important;
  grid-template-columns: 1fr;
}
body:not(.wp-admin) .wp-site-blocks > .overlay-header {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
}
body:not(.wp-admin) .wp-site-blocks > .overlay-header + * {
  grid-column: 1;
  grid-row: 1;
}

/* Overlay header shared styles */
.overlay-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: transparent !important;
  transition: background-color 0.3s ease;
}
/* Scroll state: JS adds is-scrolled class when user scrolls past hero */
.overlay-header.is-scrolled {
  background-color: rgba(0, 0, 0, 0.92) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Admin bar offset for sticky overlay header */
.admin-bar .overlay-header {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar .overlay-header {
    top: 46px;
  }
}

/* Sticky header support for non-overlay headers.
 * Many HTML sites use position:sticky on nav elements. In WordPress the header
 * template-part wrapper (<header>) needs the sticky positioning, not inner elements. */
header.wp-block-template-part:has([class*="nav"][style*="position: sticky"]),
header.wp-block-template-part:has([class*="nav"][style*="position:sticky"]),
header.wp-block-template-part:has([class*="header"][style*="position: sticky"]),
header.wp-block-template-part:has([class*="header"][style*="position:sticky"]) {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Admin bar offset for sticky template-part headers */
.admin-bar header.wp-block-template-part[style*="sticky"],
.admin-bar header.wp-block-template-part:has([style*="sticky"]) {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar header.wp-block-template-part[style*="sticky"],
  .admin-bar header.wp-block-template-part:has([style*="sticky"]) {
    top: 46px;
  }
}

/* Header slot placeholder must remain in normal flow to preserve CSS Grid
 * row structure inside the hero section. The slot occupies the first grid row
 * (where the nav originally was) so the spacer and content rows stay correct. */
:root :where(.miles-header-slot) {
  display: block !important;
  pointer-events: none;
}

/* ===========================================
   RESPONSIVE UTILITY CLASSES (Miles Utilities)
   Reusable helpers for common responsive patterns
   =========================================== */

/* Flex row that stacks vertically on mobile */
.miles-row-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wp--preset--spacing--40, 1.5rem);
}

@media (max-width: 781px) {
  .miles-row-stack {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Reverse order on mobile (image above text, etc.) */
@media (max-width: 781px) {
  .miles-swap-order {
    flex-direction: column-reverse;
  }
}

/* Sticky positioning with admin bar offset */
.miles-sticky-top {
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-bar .miles-sticky-top {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .miles-sticky-top {
    top: 46px;
  }
}

/* Prevent flex item from shrinking */
.miles-no-shrink {
  flex-shrink: 0;
}

/* Flex utilities for alignment */
.miles-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.miles-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Hide visually but keep accessible */
.miles-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Editor button group gap fix: WordPress editor adds margins to button wrappers
   which breaks custom gap values. Reset wrapper margins so CSS gap works.
   Only target horizontal (default) layout — respect vertical if user changes it. */
.editor-styles-wrapper .wp-block-buttons:not(.is-vertical):not(.is-layout-flow) {
  display: flex !important;
  flex-wrap: wrap !important;
}

.editor-styles-wrapper .wp-block-buttons > .block-editor-block-list__block {
  margin: 0 !important;
}

