/*
 * Page-wide styles, loaded on every page after Bootstrap and before the section files
 * (sections/<section-class>.css). Only rules that aren't about one kind of section belong here.
 *
 * Contents: page layout, Bootstrap grid adjustments, typography and the type scale, links, buttons,
 * images, focus, small utilities and effects. Media queries sit right after the rules they adjust.
 *
 * Conventions for every site stylesheet:
 * - A section file holds the section's own rules, then its variants, then its media queries.
 * - Variants are modifier classes (class="feature-row feature-row--image-right"), styled as
 *   `.feature-row:where(.feature-row--image-right)`. :where() adds no specificity, so a variant rule
 *   weighs exactly what the plain class does and wins only by coming later: keep variants below.
 * - Change the rule that already styles something rather than adding a later override.
 */

/* ---- Page layout ---- */
/* The fixed navbar (sections/site-nav.css) is --nav-height tall, --nav-gap below the top of the
   window. Every page's first section starts --page-top below the window top, so its content clears
   the bar by the same margin on every page. */
:root {
  --nav-gap: 1rem;
  --nav-height: 90px;
  --nav-bottom: calc(var(--nav-gap) + var(--nav-height));
  --page-top: calc(var(--nav-bottom) + 2.5rem);
}
@media (max-width: 767px) {
  :root {
    --nav-gap: 0.5rem;
    --nav-height: 56px;
    --page-top: calc(var(--nav-bottom) + 1.5rem);
  }
}
/* In-page links (members#alumni) land below the bar instead of under it. */
html {
  scroll-padding-top: calc(var(--nav-bottom) + 1rem);
}
html,
body {
  height: auto;
  min-height: 100vh;
  /* No rubber-band overscroll: pulling past the top or bottom revealed a white canvas behind the page. */
  overscroll-behavior-y: none;
}
/* Short pages: keep the footer at the bottom of the window. <main> takes the spare height and its
   last section grows into it, so that section's background shows instead of the bare page. */
body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter Tight;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
  color: #232323;
}
body > main {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
main > section:last-child {
  flex-grow: 1;
}
section {
  position: relative;
  word-wrap: break-word;
  background-color: #ffffff;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: cover;
}
/* Bootstrap's skip link (visually-hidden-focusable) sits above the page when focused instead of
   pushing the flex layout down. */
.skip-link:focus {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1100;
  width: max-content;
  padding: 0.5rem 1rem;
}

/* ---- Bootstrap grid: wider gutters ---- */
.container,
.container-fluid {
  position: relative;
  word-wrap: break-word;
  padding-left: 16px;
  padding-right: 16px;
}
.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -16px;
  margin-right: -16px;
}
.row > * {
  padding-right: 1rem;
  padding-left: 1rem;
}
.row > [class*=col] {
  padding-left: 16px;
  padding-right: 16px;
}
.justify-content-center {
  justify-content: center;
}
.item {
  position: relative;
}
@media (max-width: 1400px) {
  .container {
    max-width: 100%;
  }
}
@media (max-width: 1400px) and (min-width: 768px) {
  .container,
  .container-fluid {
    padding-left: 32px;
    padding-right: 32px;
  }
}
@media (min-width: 992px) {
  .container-fluid {
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* ---- Typography ---- */
h1,
h2,
h3,
h4,
h5,
h6,
.type-hero,
.type-title,
.type-nav,
.type-heading,
.type-body,
span,
p,
a {
  line-height: 1;
  word-break: break-word;
  word-wrap: break-word;
  font-weight: 400;
}
b,
strong {
  font-weight: bold;
}
.section-title {
  font-style: normal;
  line-height: 1.3;
}
.section-subtitle {
  line-height: 1.3;
}
.body-text {
  font-style: normal;
  line-height: 1.7;
}
ul,
ol,
pre,
.align-left {
  text-align: left;
}
.align-center {
  text-align: center;
}

/* Type scale: every text element carries one of these sizes. Each grows with the window between
   its phone size (at ~390px) and its desktop size, via clamp(min, fluid, max). Phones get 16px body
   text; the old Mobirise scale bottomed out at 18px body and 40px+ titles, which read as shouting. */
.type-hero {
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 5rem);
  line-height: 1.1;
}
.type-title {
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(2rem, 1.1rem + 3vw, 4rem);
  line-height: 1.1;
}
.type-heading {
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem);
  line-height: 1.3;
}
.type-body {
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(1rem, 0.85rem + 0.6vw, 1.4rem);
  line-height: 1.5;
}
.type-nav {
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(1rem, 0.8rem + 0.5vw, 1.25rem);
  line-height: 1.5;
}

/* ---- Links ---- */
a {
  font-style: normal;
  font-weight: 400;
  text-decoration: none;
  color: #ffeb69;
  cursor: pointer;
  transition: color 0.6s;
}
a:hover {
  text-decoration: none;
  color: #ffeb69;
}
/* The footer's page links get an underline that sweeps in on hover. */
a.text-primary {
  position: relative;
  background-image: transparent;
  background-size: 10000px 2px;
  background-repeat: no-repeat;
  background-position: -10000px 1.2em;
}
a.text-primary:hover {
  background-image: linear-gradient(currentColor 50%, currentColor 50%);
  background-position: 0px 1.2em;
  transition: background-position 2s ease-in-out;
}
/* Bootstrap's text color utilities, recolored to the site's palette. */
.text-primary {
  color: #ffeb69 !important;
}
/* Links inside body text. Any orange dark enough to read on the yellow page (4.5:1) is too close
   to the purple body text to tell apart by color, so they're underlined as well (WCAG 1.4.1). */
.text-success {
  color: #9a4a00 !important;
}
a.text-success {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
}
a.text-primary:hover,
a.text-primary:focus,
a.text-primary.active {
  color: #ffdd03 !important;
}
a.text-success:hover,
a.text-success:focus,
a.text-success.active {
  color: #6e3c00 !important;
}

/* ---- Buttons ---- */
button {
  background-color: transparent;
  border-color: transparent;
}
.section-buttons {
  margin-left: -0.6rem;
  margin-right: -0.6rem;
  font-size: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0.6rem 0.6rem;
  padding: 1.25rem 2rem;
  border-width: 2px;
  border-radius: 100px;
  font-style: normal;
  font-weight: 600;
  white-space: normal;
  word-break: break-word;
  transition: all 0.2s ease-in-out;
}
/* Bootstrap's "info" button, recolored: the site's purple call-to-action button. */
.btn-info,
.btn-info:active {
  background-color: #593269 !important;
  border-color: #593269 !important;
  color: #ffffff !important;
  box-shadow: none;
}
.btn-info:hover,
.btn-info:focus,
.btn-info.focus,
.btn-info.active {
  background-color: #76428c !important;
  border-color: #76428c !important;
  color: inherit;
  box-shadow: none;
}
.btn-info.disabled,
.btn-info:disabled {
  background-color: #76428c !important;
  border-color: #76428c !important;
  color: #ffffff !important;
}
.btn-info-outline,
.btn-info-outline:active {
  background-color: transparent !important;
  border-color: #593269;
  color: #593269;
}
.btn-info-outline:hover,
.btn-info-outline:focus,
.btn-info-outline.focus,
.btn-info-outline.active {
  background-color: transparent !important;
  border-color: #27162e !important;
  color: #27162e !important;
  box-shadow: none !important;
}
.btn-info-outline.disabled,
.btn-info-outline:disabled {
  background-color: #593269 !important;
  border-color: #593269 !important;
  color: #ffffff !important;
}
@media (max-width: 767px) {
  .btn {
    padding: 0.75rem 1.5rem;
  }
}

/* ---- Images ---- */
img,
iframe {
  display: block;
  width: 100%;
}
.card-box {
  width: 100%;
}
/* Rounded corners on every image and card. */
img,
.item-wrapper {
  border-radius: 2rem !important;
}
/* ---- Focus ---- */
/* Mouse clicks show no outline; keyboard focus shows a clear one. */
:focus {
  outline: none;
}
*:focus-visible {
  outline: red solid 2px !important;
  outline-offset: 2px !important;
  transition: outline 0.2s ease-in-out;
}

/* ---- Utilities ---- */
.mt-4 {
  margin-top: 2rem !important;
}
.mb-4 {
  margin-bottom: 2rem !important;
}

/* ---- Effects (member quips) ---- */
/* Animated rainbow text :P (the webmaster card, Kyle's "Heterosexual"). Every stop is darkened to at
   least 4.5:1 against the yellow page (pure yellow and green were ~1.1:1), so each letter stays
   readable. */
.rainbow-text {
  background: linear-gradient(to right, #d20000, #ad4800, #6b6a00, #007800, #0000ff, #4b0082, #9400d3, #d20000);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow-shift 4s linear infinite;
}
@keyframes rainbow-shift {
  to { background-position: 200% center; }
}
/* Pictures that spin once when clicked (js/spin-on-click.js). */
.spin-on-click {
  cursor: pointer;
}
.spin-on-click.spinning {
  animation: spin-once 0.8s ease-in-out;
}
@keyframes spin-once {
  to { transform: rotate(360deg); }
}
/* People who ask their OS for reduced motion get the gradient without the animation, and no spin. */
@media (prefers-reduced-motion: reduce) {
  .rainbow-text,
  .spin-on-click.spinning {
    animation: none;
  }
}
