/* ------------------------------------------------------------
   Visualpedia landing page
   These little color names help dark and light pages share one layout.
   ------------------------------------------------------------ */

:root {
  --page-bg: #151515;
  --hero-bg: #121212;
  --topic-bg: #273038;
  --feature-bg: #151515;
  --story-bg: #202326;
  --watch-bg: #151515;
  --footer-bg: #1a1a1a;
  --card-bg: #202123;
  --watch-frame: #283138;
  --text-main: #f8f8f7;
  --text-muted: #b8bbc0;
  --blue: #096dff;
  --blue-dark: #0059d8;
  --gold: #ffc32e;
  --gold-dark: #e5a90a;
  --line: rgba(255, 255, 255, 0.1);
  --header-glass: rgba(22, 24, 26, 0.64);
  --header-line: rgba(255, 255, 255, 0.16);
  --header-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  --page-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  --content-width: 1120px;
}

/* This is the pale version of the same Figma color bands. */
html[data-theme="light"] {
  --page-bg: #f8f8f8;
  --hero-bg: #f4f4f4;
  --topic-bg: #f8f8f8;
  --feature-bg: #e8f0ff;
  --story-bg: #f0f0f0;
  --watch-bg: #fafafa;
  --footer-bg: #c9dbff;
  --card-bg: #ffffff;
  --watch-frame: #ffffff;
  --text-main: #121720;
  --text-muted: #5f6875;
  --line: rgba(18, 23, 32, 0.13);
  --header-glass: rgba(255, 255, 255, 0.66);
  --header-line: rgba(9, 109, 255, 0.2);
  --header-shadow: 0 10px 28px rgba(42, 66, 104, 0.12);
  --page-shadow: 0 10px 24px rgba(42, 66, 104, 0.1);
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

/* This makes sizing predictable, just like lining up building blocks. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--page-bg);
  color: var(--text-main);
  font-family: "Lato", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: inherit;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* This keeps the page content at the same comfortable width as the mockup. */
.container-xxl {
  max-width: var(--content-width);
}

section {
  scroll-margin-top: 84px;
}

.site-main {
  padding: 0;
}

/* This hidden link lets keyboard users hop over the header quickly. */
.skip-link {
  position: absolute;
  top: -80px;
  left: 1rem;
  z-index: 2000;
  padding: 0.7rem 1rem;
  border-radius: 5px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 900;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* ------------------------------------------------------------
   Glassy top header
   The header stays glassy, but it is slimmer and closer to the Figma bar.
   ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: 0.65rem 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--hero-bg) 80%, transparent), transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  gap: 0.9rem;
  padding: 0.45rem 0.8rem;
  border-radius: 5px;
  background: var(--header-glass);
  box-shadow: var(--header-shadow);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.brand-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.brand-logo {
  width: auto;
  height: 34px;
}

.brand-logo-light {
  display: none;
}

html[data-theme="light"] .brand-logo-dark {
  display: none;
}

html[data-theme="light"] .brand-logo-light {
  display: block;
}

/* These are the small blue links that sit through the middle of the header. */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
}

.main-nav a,
.mobile-nav-panel a {
  padding: 0.45rem 0.55rem;
  border-radius: 5px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.main-nav a:hover,
.mobile-nav-panel a:hover {
  color: var(--white-dark);
  text-decoration: underline;
}

.header-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
}

.theme-toggle-btn,
.menu-toggle-btn,
.slider-button,
.floating-button {
  border: 0;
  background: transparent;
  padding: 0;
}

.theme-toggle-btn,
.menu-toggle-btn {
  display: inline-flex;
  width: 35px;
  height: 35px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: var(--text-main);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.theme-toggle-btn:hover,
.menu-toggle-btn:hover,
.slider-button:hover,
.floating-button:hover {
  transform: translateY(-2px);
}

.theme-toggle-btn img {
  width: 35px;
  height: 35px;
  object-fit: contain;
}

.theme-toggle-icon {
  display: none;
}

html[data-theme="dark"] .theme-toggle-sun,
html[data-theme="light"] .theme-toggle-moon {
  display: block;
}

.menu-toggle-btn i {
  font-size: 0.95rem;
}

/* This little glass menu appears only after the wide menu folds away. */
.mobile-nav-wrap {
  margin-top: 0.55rem;
}

.mobile-nav-panel {
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem;
  border: 1px solid var(--header-line);
  border-radius: 5px;
  background: var(--header-glass);
  box-shadow: var(--header-shadow);
  backdrop-filter: blur(18px);
}

/* ------------------------------------------------------------
   Hero
   This is a clean two-column row rather than a large floating card.
   ------------------------------------------------------------ */

.hero-section {
  padding: 20px;
}

.hero-layout {
  min-height: 350px;
}

.hero-copy {
  max-width: 30rem;
}

.hero-brand-mark {
  margin-bottom: 1.35rem;
}

.hero-brand-logo {
  width: auto;
  height: 58px;
}

.hero-brand-logo-light {
  display: none;
}

html[data-theme="light"] .hero-brand-logo-dark {
  display: none;
}

html[data-theme="light"] .hero-brand-logo-light {
  display: block;
}

.hero-title {
  max-width: 33rem;
  margin: 0;
  color: var(--text-main);
  font-size: clamp(2.35rem, 4.2vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero-title span {
  color: var(--blue);
}

.hero-lead {
  max-width: 29rem;
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 0.99rem;
  line-height: 1.7;
}

/* This is the simple blue rectangle shown below the hero words. */
.figma-button {
  display: inline-flex;
  min-width: 154px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 5px;
  box-shadow: none;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.figma-button:hover {
  transform: translateY(-2px);
}

.figma-button-primary {
  margin-top: 1.55rem;
  background: var(--blue);
  color: #ffffff;
}

.figma-button-primary:hover {
  background: var(--blue-dark);
  color: #ffffff;
  box-shadow: 0 9px 18px color-mix(in srgb, var(--blue) 28%, transparent);
}

.figma-button-gold {
  background: var(--gold);
  color: #151515;
}

.figma-button-gold:hover {
  background: var(--gold-dark);
  color: #151515;
  box-shadow: 0 9px 18px color-mix(in srgb, var(--gold) 28%, transparent);
}

/* The exported tablet image only needs a tiny corner radius and quiet shadow. */
.hero-visual {
  overflow: hidden;
  border-radius: 5px;
  box-shadow: var(--page-shadow);
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 522 / 392;
  object-fit: cover;
}

/* ------------------------------------------------------------
   Featured topic
   This section uses the darker slate strip behind the Wild Animals art.
   ------------------------------------------------------------ */

.topic-section {
  background: var(--topic-bg);
  padding: clamp(2.8rem, 5vw, 4.25rem) 0;
}

.topic-canvas {
  overflow: hidden;
  border-radius: 5px;
  box-shadow: var(--page-shadow);
}

.topic-banner-image {
  width: 100%;
  aspect-ratio: 1152 / 646;
  object-fit: cover;
}

.topic-caption-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.topic-caption-title {
  margin: 0;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 900;
}

.topic-caption-copy {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* These small buttons echo the compact pair at the bottom-right of the topic panel. */
.slider-nav {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.35rem;
}

.slider-button {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  transition: transform 0.18s ease;
}

.slider-button img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

/* ------------------------------------------------------------
   Shared centered headings
   Each lower section uses this short title and one quiet sentence.
   ------------------------------------------------------------ */

.figma-section-heading {
  max-width: 39rem;
  margin: 0 auto clamp(1.6rem, 3vw, 2.2rem);
  text-align: center;
}

.figma-section-heading h2 {
  margin: 0;
  color: var(--text-main);
  font-size: clamp(1.45rem, 2.35vw, 2.1rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.figma-section-heading p {
  margin: 0.45rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ------------------------------------------------------------
   Feature cards
   These are modest, left-aligned blocks like the three cards in Figma.
   ------------------------------------------------------------ */

.features-section {
  background: var(--feature-bg);
  padding: clamp(3.5rem, 6vw, 5.5rem) 0;
}

.feature-card {
  border-radius: 5px;
  min-height: 178px;
  height: 100%;
  padding: 1.3rem 1.2rem;
  background: var(--card-bg);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 0.85rem;
  object-fit: contain;
}

.feature-card h3 {
  margin: 0;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 900;
}

.feature-card p {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

/* ------------------------------------------------------------
   Story cards
   The artwork sits on top and the small yellow arrow stays in the lower row.
   ------------------------------------------------------------ */

.stories-section {
  background: var(--story-bg);
  padding: clamp(3.5rem, 6vw, 5.5rem) 0;
}

.story-card {
  border-radius: 5px;
  height: 100%;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--page-shadow);
}

.story-image {
  width: 100%;
  aspect-ratio: 564 / 314;
  object-fit: cover;
}

.story-card-footer {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
}

.story-card-footer h3 {
  margin: 0;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 900;
}

.story-arrow {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease;
}

.story-arrow:hover {
  transform: translateX(3px);
}

.story-arrow img {
  width: 35px;
  height: 35px;
  object-fit: contain;
}

.figma-action-row {
  display: flex;
  justify-content: center;
  margin-top: clamp(1.8rem, 3vw, 2.4rem);
}

/* ------------------------------------------------------------
   Video showcase
   The image is centered in one neat panel, with its two yellow actions below.
   ------------------------------------------------------------ */

.watch-section {
  background: var(--watch-bg);
  padding: clamp(3.5rem, 6vw, 5.5rem) 0;
}

.watch-card {
  max-width: 920px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 5px;
  background: var(--watch-frame);
  box-shadow: var(--page-shadow);
}

.watch-image {
  width: 100%;
  aspect-ratio: 894 / 502;
  object-fit: cover;
}

.watch-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

/* ------------------------------------------------------------
   Footer
   This is a simple color strip instead of another floating glass card.
   ------------------------------------------------------------ */

.site-footer {
  background: var(--footer-bg);
  padding: clamp(2rem, 4vw, 2.8rem) 0 5.6rem;
}

.footer-inner {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.footer-brand .brand-logo {
  height: 40px;
}

.footer-copy {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.footer-copy a{
  color: var(--text-muted) !important;
  font-size: 0.82rem !important;
}
.footer-copy a:hover {
  text-decoration: underline;
  color: var(--text-main) !important;
}
.footer-title {
  margin: 0 0 0.65rem;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 900;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.social-link {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-main);
  font-size: 0.74rem;
  transition: transform 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.social-link:hover {
  transform: translateY(-2px);
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.footer-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.6;
  text-align: right;
}

/* ------------------------------------------------------------
   Floating helpers
   The three helpers stack along the right edge, like the Figma preview.
   ------------------------------------------------------------ */

.floating-actions {
  pointer-events: none;
  position: fixed;
  flex-direction: column;
  right: 2rem;
  bottom: 2rem;
  z-index: 1200;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: transform 0.18s ease, opacity 0.18s ease, visibility 0.18s ease;
}
.floating-button{
  cursor: pointer;
}
.floating-button img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.18));
}
/* ------------------------------------------------------------
   Smaller screens
   These rules stack the same design pieces without making them crowded.
   ------------------------------------------------------------ */

@media (max-width: 991.98px) {
  .hero-section {
    padding-top: 4rem;
  }

  .hero-copy {
    max-width: 36rem;
  }

  .hero-visual {
    max-width: 620px;
  }

  .footer-note {
    text-align: left;
  }
}

@media (max-width: 767.98px) {
  .site-header {
    padding: 0.5rem 0;
  }

  .header-inner {
    min-height: 50px;
    padding: 0.4rem 0.65rem;
    border-radius: 5px;
  }

  .brand-logo {
    height: 30px;
  }

  .hero-section {
    padding: 3.6rem 0 3.3rem;
  }

  .hero-layout {
    min-height: 0;
  }

  .hero-brand-logo {
    height: 50px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 11vw, 3.4rem);
  }

  .hero-visual {
    max-width: none;
  }

  .topic-caption-row {
    align-items: flex-end;
  }

  .feature-card {
    min-height: 0;
  }

  .watch-actions .figma-button,
  .figma-action-row .figma-button {
    min-width: 144px;
  }

  .floating-actions {
    flex-direction: row;
    right: 50%;
    margin-right: -73px;
  }

}

@media (max-width: 575.98px) {
  .header-inner {
    gap: 0.5rem;
  }

  .brand-logo {
    height: 27px;
  }

  .theme-toggle-btn,
  .menu-toggle-btn {
    width: 32px;
    height: 32px;
  }

  .hero-lead {
    font-size: 0.94rem;
  }

  .figma-button {
    width: 100%;
  }

  .topic-caption-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .slider-nav {
    align-self: flex-end;
  }

  .watch-actions {
    display: grid;
  }

  .watch-actions .figma-button,
  .figma-action-row .figma-button {
    width: 100%;
  }

  .floating-actions {
    flex-direction: row;
    right: 50%;
    margin-right: -73px;
  }

  .floating-button img {
    width: 42px;
    height: 42px;
  }
}

/* This keeps motion quiet for anyone who asks their device for less movement. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
