/* =========================================================
   Epic Mind Media v1 — Full Responsive Stylesheet
   Transparent header + compact nav + equal-width links on scroll
========================================================= */

/* ---------- Design Tokens ---------- */
:root{
  --ink:#060b30;           /* deep blue */
  --accent:#ffa500;        /* orange */
  --paper:#ffffff;         /* white */
  --earth:#483033;         /* brown */
  --highlight:#0074e4;     /* bright blue */
  --muted:#b9c4d6;         /* soft gray */
  --radius:16px;           /* roundness */
  --shadow:0 10px 30px rgba(0,0,0,.18);
  --max:1400px;            /* wider layout for large screens */
  --speed:180ms;           /* animation speed */
  /* aliases */
  --color-bg-primary: var(--ink);
  --color-text-primary: var(--paper);
  --color-focus: var(--highlight);
}

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

html{
  margin:0;
  padding:0;
  scroll-behavior:smooth;
  overflow-y: scroll;  /* avoid layout jump */
  overflow-x: hidden;  /* prevent horizontal bleed */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body{
  margin:0;
  padding:0;
  background:var(--ink);
  color:var(--paper);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}

/* Debug outline (optional) */
/* *{outline:1px dashed rgba(255,165,0,.3)} */

@media (max-width:480px){
  body{ line-height:1.7; }
}

input, select, textarea { font: inherit; }

/* =========================================================
   ACCESSIBILITY: REDUCE MOTION
========================================================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Accessibility ---------- */
.skip-link{
  position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden
}
.skip-link:focus{
  left:1rem;top:1rem;
  background:var(--paper);color:var(--ink);
  padding:.5rem .75rem;border-radius:10px;z-index:9999
}
:where(a,button,[role="button"],input,select,textarea):focus-visible{
  outline:3px solid var(--highlight);
  outline-offset:2px;
  box-shadow:0 0 0 4px rgba(0,116,228,.22);
}
@media (forced-colors: active){
  :focus{ outline: 2px solid CanvasText; outline-offset:2px; }
  a, .btn{ forced-color-adjust:auto; }
}

/* ---------- Layout Utilities ---------- */
.container{
  max-width:var(--max);
  margin:auto;
  padding-inline:1rem;
  overflow-x: hidden;
}
.section{padding:clamp(2.5rem,6vw,5rem) 0}
.section--alt{background:#0a123e}
.section--highlight{background:linear-gradient(160deg,#0a123e,#060b30)}
.section[id], .anchor-target{
  scroll-margin-top: clamp(64px, 12vh, 96px);
}

/* =========================================================
   HEADER — Fully Transparent
========================================================= */
.header{
  position: fixed; top:0; left:0; right:0;
  z-index: 1000;
  background: transparent; box-shadow: none;
  transition: background var(--speed) ease, backdrop-filter var(--speed) ease;
}
.header__row{
  width:100%;
  display:flex; align-items:center; justify-content:space-between;
  gap:1rem; padding:.6rem 1rem;
}

/* Transparent both states per spec (you can add blur if desired) */
.header.is-scrolled{
  background: rgba(6,11,48,0);
}

/* ---------- Logo ---------- */
.logo img{
  width:100px;height:100px;border-radius:50%;
  border:2px solid rgba(255,255,255,.15);
  transition:transform .25s ease,filter .25s ease,box-shadow .25s ease;
  will-change:transform;
}
.logo:hover img,.logo:focus-visible img{
  transform:translateY(-2px) scale(1.06);
  filter:drop-shadow(0 0 8px rgba(255,165,0,.75));
  box-shadow:0 0 8px rgba(255,165,0,.65);

  border-color:rgba(255,165,0,.8);
}

/* ---------- Navigation (mobile first) ---------- */
.nav-toggle{
  display:inline-grid; place-items:center;
  width:44px; height:44px; padding:8px;
  border:0; background:transparent; cursor:pointer; border-radius:12px;
}
.nav-toggle:focus-visible{
  outline:3px solid var(--highlight); outline-offset:3px;
  box-shadow:0 0 0 4px rgba(0,116,228,.25);
  background:rgba(0,116,228,.08);
}
.nav-toggle .bar{
  width:100%;height:3px;background:var(--paper);
  border-radius:2px;margin-top:5px
}

/* Off-canvas drawer */
.nav{
  position: fixed; top:0; bottom:0; right:-100%; left:auto;
  width: min(80vw, 340px);
  background:#0a123e;
  transition:right var(--speed) ease, box-shadow var(--speed) ease;
  will-change:right;
  overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
  box-shadow:none;
}
.nav.open{
  right:0; box-shadow:var(--shadow);
}

body.nav-open{ overflow:hidden; }

.nav__list{
  list-style:none;
  display:grid; gap:1rem;
}
.nav__list a{
  color:var(--paper);
  padding:.6rem .75rem;
  border-radius:10px;
  transition:color var(--speed),background var(--speed),transform var(--speed);
}

/* ---------- Desktop Nav ---------- */
@media (min-width:900px){
  .nav-toggle{ display:none; }

  .nav{
    position:static;
    right:auto; left:auto;
    width:auto;
    background:transparent;
    padding:0;
    box-shadow:none;
    margin-left:auto;          /* pushes nav to the right in header row */
  }

  .header__row{
    justify-content:flex-start;  /* logo left, nav pushed right via margin-left:auto */
  }

  .nav__list{
    display:flex; align-items:center; gap:24px; transition:gap .25s ease;
  }

  .nav__list > li:not(.nav__cta) > a{
    display:inline-block; inline-size:auto;
    text-align:center; white-space:nowrap;
    padding-block:.6rem; padding-inline:0; border-radius:10px;
  }

  /* Equal-width chips for NON-CTA links only */
  :root{ --navItemW: clamp(5.5rem, 6.5vw, 7rem); }

  .header.is-scrolled .nav__list{ gap:16px; }

  .header.is-scrolled .nav__list > li:not(.nav__cta) > a{
    inline-size: var(--navItemW);
    display:inline-flex; align-items:center; justify-content:center;
    white-space:nowrap; padding-block:.5rem; padding-inline:0; text-align:center;
  }
}

/* ---------- Orange chips on scroll (links) ---------- */
@media (min-width:900px){
  .header.is-scrolled .nav .nav__list a{
    background: rgba(255,165,0,.90);
    color: var(--paper) !important;      /* white text for contrast */
    border: 1px solid rgba(0,0,0,.08);
    transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
  }
  .header.is-scrolled .nav .nav__list a:hover{
    background: rgba(255,165,0,1);
    color: var(--paper) !important;
  }
  .header.is-scrolled .nav .nav__list a:focus-visible{
    outline: 3px solid var(--highlight);
    box-shadow: 0 0 0 4px rgba(0,116,228,.4);
  }
}

/* ---------- Buttons ---------- */
.btn{
  display:inline-block; padding:.7rem 1rem;
  border-radius:calc(var(--radius) - 6px);
  font-weight:700; letter-spacing:.2px;
  transition:transform var(--speed),background var(--speed),box-shadow var(--speed), color var(--speed);
}
.btn--accent{
  background:var(--accent);
  color:var(--ink);
}

/* ---------- CTA: Orange bg + Blue bold text, hover → White ---------- */
@media (min-width:900px){
  /* Base CTA (both scroll states) */
  .header .nav__cta .btn.btn--accent{
    background: var(--accent);
    color: var(--ink) !important;  /* blue text */
    border: 2px solid var(--accent);
    font-weight:700;
    transition: color .2s ease, background .2s ease, filter .2s ease, border-color .2s ease;
  }

  .header .nav__cta .btn.btn--accent:hover,
  .header .nav__cta .btn.btn--accent:focus-visible{
    color: var(--paper) !important;      /* white on hover/focus */
    background: var(--accent);
    border-color: var(--accent);
    filter: brightness(1.03);
  }

  .header.is-scrolled .nav__cta .btn.btn--accent{
    background: var(--accent);
    color: var(--ink) !important;
    border: 2px solid var(--accent);
  }

  .header.is-scrolled .nav__cta .btn.btn--accent:hover,
  .header.is-scrolled .nav__cta .btn.btn--accent:focus-visible{
    color: var(--paper) !important;
  }

  /* ✅ Keep "Get a Quote" natural width (no equal-width chip) */
  .header.is-scrolled .nav__list > li.nav__cta > a.btn{
    inline-size:auto !important;
    padding-inline:1.1rem;
  }
}

/* ---------- Link focus (pre-scroll) ---------- */
.nav .nav__list a:focus-visible{
  outline:3px solid var(--highlight);
  box-shadow:0 0 0 4px rgba(0,116,228,.25);
  border-radius:10px;
}

/* ---------- Mobile tap comfort ---------- */
@media (max-width:900px){
  .nav__list a { padding:.9rem 1rem; }
}
.nav__list a:focus-visible{
  outline:3px solid var(--highlight);
  outline-offset:2px; border-radius:10px;
  box-shadow:0 0 0 3px rgba(0,116,228,.25);
}

a, button { -webkit-tap-highlight-color: transparent; }
.btn--light{background:#eaf0ff;color:#0b1030}
.btn--light:hover{background:#f4f7ff}
a{ color:#dfe7ff; text-decoration:none; }
a:hover{ color:var(--accent); }
.btn:focus-visible{
  outline:3px solid var(--highlight);
  outline-offset:2px;
  box-shadow:0 0 0 4px rgba(0,116,228,.22);
}

/* =========================================================
   HERO
========================================================= */
.hero{
  position:relative;
  min-height:min(92vh,900px);
  display:grid; place-items:end center;
  overflow:hidden;
}
.hero__media{ position:absolute; inset:0; z-index:-1; overflow:hidden; }
.hero__video{
  width:100%; height:100%;
  object-fit:cover; object-position:50% 70%;
  filter:saturate(1.08) contrast(1.05);
}
.hero__overlay{
  position:absolute; inset:0;
  background:linear-gradient(to top, rgba(6,11,48,.60), rgba(6,11,48,.10));
  transition: background 320ms ease;
}
img, video { max-width:100%; height:auto; display:block; }

/* Darker overlay when text appears */
.hero.hero--dim .hero__overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 20, 0.92),
    rgba(6, 11, 48, 0.90),
    rgba(6, 11, 48, 0.55)
  );
  transition: background 420ms ease;
}
@media (prefers-reduced-motion: reduce){
  .hero__overlay{ transition:none; }
}

.hero__content{text-align:center;padding:12vh 1rem 7vh}
.hero__content h1{margin:0 0 .5rem;font-size:clamp(2rem,6vw,4rem)}
.hero__content p{max-width:62ch;margin:0 auto 1rem;color:#dfe7ff}
.hero__content.is-hidden{
  opacity:0; transform:translateY(8px); pointer-events:none;
}
.hero__content.is-visible{
  opacity:1; transform:none; pointer-events:auto;
  transition: opacity 320ms ease, transform 320ms ease;
}
@media (prefers-reduced-motion: reduce){
  .hero__content.is-hidden{ opacity:0; transform:none; }
  .hero__content.is-visible{ transition:none; }
}

/* =========================================================
   SERVICES & PORTFOLIO — FULL-WIDTH STACKED LAYOUT
========================================================= */

#services.services-portfolio {
  background: radial-gradient(circle at top,
              rgba(255,255,255,.06) 0,
              rgba(255,255,255,.02) 40%,
              transparent 75%);
  padding: clamp(3.5rem,6vw,6rem) 0;
}

/* Headings */
#services.services-portfolio .section-title {
  text-align: center;
  margin-bottom: .5rem;
}
#services.services-portfolio .section-intro {
  max-width: 46rem;
  margin: 0 auto 2.5rem;
  text-align: center;
  line-height: 1.7;
  opacity: .9;
}

/* ⭐ FULL-WIDTH STACKED LAYOUT ⭐ */
#services.services-portfolio .cards {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Service Card */
#services.services-portfolio .card {
  width: 100%;
  background: rgba(6,11,48,.96);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.75rem;
  border: 1px solid rgba(255,255,255,.10);
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

#services.services-portfolio .card:hover,
#services.services-portfolio .card:focus-within {
  transform: translateY(-5px);
  box-shadow: 0 18px 46px rgba(0,0,0,.35);
  border-color: var(--highlight);
}

/* Titles & Text */
#services.services-portfolio .card__title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.2rem;
  letter-spacing: .02em;
}
#services.services-portfolio .card__icon {
  font-size: 1.6rem;
}
#services.services-portfolio .card__desc {
  margin: 0;
  opacity: .95;
}
#services.services-portfolio .card__list {
  margin: .25rem 0 .5rem;
  padding-left: 1.1rem;
  font-size: .95rem;
  opacity: .9;
}

/* Compact Toggle Button (NOT full-width) */
#services.services-portfolio .card__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem 1.1rem;
  margin-top: .25rem;

  width: auto;              /* ⬅️ Keeps button compact */
  max-width: 260px;         /* ⬅️ Prevents oversized buttons on long text */
  
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);

  background: rgba(10,18,62,.9);
  color: var(--paper);
  font-size: .9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  cursor: pointer;

  transition:
    background .22s ease,
    color .22s ease,
    border-color .22s ease,
    transform .22s ease;
}

/* Arrow indicator */
#services.services-portfolio .card__toggle::after {
  content: "▾";
  font-size: .75rem;
  margin-left: .4rem;
  transition: transform .22s ease;
}

/* Expanded state */
#services.services-portfolio .card__toggle[aria-expanded="true"] {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}
#services.services-portfolio .card__toggle[aria-expanded="true"]::after {
  transform: rotate(-180deg);
}

/* Hover / focus */
#services.services-portfolio .card__toggle:hover {
  transform: translateY(-1px);
}
#services.services-portfolio .card__toggle:focus-visible {
  outline: 3px solid var(--highlight);
  outline-offset: 2px;
}

/* On small screens ONLY: make the button stretch */
@media (max-width: 680px) {
  #services.services-portfolio .card__toggle {
    width: 100%;                /* full width on phones only */
    max-width: none;
    justify-content: center;
  }
}


/* Full-width Portfolio Panels */
#services.services-portfolio .service-panel {
  width: 100%;
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,.10);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition: max-height .45s ease, opacity .3s ease, transform .3s ease;
}

#services.services-portfolio .service-panel.is-open {
  max-height: 2000px;
  opacity: 1;
  transform: none;
}

/* Grid inside the panel */
#services.services-portfolio .service-panel__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* Panel hint text */
#services.services-portfolio .service-panel__hint {
  margin: 0 0 1rem;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .75;
}

/* Portfolio item */
#services.services-portfolio .service-item figure {
  background: #0b1038;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.10);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#services.services-portfolio .service-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
#services.services-portfolio .service-item figcaption {
  padding: .75rem 1rem;
  font-size: .9rem;
  color: #dfe7ff;
  line-height: 1.5;
}

/* Mobile cleanups */
@media (max-width: 500px) {
  #services.services-portfolio .card {
    padding: 1.6rem 1.25rem;
  }
  #services.services-portfolio .card__title {
    font-size: 1.05rem;
  }
  #services.services-portfolio .card__toggle {
    width: 100%;
    justify-content: center;
  }
  #services.services-portfolio .service-item figcaption {
    font-size: .88rem;
  }
}


/* =========================================================
   FORM
========================================================= */
.form{display:grid;grid-template-columns:1fr;gap:1rem;margin-top:1rem}
.form label{display:grid;gap:.35rem}
.form input,.form select,.form textarea{
  padding:.8rem;border-radius:12px;border:1px solid rgba(255,255,255,.12);
  background:#0b1038;color:var(--paper);
  font-size:16px; /* prevents iOS zoom on focus */
}
.form ::placeholder{ color:#aab7e6; }
.form input:focus,.form select:focus,.form textarea:focus{
  border-color:var(--accent); box-shadow:0 0 0 3px rgba(255,165,0,.18)
}
.form textarea{min-height:140px;resize:vertical}
#quoteStatus{margin-top:.25rem;font-weight:700;color:var(--highlight)}
@media (min-width:800px){
  .form{grid-template-columns:1fr 1fr}
  .form textarea,.form button{grid-column:1/-1}
}

/* =========================================================
   CONTACT & FOOTER
========================================================= */
#contact p a{
  border-bottom:2px solid var(--earth);
  transition:border-color var(--speed),color var(--speed)
}
#contact p a:hover{
  color:var(--accent);border-color:var(--accent)
}
.footer{
  background:#0a123e;border-top:1px solid rgba(255,255,255,.08);padding:2rem 0
}
.footer__row{
  display:flex;align-items:center;justify-content:space-between;gap:1rem
}
.back-to-top{
  opacity:.85;transition:opacity var(--speed),transform var(--speed)
}
.back-to-top:hover{
  opacity:1;transform:translateY(-2px)
}

/* =========================================================
   PRINT
========================================================= */
@media print{
  .hero__media,.nav,.nav-toggle,.btn{display:none!important}
  body{background:#fff;color:#000}
  a{color:#000;text-decoration:underline}
}

/* ===== About Section (final) ===== */
.section.about{
  position:relative;
  padding:clamp(3.5rem,6vw,6rem) 0;
  background:
    radial-gradient(60% 60% at 50% 0%,
      rgba(255,255,255,0.08) 0%,
      rgba(255,255,255,0.04) 30%,
      transparent 65%);
}

.about .container{ max-width:var(--max); margin:0 auto; padding:0 1rem; }

.about__grid{
  display:grid;
  gap:clamp(1.25rem,3vw,2.5rem);
  grid-template-columns:1.2fr .8fr;
  align-items:start;
}

/* Copy */
.section-title{ margin:0 0 .5rem; font-size:clamp(1.6rem,2.5vw,2.25rem); }
.lead{ margin:.25rem 0 1rem; line-height:1.7; opacity:.95; }
.about__copy p{ margin:.75rem 0; }
.about__copy h3{ margin:1.25rem 0 .5rem; font-size:1.1rem; letter-spacing:.2px; }
.about__highlights{ margin:.25rem 0 0; padding-left:1.2rem; }
.about__highlights li{ margin:.4rem 0; }

/* Media */
.about__media{ align-self:start; }
.about__media img{
  width:100%; height:auto; display:block;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  opacity:0; transform:translateY(12px);
  transition:opacity .45s ease, transform .45s ease, box-shadow .3s ease;
}
.about__media.in img{ opacity:1; transform:none; }
.about__media img:is(:hover,:focus-visible){ box-shadow:0 14px 40px rgba(0,0,0,.22); }

/* A11y helper */
.visually-hidden{
  position:absolute!important; width:1px; height:1px; margin:-1px; border:0; padding:0;
  clip:rect(0 0 0 0); clip-path:inset(50%); overflow:hidden; white-space:nowrap;
}

/* Responsive */
@media (max-width:900px){
  .about__grid{ grid-template-columns:1fr; }
  .about__media{ order:-1; }
}
@media (prefers-reduced-motion:reduce){
  .about__media img{ transition:none; transform:none; opacity:1; }
}

/* SERVICES SECTION */
/* .card__title { display: flex; align-items: center; gap: .5rem; }
.card__icon { font-size: 1.5rem; line-height: 1; } */
/* ===== Services Section ===== */
.section--alt {
  background: rgba(255,255,255,0.02);
  padding: clamp(3.5rem, 6vw, 6rem) 0;
}

/* Centered Title & Intro */
#services .section-title,
#services .section-intro {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-intro {
  max-width: 700px;
  margin-bottom: 2rem;
  line-height: 1.6;
  opacity: 0.9;
}

/* Card Grid Layout */
.cards {
  display: grid;
  gap: clamp(1.5rem, 2.5vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Card Base Styles */
.card {
  background: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.75rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(0,0,0,.25);
}

/* Card Headings & Icons */
.card__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--paper);
}

.card__icon {
  font-size: 1.6rem;
  line-height: 1;
}

/* Card Description */
.card__desc {
  font-size: 0.98rem;
  line-height: 1.7;
  opacity: 0.95;
  margin-bottom: 0.9rem;
}

/* Bullet Lists */
.card__list {
  padding-left: 1.2rem;
  list-style: disc;
}

.card__list li {
  margin: 0.35rem 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 900px) {
  #services .section-title,
  #services .section-intro {
    text-align: left;
    padding: 0 1rem;
  }
  .card {
    padding: 1.5rem 1.25rem;
  }
  .card__title {
    font-size: 1.1rem;
  }
}
#services .card { opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .6s; }
#services .card.visible { opacity: 1; transform: none; }
