/* ==========================================================================
   C2R REALTY - BASE STYLES & RESET
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Matches the navigation, so a pull past the top does not reveal a different page colour. */
  background-color: #C5D4E4;
  overscroll-behavior: none;
}

html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

#app {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: var(--c2r-header-h, 82px) 0 0;
}

#main-content {
  width: 100%;
  flex: 1;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--c2r-text-primary);
  background-color: #C5D4E4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--c2r-navy-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: 1rem;
  color: var(--c2r-text-secondary);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--c2r-blue-royal);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--c2r-gold-metallic);
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* Container Structure */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.container-fluid {
  max-width: 100%;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

/* Core Brand Section Highlights */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-12) auto;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--c2r-gold-metallic);
  margin-bottom: var(--space-3);
  position: relative;
}

.section-title {
  margin-bottom: var(--space-4);
  color: var(--c2r-navy-primary);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--c2r-text-secondary);
  line-height: 1.6;
}

/* Common Flex & Grid Utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.w-full { width: 100%; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Micro-interaction Helper */
.interactive-hover {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Opening splash — sits above #app so the book can load underneath */
html.c2r-splash-on {
  overflow: hidden;
}

.c2r-splash {
  --splash-pct: 0;
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 7vw;
  background: #0B1F3A;
  color: #F4F7FB;
  text-align: left;
  transition: opacity 0.8s ease, visibility 0.8s ease, transform 0.8s ease;
}

.c2r-splash.is-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.02);
}

.c2r-splash-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: #0B1F3A;
}

.c2r-splash-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: #163A5F;
  mix-blend-mode: color;
  opacity: 0.82;
}

.c2r-splash-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 82% center;
  transform-origin: 82% 50%;
  animation: c2rSplashKen 1.1s ease-out forwards;
  will-change: transform;
  filter: saturate(0.7) brightness(0.9) contrast(1.04);
}

.c2r-splash-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(120% 80% at 0% 50%, rgba(11, 31, 58, 0.78) 0%, rgba(11, 31, 58, 0.42) 36%, transparent 68%),
    linear-gradient(90deg, rgba(11, 31, 58, 0.7) 0%, rgba(11, 31, 58, 0.28) 42%, rgba(11, 31, 58, 0.04) 64%, transparent 82%),
    linear-gradient(180deg, rgba(7, 21, 37, 0.28) 0%, transparent 22%, transparent 78%, rgba(7, 21, 37, 0.34) 100%);
  pointer-events: none;
}

.c2r-splash-glow {
  position: absolute;
  left: -6%;
  top: 18%;
  z-index: 1;
  width: min(52vw, 560px);
  height: min(52vw, 560px);
  pointer-events: none;
  background: radial-gradient(circle, rgba(91, 155, 213, 0.18) 0%, rgba(91, 155, 213, 0.05) 42%, transparent 70%);
  animation: c2rSplashGlow 1.1s ease-out forwards;
}

.c2r-splash-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.c2r-splash-copy {
  position: relative;
  z-index: 3;
  width: min(92vw, 460px);
}

.c2r-splash-mark,
.c2r-splash-kicker,
.c2r-splash-title,
.c2r-splash-line,
.c2r-splash-meter {
  animation: c2rSplashRise 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.c2r-splash-mark {
  margin: 0 0 18px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.46em;
  text-transform: uppercase;
  color: #D6E6F5;
}

.c2r-splash-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #5B9BD5;
  animation-delay: 0.04s;
}

.c2r-splash-kicker::before {
  content: '';
  width: 28px;
  height: 1px;
  background: #5B9BD5;
  flex: 0 0 auto;
}

.c2r-splash-title {
  margin: 0 0 14px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(40px, 5.8vw, 62px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #F4F7FB;
  text-shadow: 0 10px 40px rgba(7, 21, 37, 0.35);
  animation-delay: 0.08s;
}

.c2r-splash-title em {
  font-style: italic;
  font-weight: 500;
  color: #D6E6F5;
}

.c2r-splash-line {
  margin: 0 0 34px;
  max-width: 360px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.01em;
  color: #C5D4E4;
  animation-delay: 0.12s;
}

.c2r-splash-meter {
  animation-delay: 0.16s;
}

.c2r-splash-count {
  margin: 0 0 14px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(52px, 7vw, 78px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: #5B9BD5;
  font-variant-numeric: tabular-nums;
}

.c2r-splash-pct {
  margin-left: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.28em;
  font-weight: 600;
  letter-spacing: 0.18em;
  vertical-align: 0.78em;
  color: #D6E6F5;
}

.c2r-splash-track {
  width: 168px;
  height: 1.5px;
  overflow: hidden;
  background: rgba(246, 241, 232, 0.18);
}

.c2r-splash-bar {
  display: block;
  width: calc(var(--splash-pct) * 1%);
  height: 100%;
  background: linear-gradient(90deg, #5B9BD5, #D6E6F5);
  box-shadow: 0 0 12px rgba(91, 155, 213, 0.55);
}

@keyframes c2rSplashKen {
  from { transform: scale(1); }
  to { transform: scale(1.03); }
}

@keyframes c2rSplashGlow {
  from { opacity: 0.35; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes c2rSplashRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .c2r-splash {
    align-items: flex-end;
    padding: 24px 22px 44px;
  }

  .c2r-splash-photo,
  .c2r-splash-stage {
    background-position: 72% center;
    object-position: 72% center;
  }

  .c2r-splash-photo {
    transform-origin: 72% 40%;
  }

  .c2r-splash-veil {
    background:
      linear-gradient(180deg, rgba(7, 21, 37, 0.12) 0%, transparent 22%, rgba(11, 31, 58, 0.28) 48%, rgba(11, 31, 58, 0.82) 100%);
  }

  .c2r-splash-glow {
    top: auto;
    bottom: -8%;
    left: -10%;
    width: 90vw;
    height: 70vw;
  }

  .c2r-splash-copy {
    width: 100%;
  }

  .c2r-splash-title {
    font-size: clamp(36px, 11vw, 48px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .c2r-splash-photo,
  .c2r-splash-glow,
  .c2r-splash-mark,
  .c2r-splash-kicker,
  .c2r-splash-title,
  .c2r-splash-line,
  .c2r-splash-meter {
    animation: none;
  }

  .c2r-splash.is-out {
    transform: none;
  }
}

