/* ============================================
   DOMUS SERVICES — Custom Styles
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --navy: #034092;
  --blue: #022B5C;
  --teal: #2F6F8F;
  --sand: #E6E2D8;
  --steel: #BFC7D1;
  --taupe: #8C857B;
  --cream: #F8F7F4;
  --white: #FFFFFF;

  --glass-dark: rgba(255, 255, 255, 0.04);
  --glass-dark-border: rgba(255, 255, 255, 0.08);
  --glass-dark-hover: rgba(255, 255, 255, 0.08);
  --glass-light: rgba(2, 43, 92, 0.04);
  --glass-light-border: rgba(2, 43, 92, 0.08);

  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-elevated: 0 16px 48px rgba(0, 0, 0, 0.16);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Base Resets --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth page-level transitions */
::selection {
  background: rgba(47, 111, 143, 0.3);
  color: var(--white);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--navy);
  background: var(--cream);
  overflow-x: hidden;
  line-height: 1.6;
}

/* --- Navigation --- */
.nav-glass {
  background: rgba(2, 43, 92, 0.6);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 500ms var(--ease-out);
}

.nav-glass.scrolled {
  background: rgba(2, 43, 92, 0.92);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.nav-link {
  position: relative;
  transition: color var(--transition-interactive);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--teal);
  transition: width 300ms var(--ease-out);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* --- Hero Section --- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--navy) 0%, #031d40 40%, var(--blue) 100%);
  overflow: hidden;
}

/* Diagonal sweep pattern — curved blue light from brandbook */
.hero-sweep {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-sweep::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(47, 111, 143, 0.12) 0%, transparent 60%);
  transform: rotate(-15deg);
}

.hero-sweep::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 60%;
  height: 140%;
  background: radial-gradient(ellipse at center, rgba(3, 64, 146, 0.15) 0%, transparent 55%);
  transform: rotate(20deg);
}

/* Diagonal lines accent pattern */
.diagonal-lines {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.04;
}

.diagonal-lines::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    rgba(255, 255, 255, 0.5) 40px,
    rgba(255, 255, 255, 0.5) 41px
  );
}

/* --- Glass Cards --- */
.glass-card-dark {
  background: var(--glass-dark);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-dark-border);
  border-radius: 16px;
  box-shadow: var(--shadow-glass);
  transition: transform var(--transition-interactive),
              box-shadow var(--transition-interactive),
              border-color var(--transition-interactive),
              background var(--transition-interactive);
}

.glass-card-dark:hover {
  background: var(--glass-dark-hover);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-3px);
  box-shadow: var(--shadow-elevated);
}

.glass-card-dark:active {
  transform: translateY(-1px);
  transition-duration: 80ms;
}

.glass-card-light {
  background: var(--glass-light);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-light-border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-interactive),
              box-shadow var(--transition-interactive),
              border-color var(--transition-interactive);
}

.glass-card-light:hover {
  border-color: rgba(2, 43, 92, 0.14);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glass);
}

/* --- CTA Buttons --- */
.cta-glass {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--white);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: all 300ms var(--ease-out);
}

.cta-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255,255,255,0.1);
}

.cta-glass:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 80ms;
}

.cta-primary {
  background: var(--blue);
  border-color: var(--blue);
}

.cta-primary:hover {
  background: #0350b5;
  border-color: #0350b5;
  box-shadow: 0 8px 24px rgba(3, 64, 146, 0.4);
}

.cta-solid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: all 300ms var(--ease-out);
}

.cta-solid:hover {
  background: #0350b5;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(3, 64, 146, 0.4), 0 0 0 1px rgba(3, 64, 146, 0.2);
}

.cta-solid:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 80ms;
}

/* --- Tab System --- */
.tab-bar {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.tab-btn {
  padding: 12px 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--steel);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 300ms var(--ease-out);
}

.tab-btn.active {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(3, 64, 146, 0.3);
}

.tab-btn:not(.active):hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

/* Tab panels */
.tab-panel {
  opacity: 0;
  transform: translateY(12px);
  position: absolute;
  pointer-events: none;
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
  will-change: opacity, transform;
}

.tab-panel.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
  pointer-events: auto;
}

/* --- Process Timeline --- */
.timeline-line {
  position: absolute;
  top: 28px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--blue), var(--teal));
  opacity: 0.3;
}

.timeline-step {
  position: relative;
  z-index: 1;
  text-align: center;
}

.step-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--white);
  box-shadow: 0 4px 16px rgba(3, 64, 146, 0.3);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}

.timeline-step:hover .step-circle {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(3, 64, 146, 0.5);
}

/* --- Process Steps Mini (in services) --- */
.process-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.process-mini-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--steel);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.process-mini-step::after {
  content: '→';
  color: var(--teal);
  font-weight: 400;
}

.process-mini-step:last-child::after {
  display: none;
}

/* --- Partner Tier Cards --- */
.tier-card {
  position: relative;
  overflow: hidden;
}

.tier-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.tier-card.preferred::before {
  background: linear-gradient(90deg, var(--blue), #0350b5, var(--teal));
  height: 4px;
}

/* --- Contact Form --- */
.form-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
  outline: none;
}

.form-input::placeholder {
  color: var(--steel);
  opacity: 0.6;
}

.form-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(47, 111, 143, 0.15);
  background: rgba(255, 255, 255, 0.07);
}

.form-input option {
  background: var(--navy);
  color: var(--white);
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }
.reveal-delay-5 { transition-delay: 500ms; }

/* --- Section Helpers --- */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.section-label-light {
  color: var(--steel);
}

/* --- Stat Cards --- */
.stat-card {
  background: var(--navy);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-glass);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* --- Edge Cards (Why Domus) --- */
.edge-card {
  background: var(--navy);
  border-radius: 16px;
  padding: 32px 28px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}

.edge-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}

.edge-card:active {
  transform: translateY(-2px);
  transition-duration: 80ms;
}

.edge-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

/* --- Mobile Menu --- */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 43, 92, 0.97);
  backdrop-filter: blur(32px) saturate(1.2);
  -webkit-backdrop-filter: blur(32px) saturate(1.2);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.mobile-menu a {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out), color 180ms;
}

.mobile-menu.open a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.open a:nth-child(1) { transition-delay: 80ms; }
.mobile-menu.open a:nth-child(2) { transition-delay: 130ms; }
.mobile-menu.open a:nth-child(3) { transition-delay: 180ms; }
.mobile-menu.open a:nth-child(4) { transition-delay: 230ms; }
.mobile-menu.open a:nth-child(5) { transition-delay: 280ms; }
.mobile-menu.open a:nth-child(6) { transition-delay: 330ms; }



/* --- Hamburger --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 101;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 300ms var(--ease-out);
  border-radius: 1px;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Benefits List --- */
.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}

.benefit-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(47, 111, 143, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

/* --- Footer --- */
footer a {
  transition: color var(--transition-interactive);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .tab-bar {
    width: 100%;
  }

  .tab-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.8125rem;
  }

  .timeline-line {
    display: none;
  }

  .step-circle {
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  .cta-glass, .cta-solid {
    width: 100%;
    justify-content: center;
    padding: 12px 24px;
  }
}

/* --- Skip to content --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 8px 16px;
  background: var(--blue);
  color: var(--white);
  border-radius: 4px;
  z-index: 200;
  font-weight: 600;
  transition: top 200ms;
}

.skip-link:focus {
  top: 16px;
}
