/* ==========================================================================
   OPUS V2 — PREMIUM DESIGN SYSTEM
   Variables injected by build.py at build time
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@500;600;700;800&display=swap');

/* ---------- 1. Design Tokens -------------------------------------------- */
:root {
  /* Brand colors — replaced by build.py */
  --color-primary:      #171717;
  --color-primary-dark: #0A0A0A;
  --color-primary-soft: #262626;
  --color-accent:       #D4AF37;
  --color-accent-dark:  #B8860B;
  --color-cream:        #FAFAFA;
  --color-cream-soft:   #FFFFFF;

  /* Fixed semantic tokens */
  --text-main:    #1e293b;
  --text-muted:   #64748b;
  --white:        #ffffff;
  --border:       #e2e8f0;

  /* Typography */
  --font-body:    'Inter', system-ui, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 20px 40px rgba(0,0,0,.14);

  /* Layout */
  --max-w: 1200px;
  --section-pad: 100px;
}

/* ---------- 2. Reset & Base -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}

/* ---------- 3. Layout Utilities ---------------------------------------- */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
}

section { padding: var(--section-pad) 0; }

.section-alt { background-color: var(--color-cream); }

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  margin-bottom: 16px;
}
.section-header p { color: var(--text-muted); font-size: 1.1rem; }

/* ---------- 4. Buttons ------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--white);
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-cta {
  background: var(--color-accent);
  color: var(--white);
  border-color: var(--color-accent);
}
.btn-cta:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.7);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
}

/* ---------- 5. Header -------------------------------------------------- */
header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 900;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 14px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.logo {
  flex-shrink: 1; /* Allow to shrink if space is tight */
  min-width: 0;
}
.logo-text {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 3vw, 1.4rem); /* Responsive font size for logo */
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Nav Links */
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  font-weight: 500;
  font-size: 0.93rem;
  color: var(--text-main);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--color-accent); }

/* Header CTA group */
.header-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.phone-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
  white-space: nowrap;
}
.phone-link i { color: var(--color-accent); }

/* Hamburger — hidden desktop */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--color-primary);
  padding: 4px;
}

/* ---------- 6. Hero ---------------------------------------------------- */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 100px;
  background-image:
    linear-gradient(to bottom, rgba(15,23,42,0.25) 0%, rgba(15,23,42,0.78) 100%),
    url('assets/images/homepage_hero.jpg');
  background-size: cover;
  background-position: center top;
  color: var(--white);
  padding-top: 120px; /* clear fixed header */
}

.hero-content {
  max-width: 700px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  opacity: 0.9;
  margin-bottom: 36px;
  max-width: 560px;
}

.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- 7. Trust Bar ----------------------------------------------- */
.trust-bar {
  background: var(--color-primary);
  padding: 24px 0;
}

.trust-items {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 500;
  font-size: 0.95rem;
}
.trust-item i { color: var(--color-accent); }

/* ---------- 8. Cards --------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

/* Locked 2-column grid for "Why Choose Us" — always 2x2 on desktop */
.grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

@media (max-width: 992px) {
  .grid-2col { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2col { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.card:hover::before { transform: scaleX(1); }
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card i {
  font-size: 2.2rem;
  color: var(--color-primary);
  margin-bottom: 20px;
  display: block;
}
.card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}
.card p { color: var(--text-muted); font-size: 0.97rem; }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
  transition: gap 0.2s;
}
.card-link:hover { gap: 10px; color: var(--color-accent); }
.card-link i { font-size: 0.85rem; }

/* ---------- 9. CTA Band ------------------------------------------------ */
.cta-band {
  background: var(--color-primary);
  color: var(--white);
  text-align: center;
  padding: 80px 0;
}
.cta-band h2 { color: var(--white); margin-bottom: 16px; font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.cta-band p  { opacity: .85; margin-bottom: 36px; font-size: 1.1rem; }

/* ---------- 10. Footer ------------------------------------------------- */
footer {
  background: var(--color-primary-dark);
  color: var(--white);
  padding: 80px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 64px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.footer-logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-col p { opacity: .7; font-size: 0.95rem; line-height: 1.7; }

.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a  { opacity: .7; font-size: 0.95rem; transition: opacity 0.2s, color 0.2s; }
.footer-col ul a:hover { opacity: 1; color: var(--color-accent); }

.contact-info li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  opacity: .75;
  font-size: 0.92rem;
  margin-bottom: 12px;
}
.contact-info i { color: var(--color-accent); margin-top: 3px; flex-shrink: 0; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  opacity: .55;
}

/* ---------- 11. Mobile Menu / Responsive ------------------------------- */

/* Tablet */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile */
@media (max-width: 768px) {
  :root { --section-pad: 64px; }

  /* Header */
  .nav-links    { display: none; }
  .hamburger    { display: block; }
  .phone-link span { display: none; } /* show icon only */
  .btn          { padding: 10px 16px; font-size: 0.88rem; }

  /* Hero */
  .hero {
    min-height: 85vh;
    padding-bottom: 64px;
    align-items: center;
    text-align: center;
  }
  .hero-content { margin-inline: auto; }
  .hero p       { margin-inline: auto; }
  .hero-btns    { justify-content: center; }

  /* Cards */
  .grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-grid   { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* Mobile navigation open state (toggled by JS) */
header.nav-open .nav-links {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--white);
  padding: 20px 24px 28px;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  gap: 20px;
}
