/* GlyphViz brand overrides */

:root {
  --gv-gold: #F2E2A8;        /* header background, soft highlight fills */
  --gv-gold-strong: #8C6D14; /* borders, underlines, active-state accents */
  --gv-gold-deep: #81600E;   /* body link text on white — darker/richer than gv-gold, ~5.8:1 contrast */
  --gv-gold-text: #5C4A12;   /* text set directly on a gold fill */
  --gv-nav-dark: #3A3660;    /* header nav text/icons, dark-on-gold */
}

/* Override Material's primary-color theme variables directly so every
   component that reads them (header, tabs, top progress bar) picks up
   the pastel gold + dark nav text consistently, rather than patching
   individual classes. */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: var(--gv-gold);
  --md-primary-fg-color--light: #F7ECC4;
  --md-primary-fg-color--dark: #E8D48F;
  --md-primary-bg-color: var(--gv-nav-dark);
  --md-primary-bg-color--light: rgba(58, 54, 96, 0.7);
  /* Body link color independently of the header's pastel gold: Material
     derives --md-typeset-a-color from --md-primary-fg-color by default,
     which put pale --gv-gold text on white with too little contrast. */
  --md-typeset-a-color: var(--gv-gold-deep);
}

/* Outlined (non-primary) .md-button reads its text/border straight from
   --md-primary-fg-color same as body links did — same low-contrast bug,
   same fix. .md-button--primary is unaffected (dark text on a gold fill
   already reads fine). */
.md-typeset .md-button:not(.md-button--primary) {
  color: var(--gv-gold-deep);
  border-color: var(--gv-gold-deep);
}

.gv-wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.gv-wordmark__glyph {
  color: #534AB7;
}

.gv-wordmark__viz {
  color: #0F6E56;
}

[data-md-color-scheme="slate"] .gv-wordmark__glyph {
  color: #AFA9EC;
}

[data-md-color-scheme="slate"] .gv-wordmark__viz {
  color: #5DCAA5;
}

/* Slightly larger, unclipped logo mark in the header */
.md-header .md-logo img,
.md-header .md-logo svg {
  height: 1.4rem;
  width: auto;
}

/* Tagline shown under the wordmark on the home page hero, not the header */
.gv-tagline {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  color: var(--color-text-secondary, #5F5E5A);
  text-transform: uppercase;
}

/* Reusable gold highlight utilities, for badges, callouts, active states
   elsewhere on the site */
.gv-highlight {
  background-color: var(--gv-gold);
  color: var(--gv-gold-text);
  border-radius: 4px;
  padding: 0.1em 0.5em;
}

.gv-highlight-border {
  border-left: 3px solid var(--gv-gold-strong);
  padding-left: 0.75em;
}

.gv-underline-gold {
  text-decoration: underline;
  text-decoration-color: var(--gv-gold-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Animated hero */
.gv-hero {
  margin: 0.5rem 0 2rem;
}

.gv-hero__canvas {
  width: 100%;
  height: 460px;
  touch-action: pan-y;
  cursor: grab;
}

.gv-hero__canvas:active {
  cursor: grabbing;
}

.gv-hero__caption {
  text-align: center;
  font-size: 0.78rem;
  color: var(--md-default-fg-color--light, #5F5E5A);
  margin-top: 0.35rem;
  letter-spacing: 0.02em;
}

@media screen and (max-width: 76.1875em) {
  .gv-hero__canvas {
    height: 320px;
  }
}

@media screen and (max-width: 44.9375em) {
  .gv-hero__canvas {
    height: 260px;
  }
}

/* Example gallery carousel — lives inside the gold <header> band on the
   home page only (see overrides/partials/gv-header-carousel.html), between
   the logo/search row and the tabs bar, per Jeff's request that it read as
   part of the header rather than as a page-content block. The header
   normally runs ~2.4rem tall; this pushes it to roughly 2-3x that. Sticky
   .md-header measures its own height via ResizeObserver, so growing it
   here just pushes the tabs bar and page content down automatically. */
.gv-header-carousel {
  position: relative;
  max-width: 61rem;
  margin: 0 auto 0.5rem;
  padding: 0 0.2rem;
  border-radius: 8px;
  overflow: hidden;
}

.gv-header-carousel .gv-carousel__viewport {
  border-radius: 8px;
  overflow: hidden;
  background: #10101c;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* Higher specificity + !important: Material's own
   `.md-typeset ul:not([hidden]){display:flow-root}` outranks a bare class
   selector, which is what silently turned this into a vertical stack. */
.gv-header-carousel ul.gv-carousel__track {
  display: flex !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: transform 550ms cubic-bezier(0.65, 0, 0.35, 1);
}

.gv-header-carousel .gv-carousel__slide {
  position: relative;
  flex: 0 0 100%;
  height: 190px;
  margin: 0;
}

.gv-header-carousel .gv-carousel__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
}

.gv-header-carousel .gv-carousel__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.7rem 1rem 0.55rem;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #F3F1EA;
  background: linear-gradient(to top, rgba(6, 6, 14, 0.85), rgba(6, 6, 14, 0));
}

.gv-header-carousel .gv-carousel__caption strong {
  color: #F7ECC4;
  font-weight: 600;
}

.gv-header-carousel .gv-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: rgba(10, 10, 20, 0.55);
  color: #F3F1EA;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms;
  z-index: 1;
}

.gv-header-carousel .gv-carousel__arrow:hover,
.gv-header-carousel .gv-carousel__arrow:focus-visible {
  background: rgba(140, 109, 20, 0.75);
}

.gv-header-carousel .gv-carousel__arrow--prev { left: 0.6rem; }
.gv-header-carousel .gv-carousel__arrow--next { right: 0.6rem; }

.gv-header-carousel .gv-carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.5rem;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  z-index: 1;
}

.gv-header-carousel .gv-carousel__dot {
  width: 0.4rem;
  height: 0.4rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.gv-header-carousel .gv-carousel__dot.is-active {
  background: var(--gv-gold);
}

@media screen and (max-width: 76.1875em) {
  .gv-header-carousel .gv-carousel__slide { height: 160px; }
}

@media screen and (max-width: 44.9375em) {
  .gv-header-carousel .gv-carousel__slide { height: 120px; }
  .gv-header-carousel .gv-carousel__caption { font-size: 0.62rem; padding: 0.5rem 0.65rem 0.4rem; }
  .gv-header-carousel .gv-carousel__arrow { width: 1.6rem; height: 1.6rem; font-size: 0.95rem; }
}

/* Thumbnail images on the "Where to start" grid cards — bleed to the card's
   edges (Material's card padding is a fixed 0.8rem) rather than fighting it
   with :has()-based text-only padding. Selectors match Material's own
   `.md-typeset .grid.cards>ul>li>:first-child` shape + specificity so ours
   isn't silently overridden by source order. */
.md-typeset .grid.cards.gv-nav-cards > ul > li {
  overflow: hidden;
}

.md-typeset .grid.cards.gv-nav-cards > ul > li > img:first-child {
  display: block;
  width: calc(100% + 1.6rem);
  height: 130px;
  object-fit: cover;
  margin: -0.8rem -0.8rem 0.8rem;
}

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

/* About page portraits — text wraps around them. Floats rather than a grid
   so the surrounding paragraphs flow past; they unfloat and centre on narrow
   viewports, where a 220px float would leave a column of two-word lines. */
.md-typeset figure.gv-photo {
  width: 220px;
  max-width: 45%;
  margin: 0.2rem 0 1rem 1.4rem;
  float: right;
  clear: right;
}

.md-typeset figure.gv-photo--left {
  float: left;
  clear: left;
  margin: 0.2rem 1.4rem 1rem 0;
}

.md-typeset figure.gv-photo img {
  display: block;
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.md-typeset figure.gv-photo figcaption {
  margin-top: 0.45rem;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--md-default-fg-color--light);
  text-align: left;
}

/* A float that outlives its section would drift into the next heading. */
.md-typeset h2 {
  clear: both;
}

@media screen and (max-width: 44.9375em) {
  .md-typeset figure.gv-photo,
  .md-typeset figure.gv-photo--left {
    float: none;
    width: 260px;
    max-width: 100%;
    margin: 0 auto 1.2rem;
  }
  .md-typeset figure.gv-photo figcaption { text-align: center; }
}
