/* =========================================================
   Kairos Photography — style.css (FINAL, production-safe, deduped)
   - ONE topbar system (no duplicates)
   - Centered brand (desktop + mobile)
   - Soft-blue brand color (mockup vibe)
   - Mobile menu “card buttons” (but not oversized)
   - Hero phoenix rise stays intact
   - Back-to-top stays clear of Line2
   - Keeps your audio chip + dark-mode behavior
   ========================================================= */

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

html, body{ width: 100%; overflow-x: hidden; margin: 0; }

body{
  font: 16px/1.65 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: #222;
  background: #fff;
}

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

a{ color: #0b5ed7; text-decoration: none; }
a:hover{ text-decoration: underline; }

h1{ font-size: 2rem; margin: 1.25rem 0 .75rem; }
p{ margin: .5rem 0 1rem; }

/* ===== Global tuning knobs ===== */
:root{
  /* GLOBAL Line2 + Back-to-top clearance */
  --line2-clearance-y: 104px;
  --line2-clearance-x: 84px;

  /* Phoenix wordmark travel distance */
  --viaf-travel-desktop: 240px;
  --viaf-travel-mobile:  180px;

  /* Topbar */
  --viaf-topbar-h: 72px;
  --viaf-topbar-bg: #ffffff;
  --viaf-topbar-border: rgba(0,0,0,.08);

  /* Brand + UI palette (soft blue) */
  --viaf-brand: #6f92b0;
  --viaf-link: #173a5e;
  --viaf-active: #0b5ed7;

  /* Radius */
  --viaf-radius: 18px;

  /* Hamburger sizing (controls centering spacer too) */
  --viaf-burger: 56px;
}

/* Extra-small phones */
@media (max-width: 380px){
  :root{
    --line2-clearance-y: 112px;
    --line2-clearance-x: 92px;
    --viaf-travel-mobile: 170px;
    --viaf-topbar-h: 68px;
    --viaf-burger: 52px;
  }
}

/* ===== Skip link ===== */
.skip-link{
  position: absolute;
  left: 8px;
  top: 8px;
  padding: .5rem .75rem;
  background: #fff;
  border: 1px solid #111;
  border-radius: 10px;
  transform: translateY(-140%);
  z-index: 999999;
}
.skip-link:focus{ transform: translateY(0); }

/* ===== Layout Container ===== */
.container{
  max-width: 900px;
  margin: 0 auto;
  padding: 1.25rem;
}
@media (max-width: 900px) and (orientation: landscape) {
  section.container {
    padding-top: 2rem;
  }
}
/* ===== Footer columns (footer.php uses .cols) ===== */
.site-footer p{ margin: .25rem 0; }
.site-footer .cols{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1.25rem;
}
@media (max-width: 720px){
  .site-footer .cols{ grid-template-columns: 1fr; }
}

/* =========================================================
   TOPBAR (ONE system only) — centered + mockup style
   ========================================================= */
.viaf-topbar{
  position: sticky;
  top: 0;
  z-index: 10000;
  background: var(--viaf-topbar-bg);
  border-bottom: 1px solid var(--viaf-topbar-border);
}

.viaf-wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 14px;
}

.viaf-topbar-inner{
  height: var(--viaf-topbar-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* keeps brand centered */
  align-items: center;
  gap: 14px;
}

/* Left + Right columns */
.viaf-left{
  /* must match burger width so the brand stays centered */
  width: var(--viaf-burger);
}
.viaf-right{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

/* Brand */
.viaf-brand{
  justify-self: center;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--viaf-brand);
  text-decoration: none !important;
  font-size: 34px; /* premium-big on mobile, but not “giant” */
  line-height: 1;
  white-space: nowrap;
}
.viaf-brand span{ display: inline-block; }

/* Desktop links */
.viaf-links{
  display: none;
  align-items: center;
  gap: 22px;
}
.viaf-links a{
  color: var(--viaf-link);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 8px;
  border-radius: 12px;
  text-decoration: none !important;
}
.viaf-links a:hover{
  background: rgba(11,94,215,.08);
}
.viaf-links a.active{
  color: var(--viaf-active);
  background: rgba(11,94,215,.12);
}

/* Hamburger button */
.viaf-menu-btn{
  appearance: none;
  width: var(--viaf-burger);
  height: var(--viaf-burger);
  border-radius: 20px;
  border: 2px solid rgba(0,0,0,.16);
  background: #fff;
  color: #111;
  font-weight: 900;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(0,0,0,.08);
}
.viaf-menu-btn:hover{ background: rgba(0,0,0,.02); }
.viaf-menu-btn:focus-visible{ outline: 2px solid #111; outline-offset: 3px; }

/* Mobile panel (kept feeling “card-like” but calmer) */
.viaf-mobile-panel{
  display: none;
  padding: 12px 0 18px;
}

.viaf-mobile-panel a{
  display: block;
  margin: 12px 0;
  padding: 18px 18px;
  border-radius: 22px;
  color: #1f3550;
  font-weight: 800;
  font-size: 26px;
  text-decoration: none !important;
  border: 2px solid rgba(0,0,0,.08);
  background: #fff;
}
.viaf-mobile-panel a:hover{
  background: rgba(11,94,215,.06);
}
.viaf-mobile-panel a.active{
  color: var(--viaf-active);
  background: rgba(11,94,215,.12);
  border-color: rgba(11,94,215,.22);
}

/* Open state */
.viaf-mobile-panel.open{
  display: block;
  animation: viafDrop .18s ease-out both;
}
@keyframes viafDrop{
  from{ opacity: 0; transform: translateY(-6px); }
  to  { opacity: 1; transform: translateY(0); }
}

/* Desktop breakpoint */
@media (min-width: 860px){
  .viaf-links{ display: flex; }
  .viaf-menu-btn{ display: none; }
  .viaf-left{ width: 0; }
  .viaf-mobile-panel{ display: none !important; }

  .viaf-topbar-inner{ height: 64px; }
  .viaf-brand{ font-size: 26px; }
}

/* =========================================================
   Old header/nav — hide completely to avoid duplicates
   ========================================================= */
.site-header{ display: none !important; }
.site-logo{ display: none !important; }
.site-nav{ display: none !important; }

/* =========================================================
   Buttons
   ========================================================= */
.btn{
  display: inline-block;
  padding: .75rem 1rem;
  border-radius: 10px;
  background: #111;
  color: #fff;
  text-decoration: none;
  border: 1px solid #111;
}
.btn:hover{ opacity: .92; }
.btn.outline{ background: #fff; color: #111; border-color: #111; }
.btn:focus-visible{ outline: 2px solid #111; outline-offset: 3px; }

.cta{
  margin-top: 1rem;
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

/* =========================================================
   Back-to-top (GLOBAL Line2 clearance)
   ========================================================= */
.back-to-top{
  position: fixed;
  right: calc(1rem + var(--line2-clearance-x));
  bottom: calc(1rem + var(--line2-clearance-y));
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: 1px solid #111;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 2147483647;
}
.back-to-top.show{
  opacity: .96;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover{ transform: translateY(-2px); }
.back-to-top:focus-visible{ outline: 2px solid #111; outline-offset: 3px; }

@media (max-width: 480px){
  .back-to-top{ width: 40px; height: 40px; }
}

/* =========================================================
   HERO (Phoenix-safe)
   ========================================================= */
.hero.has-img{
  position: relative;
  width: 100%;
  min-height: clamp(280px, 38vh, 520px);
  overflow: visible; /* allow wordmark to rise OUT */
}

/* Background media clipped here */
.hero.has-img .hero-media{
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

/* Gradient overlay */
.hero.has-img .hero-media::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(5,15,25,.85),
    rgba(5,15,25,.55),
    rgba(5,15,25,.25)
  );
  z-index: 1;
}

.hero.has-img .hero-media picture,
.hero.has-img .hero-media img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero.has-img .hero-media picture img,
.hero.has-img .hero-media > img{
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}

@media (min-width: 768px){
  .hero.has-img .hero-media picture img,
  .hero.has-img .hero-media > img{
    object-position: center bottom;
  }
}

/* Hero text */
.hero-text{
  position: relative;
  z-index: 20;
}
.hero.has-img .hero-text{
  color: #fff;
  padding: clamp(1.1rem, 3.6vw, 2.25rem) 1rem;
  max-width: min(1050px, 92%);
  margin: 0 auto;
  padding-top: clamp(1.4rem, 5vw, 2.4rem);
}
.hero.has-img .hero-text h1{
  margin: 0 0 .5rem;
  line-height: 1.25;
  font-size: clamp(1.25rem, 2.4vw + .8rem, 2rem);
}
.hero.has-img .hero-text p{
  margin: 0;
  font-size: clamp(.95rem, 1.4vw + .4rem, 1.1rem);
}

/* Wordmark — PHOENIX RISE */
.hero .viaf-wordmark-rise{
  position: absolute;
  left: 50%;
  top: clamp(78px, 18vh, 150px);
  width: min(760px, 92vw);
  height: clamp(44px, 8vw, 86px);
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
  transform: translate(-50%, 0);
  animation: viafTravel 1500ms cubic-bezier(.2,.9,.2,1) 520ms forwards;
}

.hero .viaf-wordmark-rise img{
  width: 100%;
  height: auto;
  display: block;
  transform: translateY(68%);
  opacity: 0;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.28));
  animation: viafReveal 950ms cubic-bezier(.2,.9,.2,1) 120ms forwards;
}

.hero .viaf-wordmark-rise::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:0;
  height:60%;
  pointer-events:none;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,.12) 60%,
    rgba(0,0,0,.22) 100%
  );
}

@keyframes viafReveal{
  0%   { transform: translateY(68%); opacity: 0; }
  55%  { opacity: 1; }
  100% { transform: translateY(0%);  opacity: 1; }
}

@keyframes viafTravel{
  0%   { transform: translate(-50%, 0); }
  100% { transform: translate(-50%, calc(-1 * var(--viaf-travel-desktop))); }
}

@media (max-width: 640px){
  @keyframes viafTravel{
    0%   { transform: translate(-50%, 0); }
    100% { transform: translate(-50%, calc(-1 * var(--viaf-travel-mobile))); }
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .hero .viaf-wordmark-rise,
  .hero .viaf-wordmark-rise img{
    animation: none !important;
    transform: translate(-50%, 0) !important;
    opacity: 1 !important;
  }
  .back-to-top, .btn{ transition: none; transform: none; }
}

/* =========================================================
   Form utilities / anti-spam
   ========================================================= */
.hp-field{
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* =========================================================
   Audio chip (your existing IDs/classes)
   ========================================================= */
.vif-audio{
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem .8rem;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
  background: var(--card,#fff);
  color: var(--text,#111);
  z-index: 9999;
  font: 500 14px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial;
}
.vif-audio.hidden{ display: none; }
.vif-audio button{
  border: 0;
  background: #efefef;
  padding: .4rem .6rem;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
}
#vif-audio-title{
  max-width: 26ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (prefers-color-scheme: dark){
  .vif-audio{ background:#111827; color:#e5e7eb; }
  .vif-audio button{ background:#374151; color:#e5e7eb; }
}

/* If you use #vif-audio as a second positioning rule */
#vif-audio{
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 1rem);
  right: calc(env(safe-area-inset-right, 0px) + 1rem);
  bottom: auto;
  left: auto;
}

/* =========================================================
   MOBILE SCALE PATCH — keeps it premium, not gigantic
   (This section MUST stay at the very end of the file)
   ========================================================= */

/* Mobile + small tablets */
@media (max-width: 859px){

  /* Topbar height slightly tighter */
  :root{
    --viaf-topbar-h: 64px;
    --viaf-burger: 52px;
  }

  /* Brand: keep centered, single line */
  .viaf-brand{
    font-size: 26px;        /* was 34 */
    letter-spacing: .15px;
    white-space: nowrap;    /* force 1 line */
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 72vw;        /* prevents wrap next to burger */
  }

  /* Hamburger button a bit smaller */
  .viaf-menu-btn{
    width: var(--viaf-burger);
    height: var(--viaf-burger);
    border-radius: 18px;
    font-size: 24px;
    box-shadow: 0 10px 26px rgba(0,0,0,.08);
  }

  /* Mobile panel spacing tighter */
  .viaf-mobile-panel{
    padding: 10px 0 14px;
  }

  /* Mobile menu “cards” — still tappable, not screen-filling */
  .viaf-mobile-panel a{
    margin: 10px 0;
    padding: 16px 16px;
    border-radius: 20px;
    font-size: 22px;     /* was 26 */
    line-height: 1.2;
  }
}

/* Extra-small phones */
@media (max-width: 380px){
  .viaf-brand{
    font-size: 24px;
    max-width: 68vw;
  }
  .viaf-mobile-panel a{
    font-size: 20px;
    padding: 14px 14px;
  }
}
/* =========================================================
   Services landing — card/grid layout
   ========================================================= */

.vif-services-head h1{ margin: 0 0 .5rem 0; }
.vif-services-head p{ margin: 0 0 1.5rem 0; color:#444; }

.vif-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.vif-card{
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.vif-card h2{
  font-size: 1.05rem;
  margin: 0 0 .5rem 0;
  color: #111;
}

.vif-card p{
  margin: .25rem 0 .85rem 0;
  color: #444;
  line-height: 1.35;
  font-size: .95rem;
}

.vif-card .vif-primary{
  display: inline-block;
  padding: .6rem .8rem;
  border-radius: 10px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  text-decoration: none !important;
  font-weight: 700;
  font-size: .95rem;
}

.vif-card .vif-primary:hover{
  opacity: .92;
  text-decoration: none !important;
}

.vif-card .vif-meta{
  margin-top: .75rem;
  font-size: .92rem;
  color: #555;
}

.vif-card .vif-sub{
  display: inline-block;
  margin-top: .25rem;
  color: #111;
  font-weight: 700;
  text-decoration: none !important;
  border-bottom: 1px dashed #777;
  padding-bottom: 2px;
}

.vif-card .vif-sub:hover{
  background: rgba(11,94,215,.06);
  border-bottom-color: rgba(11,94,215,.5);
}

.vif-addon{
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fafafa;
}