/* Berkeley EA site — shared styles */

:root {
  --color-bg: #faf6ee;          /* warm paper, not stark white */
  --color-bg-alt: #f1ead9;      /* slightly deeper cream for cards */
  --color-text: #211d17;        /* warm near-black */
  --color-muted: #6d6455;
  --color-primary: #003262;     /* Berkeley blue */
  --color-primary-deep: #001c3a;/* deep navy for hero/footer */
  --color-accent: #fdb515;      /* Berkeley gold */
  --color-accent-deep: #c98a00;
  --color-teal: #1f8fa3;        /* from the club logo */
  --color-border: #e4dcc7;
  --max-width: 1000px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  position: relative;
}

/* subtle paper grain — avoids the too-flat/vector "AI generic" look */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

a {
  color: var(--color-primary);
}

a:hover {
  color: var(--color-accent-deep);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header / nav */

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  position: relative;
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--color-primary);
  text-decoration: none;
}

.site-title img {
  height: 2rem;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
}

.site-nav a {
  position: relative;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
  padding-bottom: 0.2rem;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--color-accent);
  transition: right 0.2s ease-out;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-primary);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  right: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  cursor: pointer;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-primary-deep);
  color: #fff;
  padding: 4.5rem 0;
}

.hero-bg {
  position: absolute;
  top: -10%;
  left: 0;
  right: 0;
  bottom: -10%;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
  background:
    linear-gradient(165deg, rgba(0, 28, 58, 0.78), rgba(0, 28, 58, 0.65)),
    url("../assets/images/events/nest-workshop.jpg") center 35% / cover no-repeat;
}

.hero-blobs {
  position: absolute;
  inset: 0;
  overflow: visible;
  z-index: 1;
  pointer-events: none;
  will-change: transform;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  will-change: transform;
}

.blob-1 {
  width: 26rem;
  height: 26rem;
  background: var(--color-accent);
  top: -9rem;
  left: -6rem;
  animation: drift1 14s ease-in-out infinite;
}

.blob-2 {
  width: 22rem;
  height: 22rem;
  background: var(--color-teal);
  bottom: -10rem;
  right: -4rem;
  animation: drift2 17s ease-in-out infinite;
}

.blob-3 {
  width: 18rem;
  height: 18rem;
  background: #4d7fb3;
  top: 30%;
  left: 55%;
  animation: drift3 12s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4rem, 3rem) scale(1.08); }
}

@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-3rem, -2.5rem) scale(1.1); }
}

@keyframes drift3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-2.5rem, 2rem); }
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: 2.75rem;
  font-weight: 600;
}

.hero p {
  max-width: 40rem;
  color: #dce6f0;
  font-size: 1.15rem;
}

.hero a:not(.button) {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.hero a:not(.button):hover {
  color: #fff;
}

.button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.7rem 1.4rem;
  background: var(--color-accent);
  color: #1a1408;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.button:hover {
  color: #1a1408;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

/* Main content */

main {
  padding: 3rem 0 4rem;
}

main h1 {
  color: var(--color-primary);
  margin-top: 0;
  font-size: 2.25rem;
}

main h2 {
  color: var(--color-primary);
  margin-top: 2.25rem;
  font-size: 1.6rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--color-bg-alt);
  border-top: 3px solid var(--color-teal);
  border-radius: 6px;
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(33, 29, 23, 0.1);
}

.card h3 {
  margin-top: 0;
  font-size: 1.15rem;
  color: var(--color-primary);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.photo-grid .photo {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  height: 200px;
}

.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.photo-grid .photo:hover img {
  transform: scale(1.06);
}

.video-embed {
  position: relative;
  width: 100%;
  max-width: 40rem;
  aspect-ratio: 16 / 9;
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(33, 29, 23, 0.12);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.calendar-embed {
  margin: 1.5rem 0;
}

.calendar-embed iframe {
  display: block;
  max-width: 100%;
  border-radius: 8px;
}

.muted {
  color: var(--color-muted);
}

/* Scroll reveal */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Footer */

.site-footer {
  background: var(--color-primary-deep);
  color: #b9c6d6;
  padding: 2.5rem 0;
  font-size: 0.9rem;
}

.site-footer p:first-child {
  font-family: var(--font-display);
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.site-footer a {
  color: #cfe0ef;
}

.site-footer a:hover {
  color: var(--color-accent);
}

/* Responsive nav */

@media (max-width: 640px) {
  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
    padding-top: 0.75rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .calendar-embed iframe {
    height: 500px;
  }

  .blob { filter: blur(50px); }
}
