/* =========================================
   Palisades Design Group – Global Styles
   Intelligent Homes • Design Technology • Community
   ========================================= */

/* --------- CSS RESET (lightweight) --------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at top left, #f0f4f7 0, #f6f6f6 35%, #fdfdfd 100%);
  color: #1f2933;
  line-height: 1.6;
}

/* --------- VARIABLES (via custom props) --------- */
:root {
  --color-bg: #f5f7fa;
  --color-page: #ffffff;
  --color-text: #1f2933;
  --color-muted: #6b7280;
  --color-line: #e1e5ea;

  --color-accent: #306d7a;         /* coastal blue-green */
  --color-accent-soft: #e3f0f3;
  --color-accent-dark: #214852;

  --nav-bg: #0b1720;
  --hero-bg1: #0b1720;
  --hero-bg2: #1f3a45;
  --hero-bg3: #16333d;

  --radius-card: 14px;
  --radius-pill: 999px;
  --shadow-soft: 0 14px 40px rgba(15, 23, 42, 0.08);
  --max-width: 1080px;
  --transition-fast: 0.2s ease-out;
}

/* --------- GLOBAL ELEMENTS --------- */
a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

p {
  margin-bottom: 0.75rem;
  color: var(--color-muted);
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #111827;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--color-muted);
}

img {
  max-width: 100%;
  display: block;
}

/* --------- LAYOUT WRAPPER --------- */
.page-wrapper {
  min-height: 100vh;
}

/* Sections */
.section {
  padding: 3.5rem 1.25rem;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Utility spacing */
.mb-0 {
  margin-bottom: 0 !important;
}
.mb-1 {
  margin-bottom: 0.25rem !important;
}
.mb-2 {
  margin-bottom: 0.5rem !important;
}
.mb-3 {
  margin-bottom: 0.75rem !important;
}
.mb-4 {
  margin-bottom: 1rem !important;
}
.mt-2 {
  margin-top: 0.5rem !important;
}
.mt-4 {
  margin-top: 1rem !important;
}

/* =========================================
   HEADER & NAV
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 23, 32, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.nav-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: radial-gradient(circle at 10% 0, #3b82f6 0, transparent 55%),
    radial-gradient(circle at 90% 100%, #14b8a6 0, transparent 55%),
    radial-gradient(circle at 0 100%, #fbbf24 0, transparent 55%);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.45);
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
}

.nav-logo-text span:first-child {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e5e7eb;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-logo-text span:last-child {
  font-size: 0.7rem;
  color: #9ca3af;
}

/* Nav links */
.nav-links {
  display: none;
  gap: 1.25rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  color: #e5e7eb;
}

.nav-links a:hover {
  color: #f9fafb;
}

.nav-cta {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(248, 250, 252, 0.7);
  font-size: 0.85rem;
  font-weight: 500;
  color: #f9fafb;
  background: transparent;
  transition: background var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.nav-cta:hover {
  background: #f9fafb;
  color: #0b1720;
  border-color: transparent;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.5);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Mobile nav toggle */
.nav-toggle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 1.8px;
  background: #e5e7eb;
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.8px;
  background: #e5e7eb;
}

.nav-toggle span::before {
  top: -5px;
}
.nav-toggle span::after {
  top: 5px;
}

/* Mobile nav panel */
.nav-mobile {
  display: none;
  background: #0b1720;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.nav-mobile-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-mobile a {
  color: #e5e7eb;
  font-size: 0.9rem;
}

/* JS: add .open to .nav-mobile to show */
.nav-mobile.open {
  display: block;
}

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

  .nav-links {
    display: flex;
  }

  .nav-mobile {
    display: none !important;
  }
}

/* =========================================
   HERO
   ========================================= */
.hero {
  padding: 4.5rem 1.25rem 3.5rem;
  background: linear-gradient(135deg, var(--hero-bg1) 0, var(--hero-bg2) 48%, var(--hero-bg3) 100%);
  color: #f9fafb;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.16) 0, transparent 50%),
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.08) 0, transparent 55%);
  opacity: 0.9;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 3vw + 1rem, 2.8rem);
  margin-bottom: 0.75rem;
  color: #fdfdfd;
}

.hero-subtitle {
  font-size: 1.05rem;
  max-width: 620px;
  color: #dde8ec;
  margin-bottom: 1.75rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.hero-badge {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.55);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), border-color var(--transition-fast),
    color var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: #f9fafb;
  color: #111827;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.35);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: #e5f3f7;
  border-color: rgba(229, 243, 247, 0.7);
}

.btn-outline:hover {
  background: rgba(17, 24, 39, 0.22);
  text-decoration: none;
}

/* =========================================
   CONTENT SECTIONS
   ========================================= */
.section-intro {
  background: var(--color-page);
}

.section-alt {
  background: var(--color-bg);
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.section-dark {
  background: #101720;
  color: #f9fafb;
}

.section-inner > h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.section-inner > p:first-of-type {
  margin-bottom: 1.1rem;
}

/* Info box */
.info-box {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: #f4f6f8;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  font-size: 0.9rem;
  color: #4b5563;
}

/* Cards / feature grid */
.cards-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.card {
  background: #ffffff;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-line);
  padding: 1.25rem 1.4rem;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.03);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(48, 109, 122, 0.07), transparent 40%);
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--color-accent-dark);
}

/* Portfolio grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.2rem;
}

.portfolio-item {
  background: #ffffff;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-line);
  padding: 1.1rem 1.3rem;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.03);
}

.portfolio-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

/* FAQ */
.faq-item {
  border-radius: var(--radius-card);
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--color-line);
  background: #ffffff;
  margin-bottom: 0.7rem;
}

.faq-item h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: #111827;
}

/* Contact form */
.contact-form {
  max-width: 640px;
  margin-top: 1.5rem;
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #374151;
}

.form-row input,
.form-row textarea {
  width: 100%;
  border-radius: 9px;
  border: 1px solid #d1d5db;
  padding: 0.55rem 0.7rem;
  font-family: inherit;
  font-size: 0.92rem;
  color: #111827;
  background: #f9fafb;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px rgba(48, 109, 122, 0.15);
  background: #ffffff;
}

.form-row textarea {
  min-height: 120px;
  resize: vertical;
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: #020617;
  color: #9ca3af;
  padding: 2.5rem 1.25rem 2rem;
  border-top: 1px solid #1e293b;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-brand {
  max-width: 360px;
}

.footer-brand h3 {
  color: #e5e7eb;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.footer-brand p {
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.footer-links-column h4 {
  font-size: 0.9rem;
  color: #e5e7eb;
  margin-bottom: 0.5rem;
}

.footer-links-column a {
  display: block;
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

.footer-links-column a:hover {
  color: #e5e7eb;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1rem;
  font-size: 0.8rem;
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (min-width: 768px) {
  .section {
    padding: 4rem 2rem;
  }

  .hero {
    padding: 5rem 2rem 4rem;
  }

  .hero-inner {
    min-height: 260px;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
