/* ========== Base & Variables ========== */
* { box-sizing: border-box; }
html, body { margin:0; padding:0; font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color:#111827; background:#fff; }
img { max-width:100%; display:block; }
a { text-decoration:none; color:inherit; }

:root{
  --bg:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --brand:#2563eb;
  --brand-600:#1d4ed8;
  --border:#e5e7eb;
  --shadow-sm:0 6px 14px rgba(0,0,0,.04);
  --shadow-md:0 10px 28px rgba(0,0,0,.08);
  --shadow-lg:0 18px 40px rgba(2,6,23,.25);
}

.container{ width:min(1120px,92%); margin:0 auto; }
.muted{ color:var(--muted); }
.section{ padding:80px 0; }
.section-tight{ padding:48px 0 30px; }

/* Buttons */
.button{ display:inline-block; padding:10px 16px; border-radius:8px; border:1px solid var(--border); font-weight:600; background:#fff; color:var(--text); }
.button.small{ padding:8px 12px; }
.button.block{ width:100%; text-align:center; }
.button.primary{ background:var(--brand); color:#fff; border-color:var(--brand); }
.button.primary:hover{ background:var(--brand-600); }
.button.outline{ background:#fff; color:var(--brand); border-color:var(--brand); }
.button.outline:hover{ background:#eef2ff; }
.button.pill{ border-radius:999px; }
.button.lg{ padding:14px 24px; }

/* Card (shared) */
.card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:var(--shadow-sm);
  padding:24px 20px;
  transition:border-color .15s ease, background-color .15s ease;
  cursor:default;
}
.card:hover{ border-color:#e6e9ef; }

/* Simple grids */
.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:28px; }
.grid-4{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }

@media (max-width:1000px){ .grid-3{ grid-template-columns:1fr 1fr; } }
@media (max-width:800px){  .grid-4{ grid-template-columns:1fr 1fr; } }
@media (max-width:640px){  .grid-3, .grid-4{ grid-template-columns:1fr; } }

/* ========== Header ========== */
.site-header{ position:sticky; top:0; background:var(--bg); border-bottom:1px solid var(--border); z-index:40; }
.header-inner{ display:flex; align-items:center; gap:24px; padding:16px 0; }
.brand{ display:flex; align-items:center; gap:10px; white-space:nowrap; }
.brand-mark{ width:36px; height:36px; border-radius:50%; object-fit:cover; }
.brand-name{ font-weight:700; letter-spacing:.4px; }
.byline{ color:var(--muted); font-size:12px; border-left:1px solid var(--border); padding-left:10px; margin-left:6px; }
.nav{ display:none; gap:18px; color:#111827; }
.auth{ margin-left:auto; display:flex; align-items:center; gap:12px; }
@media (min-width:900px){ .nav{ display:flex; } }

/* Dropdown */
.dropdown{ position:relative; }
.dropbtn{ background:transparent; border:none; font:inherit; color:inherit; cursor:pointer; }
.dropdown-content{
  position:absolute; top:120%; left:0; background:#fff; border:1px solid var(--border);
  padding:8px; border-radius:8px; box-shadow:0 6px 24px rgba(0,0,0,.08); display:none; min-width:180px;
}
.dropdown:hover .dropdown-content{ display:block; }
.dropdown-content a{ display:block; padding:8px 10px; color:var(--muted); }
.dropdown-content a:hover{ background:#f9fafb; color:var(--text); }

/* ========== Hero ========== */
.hero{ background:#fff; }
.hero-inner{ display:grid; grid-template-columns:1.3fr 0.7fr; gap:40px; align-items:center; padding:64px 0; }
.hero-copy h1{ font-size:clamp(28px,3.4vw,44px); line-height:1.1; margin:0 0 20px; }
.hero-art{ display:flex; align-items:center; justify-content:center; }
.hero-art img{ border-radius:12px; border:1px solid var(--border); box-shadow:0 20px 60px rgba(0,0,0,.08); max-width:380px; width:100%; height:auto; }

.hero.image-left .hero-inner{ grid-template-columns:0.7fr 1.3fr; }
.hero.image-left .hero-art{ order:-1; }

@media (max-width:900px){
  .hero-inner{ grid-template-columns:1fr; text-align:center; }
  .hero.image-left .hero-inner{ grid-template-columns:1fr; }
  .hero.image-left .hero-art{ order:0; }
}

/* Subhead */
.subhead{ padding:32px 0 4px; text-align:center; }
.subhead h2{ font-size:clamp(22px,2.6vw,30px); margin:0 0 8px; }
.subhead p{ color:var(--muted); max-width:760px; margin:0 auto; }
.cta-row{ display:inline-flex; gap:20px; margin-top:18px; align-items:center; }
.cta-row .link{ color:var(--brand); font-weight:600; }

/* Templates grid (gallery) */
.templates{ padding:28px 0 80px; }
.templates .grid-4 img{ aspect-ratio:16/11; object-fit:cover; width:100%; }
.card-title{ padding:12px; font-weight:600; font-size:14px; color:#374151; }

/* Footer (base) */
.site-footer{ border-top:1px solid var(--border); background:#fafafa; }
.footer-inner{ display:flex; align-items:center; justify-content:space-between; padding:20px 0; }
.footer-nav{ display:flex; gap:18px; }
.footer-nav a{ color:#6b7280; }
.footer-nav a:hover{ color:#111827; }

/* ========== Why Choose Us ========== */
.why-choose{ background:#fff; text-align:center; }
.section-title{ font-size:clamp(28px,3vw,38px); margin-bottom:50px; font-weight:700; color:#111827; }

.features-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:40px; }

.feature{ background:#fff; border:1px solid var(--border); border-radius:12px; padding:32px 20px; box-shadow:var(--shadow-sm); }
.feature-icon{ width:64px; height:64px; margin:0 auto 16px; display:block; object-fit:contain; }
.feature h3{ font-size:20px; margin-bottom:12px; color:#1f2937; }
.feature p{ color:var(--muted); font-size:15px; line-height:1.5; }

/* ========== Services (3-card overview) ========== */
.services{ background:#fff; text-align:center; }
.services-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:28px; margin-top:36px; }

.service-card{ background:#fff; border:1px solid var(--border); border-radius:12px; padding:24px 20px; box-shadow:var(--shadow-sm); }
.service-title{ font-size:19px; font-weight:700; color:#1f2937; margin:6px 0 10px; }
.service-desc{ color:var(--muted); font-size:15px; line-height:1.55; }
.services-cta{ margin-top:28px; }

/* ========== Services with Side Image ========== */
.services-with-art{ background:#fff; }
.services-inner{ display:grid; grid-template-columns:0.9fr 1.1fr; align-items:center; gap:40px; }
.services-art img{ width:100%; max-width:340px; height:auto; border-radius:12px; border:1px solid var(--border); box-shadow:var(--shadow-md); margin:0 auto; }
.services-content{ text-align:left; }
.services-with-art .services-grid{ display:grid; grid-template-columns:1fr; gap:24px; margin:30px 0; }
.services-with-art .service-card{ border-radius:10px; }

@media (max-width:900px){
  .features-grid{ grid-template-columns:1fr 1fr; }
  .services-inner{ grid-template-columns:1fr; text-align:center; }
  .services-art{ order:-1; margin-bottom:32px; }
}
@media (max-width:600px){ .features-grid{ grid-template-columns:1fr; } }

/* ========== Plans page ========== */
.page-hero{ background:#fff; }
.page-hero .container{ display:flex; align-items:center; justify-content:space-between; gap:40px; flex-wrap:wrap; }
.page-hero h1{ margin:0 0 10px; font-size:clamp(28px,3vw,38px); }
.page-hero p{ margin:0; color:var(--muted); }
.page-hero .quokka{ flex:0 0 200px; display:flex; justify-content:center; }
.page-hero .quokka img{ width:180px; height:auto; filter:drop-shadow(0 6px 12px rgba(0,0,0,.1)); }

.plans{ background:#fff; padding:10px 0 80px; }
.plans-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:22px; margin-top:18px; }

/* Keep position:relative from your original, plus your enhancements */
.plan-card{
  position:relative;
  background:#ffffff;
  border:1px solid rgba(37, 99, 235, 0.15);
  border-radius:16px;
  box-shadow:0 10px 24px rgba(0,0,0,.06);
  padding:28px;
  transition:all 0.25s ease;
}
.plan-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.3);
}
.plan-card.popular{
  border-color: var(--brand);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.25);
}
.plan-card .badge{
  position:absolute; top:-12px; left:18px; background:var(--brand); color:#fff; font-size:12px; font-weight:700;
  padding:4px 10px; border-radius:999px; box-shadow:0 4px 14px rgba(37,99,235,.35);
}

.plan-head{ text-align:center; margin-bottom:12px; }
.plan-head h3{ margin:6px 0 2px; font-size:18px; }
.price{ display:flex; gap:8px; align-items:baseline; justify-content:center; }
.price .amount{ font-size:34px; font-weight:800; letter-spacing:.2px; }
.price .period{ color:var(--muted); font-size:14px; }
.plan-features{ list-style:none; padding:0; margin:16px 0 18px; display:grid; gap:10px; }
.plan-features li{ color:#374151; font-size:15px; display:flex; gap:10px; }
.plan-features li::before{ content:"✓"; color:#16a34a; font-weight:700; }
.plan-cta{ display:flex; gap:10px; justify-content:center; }
.plan-cta .button{ font-weight:600; letter-spacing:0.3px; }

@media (max-width:1000px){ .plans-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:640px){ .plans-grid{ grid-template-columns:1fr; } }

/* optional: centered quokka under headline */
.page-hero-quokka{ margin-top:24px; display:flex; justify-content:center; }
.page-hero-quokka img{
  width:220px;
  height:auto;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.15));
  transition: transform 0.25s ease;
}
.page-hero-quokka img:hover{ transform: scale(1.04); }

/* ========== Contact page ========== */
.contact-wrap{ background:#fff; }
.contact-headline{
  text-transform:uppercase; letter-spacing:.4px; font-size:clamp(22px,2.6vw,28px);
  margin:10px 0 22px; color:#000;
}

/* Split layout (form left, image right) */
.split-layout{ padding:80px 0; }
.contact-split{ display:grid; grid-template-columns:1.1fr 0.9fr; gap:60px; align-items:center; }
.contact-form-side{ text-align:left; }
.contact-image-side img{ width:100%; max-width:380px; height:auto; border-radius:14px; box-shadow:0 14px 34px rgba(0,0,0,.1); margin:0 auto; }

/* Contact card: light theme (kept only the final version you’re actually using) */
.contact-card{
  background:#ffffff;
  border:1px solid #cfe1ff;
  border-radius:16px;
  padding:24px;
  color:#111827;
  box-shadow:0 10px 24px rgba(0,0,0,.06);
}
.contact-card .fineprint{ color:#6b7280; font-size:12px; margin:14px 2px 0; }

.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:16px; }
.form-field{ display:flex; flex-direction:column; gap:6px; }
.form-field.span-2{ grid-column:1 / -1; }
.form-field label{ font-size:13px; color:#374151; }

.contact-card .form-field input,
.contact-card .form-field textarea{
  appearance:none;
  background:#f9fbff;
  border:1px solid #cfe1ff;
  color:#111827;
  border-radius:10px;
  padding:12px 14px;
  font-size:15px;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.form-field textarea{ resize:vertical; }

.contact-card .form-field input::placeholder,
.contact-card .form-field textarea::placeholder{ color:#94a3b8; }

.contact-card .form-field input:focus,
.contact-card .form-field textarea:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,.20);
  background:#ffffff;
}

@media (max-width:900px){
  .contact-split{ grid-template-columns:1fr; text-align:center; gap:28px; }
  .contact-image-side{ order:-1; margin-bottom:24px; }
  .contact-form-side{ text-align:center; }
  .form-grid{ grid-template-columns:1fr; }
  .form-field.span-2{ grid-column:auto; }
}

/* === Portfolio grid === */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 24px;
}

.portfolio-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,.05);
  padding: 0;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  border-color: rgba(0,0,0,0.05);
  transition: box-shadow .18s ease, transform .18s ease;
}

.portfolio-card:hover {
  box-shadow: 0 16px 32px rgba(0,0,0,.08);
  transform: translateY(-3px);
}

.portfolio-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.portfolio-info { padding: 16px 18px 20px; }

.portfolio-name {
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.portfolio-tagline {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

/* === Lightbox modal === */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.lightbox-overlay.active { display: flex; }

.lightbox-dialog {
  background: #fff;
  border-radius: 16px;
  width: min(900px, 90vw);
  max-height: 90vh;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
  padding: 8px 10px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  z-index: 2;
}

.lightbox-header {
  padding: 16px 56px 16px 20px; /* extra room for X */
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center; /* was baseline */
  justify-content: space-between;
  gap: 12px;
}

.lightbox-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.lightbox-demo-link {
  font-size: 14px;
  color: var(--brand);
  font-weight: 500;
  white-space: nowrap;
  margin-left: auto;
  margin-right: 12px;
}

.lightbox-iframe-wrap{ flex:1; background:#0f172a; }

#lightboxFrame{
  width: 100%;
  height: min(75vh, 720px);
  border: 0;
  display: block;
  background: #ffffff;
}

@media (max-width: 640px){
  #lightboxFrame{ height: 80vh; }
}

.lightbox-image-wrap {
  position: relative;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 400px;
  max-height: calc(90vh - 140px);
}

#lightboxImage {
  border-radius: 8px;
  width: 100%;
  max-width: 780px;
  max-height: 100%;
  object-fit: contain;
  background: #1e2538;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background:#fff;
  border:1px solid var(--border);
  border-radius:8px;
  box-shadow:0 10px 24px rgba(0,0,0,.2);
  font-size:20px;
  font-weight:500;
  line-height:1;
  width:36px;
  height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color:#111827;
}

.nav-btn.prev { left: 16px; }
.nav-btn.next { right: 16px; }

.lightbox-count {
  padding: 12px 20px 16px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
  background: #fff;
}

/* PREMIUM FOOTER */
.premium-footer {
  background: #111827;
  color: #e5e7eb;
  padding: 70px 0;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 50px;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #9ca3af;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.footer-tagline {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: #9ca3af;
  max-width: 260px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a,
.footer-contact a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-contact a:hover { color: #3b82f6; }

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-location {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-top: 10px;
}

.copyright {
  font-size: 0.8rem;
  color: #6b7280;
}

/* ENHANCED HEADER */
.enhanced-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

/* This overrides your earlier .header-inner; kept because you’re using enhanced-header */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 75px;
}

.brand-name {
  font-weight: 600;
  font-size: 1.05rem;
}

.nav a {
  margin: 0 18px;
  text-decoration: none;
  font-weight: 500;
  color: #111827;
  position: relative;
  transition: color 0.2s ease;
}

.nav a:hover { color: #3b82f6; }

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 2px;
  background: #3b82f6;
  transition: width 0.25s ease;
}

.nav a:hover::after { width: 100%; }

.header-cta .button {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* accessibility helper */
.sr-only{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  border:0;
}

/* hamburger hidden on desktop */
.nav-toggle{
  display:none;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:8px 12px;
  font-size:18px;
  cursor:pointer;
}

/* Desktop: normal nav */
@media (min-width:900px){
  .nav{ display:flex; }
}

/* Mobile: collapse nav + show hamburger */
@media (max-width:899px){
  .nav{ 
    display:none; 
    position:absolute;
    top:75px; /* adjust if your header height differs */
    left:0; right:0;
    background:#fff;
    border-bottom:1px solid var(--border);
    padding:14px 16px;
    flex-direction:column;
    gap:12px;
  }

  .nav.open{ display:flex; }

  .nav-toggle{ display:inline-block; }

  /* make header position relative so dropdown anchors correctly */
  .site-header{ position:sticky; }
  .header-inner{ position:relative; }
}

/* ===== Mobile: force space between stacked cards ===== */
@media (max-width: 640px){
  /* If these are the “feature” cards */
  .feature + .feature{
    margin-top: 24px;
  }

  /* If these are the “service” cards */
  .service-card + .service-card{
    margin-top: 24px;
  }

  /* Generic fallback: any .card stacked vertically */
  .card + .card{
    margin-top: 24px;
  }
}

@media (max-width: 640px){
  .section{ padding: 64px 0; }        /* slightly tighter than 80 but still roomy */
  .section + .section{ margin-top: 16px; }
}