/* =========================================================
   Eastern Star Solutions — static site styles
   Fonts: Poppins (headings) + Work Sans (body)
   ========================================================= */

:root {
  --bg: #f3f7ff;
  --surface: #ffffff;
  --ink: #1f2733;
  --heading: #26303f;
  --muted: #5a6473;
  --accent: #0f57fb;
  --accent-dark: #0a3cc0;
  --accent-soft: #e7efff;
  --border: #e3eaf6;
  --shadow-sm: 0 4px 16px rgba(20, 47, 110, .06);
  --shadow-md: 0 14px 40px rgba(20, 47, 110, .10);
  --shadow-lg: 0 30px 70px rgba(20, 47, 110, .16);
  --radius: 16px;
  --radius-lg: 26px;
  --maxw: 1180px;
  --header-h: 78px;
}

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

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

body {
  margin: 0;
  font-family: "Work Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: "Poppins", sans-serif;
  color: var(--heading);
  line-height: 1.18;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -.01em;
}

p { margin: 0 0 1.1em; color: var(--muted); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding: 92px 0; }
.section--tight { padding: 64px 0; }

.eyebrow {
  display: inline-block;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.section-head p { font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: .98rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; transition: transform .25s ease; }
.btn:hover svg { transform: translateX(4px); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 26px rgba(15, 87, 251, .32);
}
.btn--primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 18px 34px rgba(15, 87, 251, .38); }

.btn--light {
  background: #fff;
  color: var(--accent);
}
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(0,0,0,.18); }

.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.55);
}
.btn--outline:hover { background: #fff; color: var(--accent); border-color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--accent);
  height: var(--header-h);
  display: flex;
  align-items: center;
  box-shadow: 0 6px 24px rgba(10, 40, 120, .18);
  transition: height .3s ease, box-shadow .3s ease, background .3s ease;
}
.site-header.scrolled {
  height: 62px;
  background: var(--accent-dark);
  box-shadow: 0 8px 30px rgba(10, 40, 120, .32);
}
.brand img { transition: height .3s ease; }
.site-header.scrolled .brand img { height: 32px; }

/* Skip link */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: #fff;
  color: var(--accent);
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  transition: top .25s ease;
}
.skip-link:focus { top: 12px; }

/* Focus visibility */
:focus-visible {
  outline: 3px solid #ffb300;
  outline-offset: 3px;
  border-radius: 4px;
}
.site-header :focus-visible { outline-color: #fff; }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand img { height: 40px; width: auto; }
.nav {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav a {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: .95rem;
  color: rgba(255,255,255,.9);
  position: relative;
  padding: 6px 0;
  transition: color .2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 0;
  background: #fff;
  transition: width .25s ease;
}
.nav a:hover { color: #fff; }
.nav a:hover::after { width: 100%; }
.nav .btn { padding: 10px 22px; }
.nav a.btn--light { color: var(--accent); }
.nav a.btn--light::after { display: none; }
.nav a.btn--light:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: transform .3s ease, opacity .3s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 84px 0 96px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -180px; right: -160px;
  width: 620px; height: 620px;
  background: radial-gradient(circle at center, rgba(15,87,251,.16), transparent 65%);
  z-index: 0;
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 56px;
}
.hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.5rem);
  margin-bottom: .55em;
}
.hero h1 .accent { color: var(--accent); }
.hero p { font-size: 1.12rem; max-width: 34em; margin-bottom: 1.8em; }
.hero-media { position: relative; }
.hero-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 5 / 4;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  z-index: -1;
  opacity: .35;
}

/* ---------- Split (Who we are / Approach) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}
.split--reverse .split-media { order: 2; }
.split-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.split h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.split .eyebrow { margin-bottom: 10px; }

/* ---------- Services grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.service-card__img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.service-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.service-card:hover .service-card__img img { transform: scale(1.06); }
.service-card__body { padding: 26px 26px 30px; }
.service-card h3 { font-size: 1.22rem; margin-bottom: .5em; }
.service-card p { font-size: .98rem; margin: 0; }

/* ---------- Our Work (features) ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.feature__icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 20px;
}
.feature__icon svg { width: 28px; height: 28px; }
.feature h3 { font-size: 1.15rem; margin-bottom: .45em; }
.feature p { font-size: .96rem; margin: 0; }

/* ---------- Projects gallery ---------- */
.gallery {
  columns: 4;
  column-gap: 20px;
}
.gallery figure {
  margin: 0 0 20px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  break-inside: avoid;
  position: relative;
}
.gallery img {
  width: 100%;
  transition: transform .5s ease;
}
.gallery figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,42,110,.35), transparent 55%);
  opacity: 0;
  transition: opacity .35s ease;
}
.gallery figure:hover img { transform: scale(1.07); }
.gallery figure:hover::after { opacity: 1; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--accent), var(--accent-dark));
  color: #fff;
  text-align: center;
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before,
.cta-band::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.cta-band::before { width: 340px; height: 340px; top: -140px; left: -80px; }
.cta-band::after { width: 260px; height: 260px; bottom: -120px; right: -60px; }
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.4rem); position: relative; z-index: 1; }
.cta-band p { color: rgba(255,255,255,.85); position: relative; z-index: 1; max-width: 40em; margin-inline: auto; }
.cta-band .btn { position: relative; z-index: 1; margin-top: 12px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--accent);
  color: rgba(255,255,255,.85);
  padding: 76px 0 0;
}
.site-footer a { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr 1.2fr;
  gap: 48px;
}
.site-footer h3 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 1em;
}
.footer-logo { height: 46px; margin-bottom: 22px; }
.footer-info p { color: rgba(255,255,255,.85); font-size: .96rem; line-height: 1.9; }
.footer-info strong { color: #fff; font-weight: 600; }
.hours-list { list-style: none; margin: 0; padding: 0; }
.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,.14);
  font-size: .95rem;
}
.hours-list li span:last-child { color: #fff; font-weight: 500; }

/* footer contact form */
.contact-form { display: grid; gap: 14px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  font-size: .98rem;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.12);
  color: #fff;
  transition: border-color .2s ease, background .2s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255,255,255,.7); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #fff;
  background: rgba(255,255,255,.18);
}
.contact-form textarea { resize: vertical; min-height: 118px; }
.contact-form .btn { justify-content: center; }
.hp { position: absolute; left: -9999px; opacity: 0; }
.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;
}
.form-status { font-size: .92rem; min-height: 1.2em; margin: 4px 0 0; }
.form-status.ok { color: #d9ffe6; }
.form-status.err { color: #ffe0e0; }

.footer-bottom {
  margin-top: 64px;
  border-top: 1px solid rgba(255,255,255,.16);
  padding: 24px 0;
  text-align: center;
  font-size: .88rem;
  color: rgba(255,255,255,.75);
}

/* ---------- Legal / content pages ---------- */
.page-hero {
  background: linear-gradient(120deg, var(--accent), var(--accent-dark));
  color: #fff;
  padding: 90px 0 70px;
  text-align: center;
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .3em; }
.page-hero p { color: rgba(255,255,255,.85); }
.prose { max-width: 820px; margin-inline: auto; }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; color: var(--heading); }
.prose h3 { font-size: 1.18rem; margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; margin-bottom: 1.2em; }
.prose li { margin-bottom: .5em; color: var(--muted); }
.prose a { color: var(--accent); font-weight: 500; }
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 34px;
  box-shadow: var(--shadow-sm);
  margin-top: 40px;
}
.info-card p { margin: 0; line-height: 1.9; }

/* ---------- Reveal animation (only when JS is active) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .gallery { columns: 3; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--accent-dark);
    padding: 10px 24px 26px;
    transform: translateY(-140%);
    transition: transform .35s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,.25);
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .nav a::after { display: none; }
  .nav .btn { margin-top: 16px; align-self: flex-start; }
  .nav-toggle { display: block; }
  .nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero .container { grid-template-columns: 1fr; gap: 44px; }
  .hero-media { order: -1; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split--reverse .split-media { order: -1; }
  .section { padding: 66px 0; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .services-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .gallery { columns: 2; column-gap: 14px; }
  .gallery figure { margin-bottom: 14px; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 56px 0 70px; }
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 26px rgba(15, 87, 251, .4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s, background .2s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-dark); }
.to-top svg { width: 22px; height: 22px; }

/* ---------- Cookie consent ---------- */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 160%);
  z-index: 120;
  width: min(680px, calc(100% - 36px));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 22px;
  transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.cookie-banner.show { transform: translate(-50%, 0); }
.cookie-banner p { margin: 0; font-size: .92rem; }
.cookie-banner a { color: var(--accent); font-weight: 500; text-decoration: underline; }
.cookie-banner .cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner .btn { padding: 10px 20px; font-size: .9rem; }
.btn--ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--bg); color: var(--ink); }

@media (max-width: 560px) {
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; gap: 14px; }
  .cookie-banner .cookie-actions { justify-content: center; }
}
