/* ==========================================================================
   FloorPlanWorld - Landing Page
   Refactored for conversion: clearer hierarchy, stronger CTAs, mobile-first.
   ========================================================================== */

/* ----- 1. TOKENS ----- */
:root {
  --primary: #0097a7;
  --primary-dark: #00838f;
  --primary-light: #b2ebf2;
  --primary-soft: rgba(0, 151, 167, 0.08);
  --primary-soft-2: rgba(0, 151, 167, 0.14);
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-soft: #eef2f6;
  --bg-dark: #0f172a;
  --bg-darker: #0b1224;
  --text: #1e293b;
  --text-light: #64748b;
  --text-on-dark: #e2e8f0;
  --border: #e2e8f0;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.12);
  --shadow-primary: 0 8px 24px rgba(0, 151, 167, 0.25);
  --max: 1200px;
  --nav-h: 72px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ----- 2. RESET & BASE ----- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { color: var(--text); line-height: 1.15; letter-spacing: -0.02em; }
p { line-height: 1.7; }
button { font-family: inherit; }

/* Focus visibility for accessibility */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--bg-dark);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { left: 16px; top: 16px; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ----- 3. BUTTONS ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition),
              box-shadow var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 12px 32px rgba(0, 151, 167, 0.35); }

.btn-secondary {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-secondary:hover { background: var(--primary-soft); }

.btn-light {
  background: #fff;
  color: var(--bg-dark);
}
.btn-light:hover { background: #f1f5f9; }

.btn-sm { padding: 8px 16px; font-size: 0.9rem; }
.btn-large { padding: 15px 30px; font-size: 1.05rem; }

/* ----- 4. NAVBAR ----- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
  border-bottom-color: var(--border);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 16px;
}
/* Fallback for pages that put a .container directly inside .navbar (legal/user-gallery) */
.navbar > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 16px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.nav-brand__mark { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--primary); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-signin {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-light);
  transition: color var(--transition);
}
.nav-signin:hover { color: var(--primary); }

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.mobile-menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 24px;
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a {
  padding: 12px 0;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu .btn { margin-top: 12px; width: 100%; }
.mobile-menu__signin { color: var(--text-light) !important; }

/* ----- 5. HERO ----- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 56px) 0 88px;
  background:
    radial-gradient(60% 60% at 80% 0%, rgba(0, 151, 167, 0.08), transparent 60%),
    radial-gradient(50% 50% at 10% 100%, rgba(0, 151, 167, 0.06), transparent 60%),
    linear-gradient(180deg, #f0fdfa 0%, #e0f7fa 60%, #f5f7fa 100%);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 20px;
  letter-spacing: -0.025em;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, #26c6da 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 32px;
  max-width: 520px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-trust {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
}
.hero-trust svg { color: var(--primary); }

.hero__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 360px;
}
.stage__panel {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stage__panel:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stage__panel figcaption {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stage__art { width: 100%; height: auto; display: block; border-radius: 8px; }
.stage__arrow {
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

.hero-socialproof {
  margin-top: 20px;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
}
.hero-socialproof strong { color: var(--text); font-weight: 700; }

/* ----- 6. STATS ----- */
.stats {
  padding: 44px 0;
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat { text-align: center; }
.stat__num {
  display: block;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat__label {
  display: block;
  margin-top: 6px;
  color: var(--text-light);
  font-size: 0.875rem;
  font-weight: 500;
}

/* ----- 7. SECTION PRIMITIVES ----- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-community { background: var(--bg); }

.section__head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section__head h2 {
  font-size: clamp(1.875rem, 3.5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 12px;
}
.section__head p {
  color: var(--text-light);
  font-size: 1.1rem;
  line-height: 1.6;
}
.section__head--light h2 { color: #fff; }
.section__head--light p { color: rgba(255, 255, 255, 0.75); }
.section__foot { text-align: center; margin-top: 40px; }

/* Legacy section-title/subtitle for older pages (preserved) */
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.15rem;
  margin-bottom: 64px;
}

/* ----- 8. COMMUNITY CARDS (used on landing + user gallery) ----- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
}
.gallery-loading,
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 20px;
  color: var(--text-light);
  font-size: 1.05rem;
}

.gallery-item {
  background: #fff;
  border-radius: var(--radius);
  overflow: visible;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--bg-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.gallery-item:hover .card-image img { transform: scale(1.05); }

.card-placeholder {
  font-size: 64px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.card-placeholder svg { width: 64px; height: 64px; }

.card-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.card-date {
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 9px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.card-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.card-content { padding: 14px 14px 6px; flex: 1; }
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 2px;
}
.card-author-row { margin-bottom: 6px; }
.gallery-author {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}
.gallery-author:hover { color: var(--primary-dark); text-decoration: underline; }

.card-meta {
  display: flex;
  gap: 14px;
  color: var(--text-light);
  font-size: 0.78rem;
  margin-top: 6px;
}
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }

.card-actions {
  display: flex;
  gap: 8px;
  padding: 8px 12px 12px;
}
.card-actions .btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.82rem;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
  text-decoration: none;
  border-width: 1px;
  border-radius: 10px;
  font-weight: 600;
  line-height: 1;
}
.card-actions .btn:hover { transform: none; }
.card-actions .btn-primary { background: var(--primary); color: #fff; box-shadow: none; }
.card-actions .btn-primary:hover { background: var(--primary-dark); box-shadow: none; }
.card-actions .btn-secondary { background: #fff; color: var(--primary); border: 1px solid var(--border); }
.card-actions .btn-secondary:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

/* Card action buttons — full-width, horizontal icon+label */
.card-actions a,
.info-wrapper,
.btn-info-disabled {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  text-decoration: none;
  color: #333;
}
.card-actions a:hover,
.info-wrapper:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.btn-icon { font-size: 18px; line-height: 1; }
.btn-label { font-size: 0.82rem; font-weight: 600; }
.btn-view { color: #0097a7; }
.btn-info { color: #666; }
.btn-info-disabled { opacity: 0.4; cursor: not-allowed; }
.btn-info-disabled:hover { border-color: #d0d0d0; background: white; color: #666; }

.info-wrapper { position: relative; }
.info-wrapper .btn-info {
  all: unset;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.info-wrapper .popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  z-index: 1000;
}
.info-wrapper .popover.active { transform: translateX(-50%) translateY(0); }
.info-wrapper .popover::after { bottom: -6px; left: 50%; margin-left: -6px; }

.popover {
  width: 280px;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}
.popover.active { opacity: 1; visibility: visible; }
.popover::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transform: rotate(45deg);
}
.popover-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.popover-content {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
  max-height: 150px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ----- 9. TIMELINE (How it works) ----- */
.timeline {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 32px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary), var(--primary-light));
  z-index: 0;
}
.timeline__step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  position: relative;
  z-index: 1;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.timeline__step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}
.timeline__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #26c6da);
  color: #fff;
  margin-bottom: 14px;
  box-shadow: var(--shadow-primary);
}
.timeline__n {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.timeline__step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.timeline__step p {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ----- 10. FORK / REUSE ----- */
.section-fork {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1e293b 100%);
  color: #fff;
}
.fork-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 56px;
}
.fork-node { text-align: center; }
.fork-node__tag {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fork-node__art {
  width: 240px;
  height: 110px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  transition: transform var(--transition), border-color var(--transition);
}
.fork-node__art:hover { transform: translateY(-3px); border-color: var(--primary); }
.fork-node__art svg { width: 70%; height: 70%; }
.art--orig { background: linear-gradient(135deg, #1e293b, #0f172a); }
.art--fork { background: linear-gradient(135deg, #0e7490, #0f172a); }
.art--yours { background: linear-gradient(135deg, #0097a7, #0e7490); border-color: rgba(0, 151, 167, 0.4); }
.fork-arrow { color: var(--primary); font-size: 22px; font-weight: 700; line-height: 1; }
.fork-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.fork-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}
.fork-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.06);
}
.fork-card h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.fork-card p { color: rgba(255, 255, 255, 0.7); font-size: 0.92rem; }

/* ----- 11. FEATURES ----- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  padding: 32px 28px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 18px;
}
.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card p { color: var(--text-light); font-size: 0.95rem; line-height: 1.6; }

/* ----- 12. DESIGN TYPES ----- */
.type-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.type-card {
  text-align: center;
  padding: 0;
  background: transparent;
  border: 0;
  transition: transform var(--transition);
  cursor: default;
}
.type-card__art {
  height: 120px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.type-card__art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.18) 100%);
  pointer-events: none;
}
.type-icon {
  position: relative;
  z-index: 1;
  width: 60px;
  height: 60px;
  color: #fff;
  opacity: 0.95;
  transition: transform var(--transition);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}
.type-card:hover .type-icon { transform: scale(1.08); }
.type-card:hover .type-card__art { transform: translateY(-4px); box-shadow: var(--shadow); }
.type-card span {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}
.type--house { background: linear-gradient(135deg, #06b6d4, #0e7490); }
.type--apartment { background: linear-gradient(135deg, #22d3ee, #155e75); }
.type--building { background: linear-gradient(135deg, #0e7490, #1e293b); }
.type--office { background: linear-gradient(135deg, #0891b2, #0f172a); }
.type--commercial { background: linear-gradient(135deg, #334155, #0f172a); }
.type--villa { background: linear-gradient(135deg, #06b6d4, #334155); }

/* ----- 13. WHY REGISTER ----- */
.section-register { background: var(--bg-soft); }
.register {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.register h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.register__lead {
  color: var(--text-light);
  font-size: 1.05rem;
  margin-bottom: 24px;
}
.benefits {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}
.benefits li {
  position: relative;
  padding-left: 32px;
  font-weight: 500;
  color: var(--text);
  font-size: 1rem;
}
.benefits li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 1px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: var(--shadow-primary);
}

.register__art {
  height: 380px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary), var(--bg-dark));
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.register__art-card {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: rotate(-2deg);
  transition: transform var(--transition);
}
.register__art:hover .register__art-card { transform: rotate(0deg) translateY(-4px); }
.register__art-head {
  background: #f1f5f9;
  padding: 10px 14px;
  display: flex;
  gap: 6px;
}
.register__art-dot { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; }
.register__art-dot:nth-child(1) { background: #ef4444; }
.register__art-dot:nth-child(2) { background: #f59e0b; }
.register__art-dot:nth-child(3) { background: #22c55e; }
.register__art-body { padding: 20px; }
.register__art-row {
  height: 12px;
  background: linear-gradient(90deg, var(--primary-light), transparent);
  border-radius: 4px;
  margin-bottom: 10px;
}
.register__art-row--short { width: 60%; }
.register__art-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.register__art-grid div {
  aspect-ratio: 1;
  background: var(--primary-soft);
  border-radius: 8px;
}
.register__art-grid div:nth-child(1) { background: var(--primary); }
.register__art-grid div:nth-child(2) { background: var(--primary-light); }
.register__art-grid div:nth-child(3) { background: var(--primary-soft-2); }

/* ----- 14. FINAL CTA ----- */
.final-cta {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1e293b 100%);
  padding: 96px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40% 50% at 20% 50%, rgba(0, 151, 167, 0.25), transparent 60%),
    radial-gradient(40% 50% at 80% 50%, rgba(38, 198, 218, 0.18), transparent 60%);
  pointer-events: none;
}
.final-cta__inner { position: relative; z-index: 1; }
.final-cta h2 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.final-cta p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.15rem;
  margin: 0 0 28px;
}
.final-cta__note {
  font-size: 0.85rem;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.6);
}

/* ----- 15. STICKY MOBILE CTA ----- */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 90;
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-primary);
  text-decoration: none;
  transform: translateY(120%);
  transition: transform var(--transition), opacity var(--transition);
  opacity: 0;
}
.sticky-cta.is-visible { transform: translateY(0); opacity: 1; }

/* ----- 16. FOOTER ----- */
.footer {
  background: var(--bg-darker);
  padding: 56px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
}
.footer-brand svg { color: var(--primary); }
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  color: var(--text-on-dark);
  text-decoration: none;
  opacity: 0.7;
  font-size: 0.9rem;
  transition: opacity var(--transition), color var(--transition);
}
.footer-links a:hover { opacity: 1; color: var(--primary-light); }
.footer-legal { display: flex; gap: 20px; align-items: center; }
.footer-legal a {
  color: var(--text-on-dark);
  text-decoration: none;
  opacity: 0.6;
  font-size: 0.82rem;
  transition: opacity var(--transition), color var(--transition);
}
.footer-legal a:hover { opacity: 1; color: var(--primary-light); }
.footer-contact { display: flex; align-items: center; }
.footer-contact a {
  color: var(--text-on-dark);
  text-decoration: none;
  opacity: 0.6;
  font-size: 0.82rem;
  transition: opacity var(--transition), color var(--transition);
}
.footer-contact a:hover { opacity: 1; color: var(--primary-light); }
.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-bottom p { color: var(--text-on-dark); opacity: 0.5; font-size: 0.85rem; }

/* ----- 17. ANIMATIONS ----- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* Legacy animation classes for older pages (preserved) */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .fade-in { opacity: 1; transform: none; }
}

/* ----- 18. LEGACY FEATURE/SHOWCASE/STEPS (preserved for older pages) ----- */
.features { padding: 120px 0; background: var(--bg); }
.feature-card p { color: var(--text-light); line-height: 1.7; }
.feature-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }

.how-it-works { padding: 120px 0; background: var(--bg-alt); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; position: relative; }
.steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary), var(--primary-light));
}
.step { text-align: center; position: relative; }
.step-number {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #26c6da);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 8px 24px rgba(0, 151, 167, 0.3);
  position: relative; z-index: 1;
}
.step h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; }
.step p { color: var(--text-light); line-height: 1.7; max-width: 300px; margin: 0 auto; }

.showcase { padding: 100px 0; background: var(--bg); }
.showcase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.showcase-item {
  text-align: center;
  padding: 40px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all var(--transition);
}
.showcase-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.showcase-icon { font-size: 3rem; margin-bottom: 16px; }
.showcase-item h4 { font-size: 1.05rem; font-weight: 600; color: var(--text); }

.recent-floorplans { padding: 100px 0; background: var(--bg-alt); }
.screenshots { padding: 100px 0; background: var(--bg); }
.screenshots-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; max-width: 1100px; margin: 0 auto; }
.screenshot {
  margin: 0;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all var(--transition);
}
.screenshot:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.screenshot img { display: block; width: 100%; height: auto; }
.screenshot figcaption {
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  background: var(--bg-alt);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.cta { padding: 120px 0; background: linear-gradient(135deg, var(--bg-dark) 0%, #1e293b 100%); text-align: center; }
.cta-content h2 { font-size: 2.5rem; font-weight: 800; color: #fff; margin-bottom: 16px; }
.cta-content p { color: var(--text-on-dark); font-size: 1.15rem; margin-bottom: 36px; opacity: 0.8; }

.mockup {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.mockup-header { background: #f1f5f9; padding: 12px 16px; display: flex; align-items: center; }
.mockup-dots { display: flex; gap: 6px; }
.mockup-dots span { width: 10px; height: 10px; border-radius: 50%; }
.mockup-dots span:nth-child(1) { background: #ef4444; }
.mockup-dots span:nth-child(2) { background: #f59e0b; }
.mockup-dots span:nth-child(3) { background: #22c55e; }
.mockup-body { padding: 20px; background: #fafbfc; }
.floor-plan-preview { width: 100%; height: auto; }

/* ----- 19. USER GALLERY PAGE (uses same styles) ----- */
.user-gallery-page { padding: calc(var(--nav-h) + 48px) 0 80px; background: var(--bg); min-height: 100vh; }
.user-gallery-header { margin-bottom: 40px; }
.back-link {
  display: inline-block;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 20px;
  transition: color var(--transition);
}
.back-link:hover { color: var(--primary-dark); text-decoration: underline; }
.user-gallery-header h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; color: var(--text); }
.user-gallery-count { color: var(--text-light); font-size: 1.1rem; }

/* ----- 20. LEGAL PAGES (uses same styles) ----- */
.legal-page { padding: calc(var(--nav-h) + 48px) 0 80px; background: var(--bg); min-height: 100vh; }
.legal-page h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; color: var(--text); }
.legal-updated { color: var(--text-light); font-size: 0.95rem; margin-bottom: 48px; font-style: italic; }
.legal-page section { margin-bottom: 36px; }
.legal-page h2 { font-size: 1.4rem; font-weight: 700; color: var(--text); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary-light); }
.legal-page h3 { font-size: 1.1rem; font-weight: 600; color: var(--text); margin: 20px 0 10px; }
.legal-page p { color: var(--text); line-height: 1.75; margin-bottom: 14px; }
.legal-page ul { list-style: disc; padding-left: 24px; margin-bottom: 14px; color: var(--text); }
.legal-page li { line-height: 1.75; margin-bottom: 6px; }
.legal-page strong { color: var(--primary-dark); }
.legal-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  flex-wrap: wrap;
  gap: 12px;
}
.legal-footer-nav a { color: var(--primary); text-decoration: none; font-weight: 600; transition: color var(--transition); }
.legal-footer-nav a:hover { color: var(--primary-dark); text-decoration: underline; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .type-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .fork-cards { grid-template-columns: repeat(3, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { display: none; }
}

@media (max-width: 860px) {
  .nav-links, .nav-actions { display: none; }
  .mobile-menu-toggle { display: flex; }
  .mobile-menu.is-open { display: flex; }

  .hero { padding: calc(var(--nav-h) + 32px) 0 64px; }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { order: -1; }
  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { margin: 0 auto 32px; }
  .hero-buttons { justify-content: stretch; }
  .hero-buttons .btn { flex: 1; min-width: 180px; }
  .stage { max-width: 320px; margin: 0 auto; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .stat__num { font-size: 2rem; }

  .section { padding: 72px 0; }
  .section__head { margin-bottom: 40px; }
  .section__head h2 { font-size: 1.75rem; }

  .features-grid { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .fork-cards { grid-template-columns: 1fr; }
  .fork-node__art { width: 200px; height: 96px; }

  .register { grid-template-columns: 1fr; gap: 32px; }
  .register__art { height: 240px; padding: 24px; }

  .footer-content { flex-direction: column; gap: 20px; text-align: center; align-items: center; }
  .footer-legal { justify-content: center; flex-wrap: wrap; }
  .footer-contact { justify-content: center; }

  .sticky-cta { display: block; }
  .final-cta { padding: 80px 0 120px; }

  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .hero-title { font-size: 2.1rem; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; }
  .stage { max-width: 280px; }
  .stage__panel { padding: 10px; }

  .stats__grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .stat__num { font-size: 1.6rem; }
  .stat__label { font-size: 0.78rem; }

  .timeline { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .type-card__art { height: 96px; }
  .type-icon { width: 50px; height: 50px; }
  .type-card span { font-size: 0.85rem; }

  .section { padding: 56px 0; }
  .section__head h2 { font-size: 1.5rem; }
  .section__head p { font-size: 1rem; }

  .btn-large { padding: 13px 22px; font-size: 0.95rem; }

  .gallery-grid { grid-template-columns: 1fr; }
  .card-image { aspect-ratio: 16 / 10; }

  .legal-page h1, .user-gallery-header h1 { font-size: 1.75rem; }
  .legal-page, .user-gallery-page { padding: calc(var(--nav-h) + 24px) 0 60px; }

  .sticky-cta { left: 12px; right: 12px; bottom: 12px; padding: 12px 16px; font-size: 0.9rem; }
}

@media (max-width: 380px) {
  .hero-title { font-size: 1.85rem; }
  .stat__num { font-size: 1.4rem; }
}
