/* ============================================================
   Vaastu Building Services — base.css
   Shared "chrome" used by every page: design tokens, reset,
   typography, top bar, navbar, buttons, section commons,
   footer, logo, inline contact form, and shared responsive
   rules. Page-specific styles live in assets/css/pages/<page>.css
   and are loaded AFTER this file so they can override.
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
  --primary: #1a3c5e;
  --primary-dark: #0f2540;
  --primary-light: #2a5a8e;
  --accent: #b35900;
  --accent-dark: #8f4700;
  --accent-light: #f0b840;
  --white: #ffffff;
  --light-bg: #f5f7fa;
  --light-gray: #e8ecf0;
  --text-dark: #1a1a2e;
  --text-mid: #3d4a5c;
  --text-light: #5a6a7e;
  --green: #2e7d32;
  --shadow-sm: 0 2px 8px rgba(26,60,94,0.10);
  --shadow-md: 0 6px 24px rgba(26,60,94,0.14);
  --shadow-lg: 0 12px 48px rgba(26,60,94,0.18);
  --radius: 8px;
  --radius-lg: 14px;
}

/* ---------- RESET & BASE ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* PAGE TRANSITION */
body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  opacity: 0;
  animation: pageIn 0.4s ease forwards;
}
@keyframes pageIn { to { opacity: 1; } }
body.fade-out { opacity: 0; transition: opacity 0.35s ease; }

/* SKIP LINK (accessibility) */
.skip-link { position: absolute; left: -999px; top: 0; z-index: 2000; background: var(--accent); color: var(--white); padding: 10px 18px; border-radius: 0 0 var(--radius) 0; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1,h2,h3,h4,h5,h6 { font-family: 'Montserrat', sans-serif; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ---------- TOP BAR ---------- */
.topbar {
  background: var(--primary-dark);
  color: #b8cde0;
  font-size: 13px;
  padding: 10px 0;
  width: 100%;
}

.topbar-inner {
  max-width: 1200px;
  margin: auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-left {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  flex-shrink: 1;
}

.topbar-left a {
  color: #b8cde0;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
}

.topbar-left a:hover {
  color: var(--accent);
}

.topbar-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  margin-left: auto;
  padding-right: 0;
}

.reg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #b0b8cc;
  font-size: 11.5px;
  white-space: nowrap;
}

.reg-item svg {
  opacity: .65;
  flex-shrink: 0;
}

.reg-badge {
  background: rgba(255,255,255,0.07);
  border: 0.5px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  padding: 1px 6px;
  color: #d4daea;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
}

/* Hide left side on mobile */
@media (max-width: 768px) {
  .topbar-left { display: none; }
  .topbar-right { width: 100%; justify-content: center; flex-wrap: wrap; gap: 8px 16px; }
}

/* ---------- NAVBAR ---------- */
nav { background: var(--white); position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow-sm); }
.nav-inner { max-width: 1200px; margin: auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 12px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { padding: 8px 14px; border-radius: var(--radius); font-size: 14px; font-weight: 600; color: var(--text-mid); font-family: 'Montserrat', sans-serif; transition: all 0.2s; }
.nav-links a:hover { color: var(--primary); background: var(--light-bg); }
/* NOTE: `.nav-links a.active` (current-page highlight) is intentionally NOT
   here — only some pages define it. It lives in each page's own CSS so pages
   that never styled their active nav item keep their exact original look. */
.nav-cta { background: var(--accent) !important; color: var(--white) !important; padding: 10px 20px !important; border-radius: var(--radius) !important; font-weight: 700 !important; }
.nav-cta:hover { background: var(--accent-dark) !important; color: var(--white) !important; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.hamburger span { width: 24px; height: 2px; background: var(--primary); border-radius: 2px; transition: all 0.3s; }

/* ---------- BUTTONS ---------- */
.btn-primary { background: var(--accent); color: var(--white); padding: 14px 30px; border-radius: var(--radius); font-weight: 700; font-family: 'Montserrat', sans-serif; font-size: 14px; letter-spacing: 0.5px; transition: all 0.2s; border: 2px solid var(--accent); cursor: pointer; display: inline-block; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-outline { background: transparent; color: var(--white); padding: 14px 30px; border-radius: var(--radius); font-weight: 700; font-family: 'Montserrat', sans-serif; font-size: 14px; letter-spacing: 0.5px; transition: all 0.2s; border: 2px solid rgba(255,255,255,0.7); cursor: pointer; display: inline-block; }
.btn-outline:hover { background: rgba(255,255,255,0.15); border-color: var(--white); }

/* ---------- SECTION COMMONS ---------- */
section { padding: 80px 24px; }
.section-inner { max-width: 1200px; margin: auto; }
.section-tag { font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; display: block; }
.section-title { font-size: 36px; font-weight: 800; color: var(--primary); line-height: 1.2; margin-bottom: 16px; }
.section-desc { font-size: 16px; color: var(--text-light); line-height: 1.8; max-width: 600px; }

/* ---------- FOOTER ---------- */
footer { background: var(--primary-dark); color: rgba(255,255,255,0.75); padding: 60px 24px 0; }
.footer-grid { max-width: 1200px; margin: auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; }
.footer-col h3 { font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 20px; letter-spacing: 1px; text-transform: uppercase; }
.footer-brand p { font-size: 14px; line-height: 1.8; margin: 12px 0 24px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 36px; height: 36px; background: rgba(255,255,255,0.08); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; color: rgba(255,255,255,0.7); transition: all 0.2s; }
.footer-social a:hover { background: var(--accent); color: var(--white); }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,0.65); transition: color 0.2s; display: flex; align-items: center; gap: 8px; }
.footer-links a:hover { color: var(--accent); }
.footer-links a svg { width: 14px; height: 14px; fill: var(--accent); flex-shrink: 0; }
.footer-contact-item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; font-size: 14px; line-height: 1.6; }
.footer-contact-item svg { width: 16px; height: 16px; fill: var(--accent); flex-shrink: 0; margin-top: 3px; }
.footer-bottom { max-width: 1200px; margin: 40px auto 0; padding: 20px 0; border-top: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13px; }
.footer-bottom a { color: var(--accent); }

/* ---------- LOGO IMAGE ---------- */
.logo-img {
  height: auto;
  width: 158px;
  display: block;
  object-fit: contain;
}
.logo-img--footer {
  filter: invert(1) brightness(2);
  width: 300px;
  height: auto;
}

/* ---------- INLINE CONTACT FORM (inside dark faq-cta card) ---------- */
.cf-form { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.cf-hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cf-form input, .cf-form select, .cf-form textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius);
  border: 1.5px solid rgba(255,255,255,0.22); background: rgba(255,255,255,0.96);
  color: var(--text-dark); font-family: 'Open Sans', sans-serif; font-size: 14px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s; resize: vertical;
}
.cf-form input::placeholder, .cf-form textarea::placeholder { color: var(--text-light); }
.cf-form select { cursor: pointer; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236b7a90'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 36px; }
.cf-form input:focus, .cf-form select:focus, .cf-form textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,160,32,0.30); }
.cf-submit { display: block; width: 100%; text-align: center; margin-top: 4px; border: none; cursor: pointer; }
.cf-submit:disabled { opacity: 0.65; cursor: not-allowed; }
.cf-status { font-size: 13px; line-height: 1.5; margin: 0; min-height: 1px; }
.cf-success { text-align: center; padding: 24px 8px 8px; }
.cf-success h4 { color: var(--white); font-size: 20px; font-weight: 800; margin: 10px 0 6px; }
.cf-success p { color: rgba(255,255,255,0.78); font-size: 14px; line-height: 1.6; margin: 0; }
@media (max-width: 600px) { .cf-row { grid-template-columns: 1fr; } }

/* ---------- SHARED RESPONSIVE (chrome: nav, footer, section title) ---------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .section-title { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar-left { display: none; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  nav { position: relative; }
  .nav-mobile-open .nav-links { display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0; background: var(--white); box-shadow: var(--shadow-md); padding: 16px; z-index: 999; gap: 4px; }
  .nav-links a { padding: 12px 16px; }
}
