@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap");

/* Fantastic Fun Friends – style blueprint (sky blue, soft UI, rounded) */

:root {
  /* Sky tones sampled from the hero illustration */
  --sky-top: #8cd0ec;
  --sky-mid: #b7deef;
  --sky-bottom: #e3f0f8;
  /* Warm ground / daylight tones from the hero street */
  --cream: #fbf2dc;
  --cream-soft: #fffaf0;
  --ui-blue: #5a9fd4;
  --ui-blue-hover: #4a8fc4;
  --text: #1e2d3a;
  --text-muted: #4a5f70;
  /* Deep sky blue for display titles on light cards (same hue family as --ui-blue) */
  --title-sky: #2f6a9a;
  --surface: #ffffff;
  --radius: 1rem;
  --radius-pill: 999px;
  --shadow: 0 4px 20px rgba(30, 45, 58, 0.08);
  --shadow-hover: 0 8px 28px rgba(30, 45, 58, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  background: var(--cream-soft);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

body.profile-page {
  background: var(--cream-soft);
}

a {
  color: var(--ui-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header (default: used by profile and interior pages) */
.site-header {
  background: rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(90, 159, 212, 0.25);
  padding: 0.75rem 1.25rem;
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo-link {
  display: flex;
  align-items: center;
}

.site-logo {
  height: 48px;
  width: auto;
  max-width: min(240px, 55vw);
  object-fit: contain;
}

.site-nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav-links a {
  color: var(--text);
}

.site-nav-links a:hover {
  color: var(--ui-blue);
}

.site-nav-links a.is-active {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--ui-blue);
}

/* “The friends” dropdown (top label is not a link) */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-summary {
  list-style: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  padding: 0;
  border: none;
  background: none;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.nav-dropdown-summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown-summary::marker {
  content: "";
}

.nav-dropdown-summary:hover,
.nav-dropdown[open] > .nav-dropdown-summary {
  color: var(--ui-blue);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 0.5rem 0;
  padding-inline-start: 0;
  min-width: 15.5rem;
  list-style: none;
  background: var(--surface);
  border-radius: 0.65rem;
  border: 1px solid rgba(90, 159, 212, 0.28);
  box-shadow: var(--shadow-hover);
  line-height: 1.45;
}

.nav-dropdown-menu li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  text-decoration: none;
}

.nav-dropdown-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.4rem;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.nav-dropdown-label {
  flex: 1;
  min-width: 0;
}

.nav-dropdown-menu a:hover {
  background: rgba(90, 159, 212, 0.12);
  color: var(--ui-blue);
  text-decoration: none;
}

.nav-dropdown-menu a[aria-current="page"] {
  background: rgba(90, 159, 212, 0.18);
  color: var(--ui-blue);
}

/* Hero (home page): full-bleed illustration with header overlaid on the sky */
.hero-section {
  position: relative;
  margin: 0;
  padding: 0;
  background: var(--sky-top);
  line-height: 0;
}

.home-page .site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  background: linear-gradient(
    180deg,
    rgba(107, 199, 232, 0.45) 0%,
    rgba(107, 199, 232, 0) 100%
  );
  border-bottom: none;
  padding: 1rem 1.5rem 1.75rem;
  /* Hero uses line-height: 0 for the image; reset here so nav + dropdown match profile pages */
  line-height: 1.5;
}

.home-page .site-header-inner {
  justify-content: flex-end;
}

/* Only top-level nav links (e.g. HOME); submenu links match profile pages */
.home-page .site-nav-links > a {
  color: var(--text);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.home-page .site-nav-links > a.is-active {
  text-decoration-color: rgba(30, 45, 58, 0.55);
}

.home-page .nav-dropdown-summary {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.hero-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2752 / 1536;
  object-fit: cover;
}

/* Who we are – picks up the warm street tone from the hero */
.who-we-are {
  padding: 3rem 1rem 2.5rem;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-soft) 100%);
}

.who-we-are-inner {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.who-prose {
  text-align: left;
}

.who-prose p {
  margin: 0 0 1.15rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.who-prose p:last-child {
  margin-bottom: 0;
}

.who-prose strong {
  font-weight: 800;
  color: var(--title-sky);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section-title-wrap {
  position: relative;
  margin: 0 auto 1.35rem;
  display: flex;
  justify-content: center;
}

.section-title-wrap--wide {
  max-width: 1100px;
}

.section-title-img {
  display: block;
  width: auto;
  max-width: min(92vw, 520px);
  height: auto;
}

.section-title-wrap--wide .section-title-img {
  max-width: min(94vw, 640px);
}

/* Meet the friends + carousel – fades back to a soft sky */
.meet-friends {
  padding: 2rem 1rem 4rem;
  background: linear-gradient(180deg, var(--cream-soft) 0%, var(--sky-bottom) 100%);
}

.meet-friends-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.meet-friends-inner > .section-title-wrap {
  margin-bottom: 1.35rem;
}

.carousel-shell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.carousel-arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--ui-blue);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 2px;
}

.carousel-arrow:hover {
  background: var(--ui-blue-hover);
}

.carousel {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0 1rem;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* Carousel card: vertical stack (headshot + name), full card is one link */
.carousel-card {
  /* Wide enough for longest name on one line (Nunito 800 caps); carousel scrolls on narrow viewports */
  flex: 0 0 max(300px, min(340px, 92vw));
  scroll-snap-align: start;
  display: block;
  background: #fff;
  border-radius: 1.1rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: visible;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.carousel-card:hover {
  text-decoration: none;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.carousel-card:focus-visible {
  outline: 3px solid var(--ui-blue);
  outline-offset: 3px;
}

.carousel-card-stack {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.1rem;
}

.carousel-card-photo {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07);
  background: #d4f0e0;
}

.carousel-card-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2752 / 1536;
  object-fit: cover;
}

.carousel-card-name {
  margin: 0;
  font-size: clamp(1.08rem, 3.4vw, 1.3rem);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--title-sky);
}

.site-footer {
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(90, 159, 212, 0.22);
  background: rgba(255, 255, 255, 0.55);
}

.site-footer-inner {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* —— Profile pages: full-bleed stage + overlaid nav (like home hero) —— */
.profile-stage {
  --profile-bg: none;
  --profile-bg-pos: center 30%;
  --profile-scrim-top: rgba(30, 45, 58, 0.4);
  --profile-fade-foot: #fffaf0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: min(88vh, 900px);
  /* Top room for overlaid nav; hero sits low over the scene fade */
  padding: 4.5rem 1.25rem 1.25rem;
  overflow: hidden;
  line-height: 1.5;
}

.profile-stage-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--profile-bg);
  background-size: cover;
  background-position: var(--profile-bg-pos);
  background-repeat: no-repeat;
  transform: scale(1.03);
  filter: saturate(1.06) brightness(0.93);
}

.profile-stage-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: linear-gradient(
    180deg,
    var(--profile-scrim-top) 0%,
    rgba(255, 255, 255, 0) 42%,
    rgba(255, 255, 255, 0) 48%
  ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 36%,
      color-mix(in srgb, var(--profile-fade-foot) 55%, transparent) 72%,
      color-mix(in srgb, var(--profile-fade-foot) 92%, var(--cream-soft)) 92%,
      var(--cream-soft) 100%
    );
}

/* Fallback when color-mix unsupported: second layer approximates blend */
@supports not (color: color-mix(in srgb, white 50%, black)) {
  .profile-stage-scrim {
    background-image: linear-gradient(
      180deg,
      var(--profile-scrim-top) 0%,
      rgba(255, 255, 255, 0) 42%
    ),
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0) 34%,
        rgba(251, 242, 220, 0.75) 78%,
        var(--cream-soft) 100%
      );
  }
}

.profile-top-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  margin: 0;
  background: linear-gradient(
    180deg,
    rgba(120, 188, 228, 0.42) 0%,
    rgba(120, 188, 228, 0.12) 55%,
    rgba(120, 188, 228, 0) 100%
  );
  border-bottom: none;
  padding: 1rem 1.25rem 2rem;
}

.profile-top-header .site-header-inner {
  justify-content: flex-end;
}

.profile-page .profile-top-header .site-nav-links > a,
.profile-page .profile-top-header .nav-dropdown-summary {
  color: var(--text);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.profile-page .profile-top-header .site-nav-links > a:hover,
.profile-page .profile-top-header .nav-dropdown-summary:hover,
.profile-page .profile-top-header .nav-dropdown[open] > .nav-dropdown-summary {
  color: var(--ui-blue);
}

.profile-page .profile-top-header .nav-dropdown-menu {
  z-index: 60;
}

.profile-stage-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 0;
}

.profile-stage-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 640px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  gap: 0.65rem;
  margin-top: 0;
  padding-bottom: 0.5rem;
}

/* Large pose over scene fade — transparent PNG, no frame ring */
.profile-portrait-ring {
  flex-shrink: 0;
  align-self: center;
  width: 100%;
  max-width: min(85vw, 720px);
  display: flex;
  justify-content: center;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  line-height: 0;
}

.profile-portrait {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: min(85vw, 720px);
  max-height: min(68vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center bottom;
}

.profile-stage-titles {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 3;
}

.profile-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 800;
  color: var(--title-sky);
  text-shadow: none;
  letter-spacing: 0.01em;
  text-align: center;
}

.profile-tagline {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  font-weight: 600;
  color: var(--text-muted);
  text-shadow: none;
  max-width: 100%;
  text-align: center;
}

@media (max-width: 600px) {
  .profile-portrait-ring,
  .profile-portrait {
    max-width: min(94vw, 640px);
    max-height: min(52vh, 560px);
  }
}

.profile-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3rem;
  background: var(--cream-soft);
}

.profile-body {
  max-width: 640px;
  margin: 0 auto;
}

.profile-body p {
  margin: 0 0 1rem;
}

.profile-section {
  margin-top: 1.85rem;
}

.profile-section:first-child {
  margin-top: 0;
}

.profile-section-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.12rem, 2.6vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--title-sky);
  line-height: 1.25;
}

.profile-section--stats .profile-section-title {
  margin-bottom: 0.7rem;
}

.profile-stats {
  margin: 0;
  padding: 0;
}

.profile-stats-row {
  margin: 0 0 1rem;
}

.profile-stats-row:last-child {
  margin-bottom: 0;
}

.profile-stats dt {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ui-blue);
}

.profile-stats dd {
  margin: 0.28rem 0 0;
  padding: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.profile-body .traits {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.profile-body .traits li {
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.profile-body .traits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.45em;
  height: 0.45em;
  border-radius: 50%;
  background: var(--ui-blue);
}
