/* =============================================
   BUTTERY AWESOME — Main Stylesheet
   =============================================
   To tweak the look, edit the variables below.
   Everything else flows from them.
============================================= */

/* Google Font — loaded via @import so it works
   even without a <link> tag if this CSS is used standalone */
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap');

:root {
  --bg:           #ffe681;   /* butter yellow — the main background */
  --text:         #2a2a2a;   /* dark body text — good contrast on yellow */
  --text-muted:   #5a5a5a;   /* secondary text */
  --brand:        #111111;   /* "BUTTERY AWESOME" nav wordmark */
  --nav-link:     #222222;   /* NAV LINKS — dark, matches brand, high contrast on yellow */
  --nav-active:   #111111;   /* active/current nav link */
  --accent:       #1a6070;   /* links in body text */
  --post-title:   #1a1a1a;   /* blog post h1 titles — dark for readability */
  --section-head: #2a2a2a;   /* page h1 headings (Prototypes & Toys etc.) */
  --border:       rgba(0, 0, 0, 0.14);
  --max-width:    1100px;
  --font:         'Raleway', 'Helvetica Neue', Arial, sans-serif;
  color-scheme:   only light; /* prevent browser dark-mode from inverting the yellow theme */
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Base ---- */
html { scroll-behavior: smooth; background: var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

/* =============================================
   NAVIGATION
   Fixed contrast: dark teal (#1a6070) on
   yellow passes WCAG AA (5.1:1 ratio)
============================================= */
.site-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 58px;
  gap: 32px;
}

/* "BUTTERY AWESOME" wordmark — left */
.nav-logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--brand);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo:hover { text-decoration: none; color: var(--nav-link); }

/* Nav links — center */
.nav-links {
  display: flex;
  list-style: none;
  flex: 1;
  justify-content: center;
  gap: 0;
}

.nav-links a {
  display: block;
  padding: 0 14px;
  height: 58px;
  line-height: 58px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--nav-link);   /* dark teal — fixes contrast on yellow */
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover  { color: var(--brand); text-decoration: none; }
.nav-links a.active { color: var(--brand); font-weight: 700; }

/* No hamburger — nav links wrap on mobile instead */

/* =============================================
   HOME PAGE HERO
============================================= */
.home-hero {
  display: grid;
  grid-template-columns: 3fr 2fr;
  align-items: center;
  min-height: calc(100vh - 58px - 64px);
  padding: 60px 0;
}

.home-logo {
  padding-right: 40px;
}
.home-logo img {
  width: 100%;
  max-width: 660px;
}

.home-tagline {
  padding-left: 20px;
}
.home-tagline p {
  font-size: 17px;
  line-height: 2;
  color: var(--text);
  margin-bottom: 0;
}
.home-tagline .welcome {
  margin-top: 24px;
  font-style: italic;
}
.home-tagline a {
  color: var(--nav-link);
  font-weight: 700;
}
.home-tagline a:hover { text-decoration: underline; }

/* =============================================
   PAGE LAYOUT — interior pages
============================================= */
main { flex: 1; }

.page-content {
  padding-top: 72px;
  padding-bottom: 100px;
}

/* Page h1 — e.g. "Prototypes & Toys" */
.page-title {
  font-family: var(--font);
  font-size: 36px;
  font-weight: 400;
  color: var(--section-head);
  margin-bottom: 28px;
}

.page-intro {
  max-width: 820px;
  color: var(--text);
  margin-bottom: 40px;
}
.page-intro p { margin-bottom: 14px; }
.page-intro strong { font-weight: 700; }

.section-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0 36px;
}

/* Section subheadings — e.g. "The Sims" */
.section-heading {
  font-size: 28px;
  font-weight: 400;
  color: var(--section-head);
  margin-bottom: 24px;
  margin-top: 0;
}

/* =============================================
   PROTOTYPE / FOSSIL IMAGE GRIDS
   Clean thumbnails, no labels, 4-column
============================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}

.proto-card {
  display: block;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.proto-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: opacity 0.15s;
}
.proto-card:hover img { opacity: 0.85; }

/* Hovering reveals the title */
.proto-card-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  opacity: 0;
  transition: opacity 0.15s;
  letter-spacing: 0.02em;
}
.proto-card:not(.coming-soon):hover .proto-card-label { opacity: 1; }

/* Coming soon — not a link, but the thumbnail opens in the lightbox */
.proto-card.coming-soon {
  cursor: default;
}
.proto-card.coming-soon img { opacity: 0.4; cursor: zoom-in; }

/* Coming soon overlay, centered on hover — reuses .proto-card-label,
   so its content can include <br> for multi-line text (e.g. a
   prototype name on one line and "[Coming Soon]" on the next).
   pointer-events: none lets clicks pass through to the image below
   so the lightbox can still open. */
.proto-card.coming-soon .proto-card-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(0,0,0,0.65);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.6;
  pointer-events: none;
}
.proto-card.coming-soon:hover .proto-card-label { opacity: 1; }

/* Preview tile — not a link, but clicking the thumbnail opens it in
   the lightbox. Unlike .coming-soon, the image stays full opacity
   and the title-on-hover label behaves like a normal proto-card. */
.proto-card.preview img { cursor: zoom-in; }

/* =============================================
   ABOUT PAGE
============================================= */
.about-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 64px;
  align-items: start;
  margin-top: 16px;
}

.about-photo {
  width: 100%;
}

.about-body p { margin-bottom: 20px; }
.about-body a { color: var(--accent); }
.about-body ul { list-style: none; margin: 8px 0 20px; }
.about-body ul li::before {
  content: '—';
  color: var(--accent);
  margin-right: 10px;
}
.about-body .games-heading {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  margin-top: 32px;
}

/* =============================================
   BLOG — listing page
============================================= */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 64px;
  align-items: start;
  margin-top: 16px;
}

.blog-list { list-style: none; }

.blog-entry {
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}
.blog-entry:first-child { padding-top: 0; }

/* Optional thumbnail layout — add class "has-thumb" to .blog-entry
   and include a .blog-entry-body wrapper containing a
   .blog-entry-thumb <img> + .blog-entry-content (excerpt/tags) */
.blog-entry-body {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.blog-entry-thumb {
  flex-shrink: 0;
  width: 240px;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.blog-entry-content { flex: 1; min-width: 0; }

.blog-entry-meta {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.blog-entry-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 14px;
  line-height: 1.3;
}
.blog-entry-title a { color: var(--post-title); text-decoration: none; }
.blog-entry-title a:hover { text-decoration: underline; }

.blog-entry-excerpt {
  color: var(--text);   /* fixed contrast — dark text on yellow */
  margin-bottom: 14px;
  font-size: 15px;
}

/* =============================================
   BLOG SIDEBAR
============================================= */
.blog-sidebar { position: sticky; top: 74px; }

.sidebar-block { margin-bottom: 36px; }

.sidebar-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.sidebar-links { list-style: none; }
.sidebar-links li { margin-bottom: 8px; }
.sidebar-links a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--nav-link);  /* dark teal — fixes contrast */
}
.sidebar-links a:hover { color: var(--brand); }

/* =============================================
   BLOG POST — individual
   Fixed contrast: post titles and body text
   are dark enough on the yellow background
============================================= */
.post-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* Tags — pill badges on post headers and blog listing */
.post-tags, .blog-entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.12);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 2px;
}

.post-date {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

/* Blog post h1 — teal, matching the current site intent */
.post-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--post-title);  /* teal — fixed to be dark enough (#1a7a8a on #F5E655 = 4.8:1) */
  line-height: 1.25;
  margin-bottom: 14px;
}

.post-body {
  color: var(--text);
  max-width: 820px;
  margin: 0 auto;
}
.post-body p {
  margin-bottom: 20px;
}
.post-body h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--section-head);
  margin: 36px 0 16px;
}
.post-body a { color: var(--accent); font-weight: 600; }
.post-body a:hover { text-decoration: underline; }
.post-body strong { font-weight: 700; }
.post-body img {
  width: 100%;
  display: block;
  margin: 24px 0;
}

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: 28px auto;
  background: #000;
  max-width: 820px;
}
.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.post-nav {
  max-width: 820px;
  margin: 56px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 24px;
}
.post-nav a {
  font-size: 13px;
  font-weight: 700;
  color: var(--nav-link);
  letter-spacing: 0.04em;
}
.post-nav a:hover { color: var(--brand); text-decoration: underline; }

/* =============================================
   PROTOTYPE DETAIL PAGE
============================================= */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--nav-link);
  margin-bottom: 32px;
  text-decoration: none;
  letter-spacing: 0.04em;
}
.back-link::before { content: '←'; }
.back-link:hover { color: var(--brand); text-decoration: underline; }

.proto-detail-header img {
  width: 100%;
  max-width: 940px;
  display: block;
  margin: 24px auto 32px;
}

.proto-detail-body {
  color: var(--text);
  max-width: 1000px;
  margin: 0 auto;
}
.proto-detail-body img {
  width: 100%;
  display: block;
  margin: 24px 0;
}
.proto-detail-body img.inline-image {
  width: 510px;
  max-width: 60%;
  float: right;
  margin: 0 0 20px 28px;
  border-radius: 8px;
  cursor: zoom-in;
}
.proto-detail-body img.inline-image.align-left {
  float: left;
  margin: 0 28px 20px 0;
}
.proto-detail-body img.inline-image.no-lightbox {
  cursor: default;
}
.proto-detail-body p { margin-bottom: 18px; }
.proto-detail-body h3 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 32px 0 12px;
}
.proto-detail-body ul { margin: 0 0 18px 20px; }
.proto-detail-body li { margin-bottom: 6px; }
.proto-detail-body a { color: var(--accent); font-weight: 600; }
.proto-detail-body .note {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

.play-link {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 30px;
  background: var(--nav-link);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s;
}
.play-link:hover { background: var(--brand); text-decoration: none; color: #fff; }

/* =============================================
   FOOTER
============================================= */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* Circular social icon buttons */
.footer-socials {
  display: flex;
  gap: 10px;
  align-items: center;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #3a5a6a;
  text-decoration: none;
  transition: background 0.15s;
  flex-shrink: 0;
}
.footer-socials a:hover { background: var(--brand); text-decoration: none; }

.footer-socials a svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* Text fallback if SVG isn't used */
.footer-socials a span {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0;
}

/* =============================================
   LIGHTBOX — full-size view for inline images
   and "coming soon" prototype thumbnails
============================================= */
body.lightbox-active { overflow: hidden; }

.lightbox-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s;
  z-index: 1000;
}
.lightbox-overlay.open {
  opacity: 1;
  visibility: visible;
}
.lightbox-overlay img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
  margin: 0;
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .about-layout { grid-template-columns: 260px 1fr; gap: 40px; }
  .home-hero { grid-template-columns: 1fr; padding: 40px 0; }
  .home-logo { padding-right: 0; }
  .home-logo img { max-width: 400px; margin: 0 auto; }
  .home-tagline { padding-left: 0; text-align: center; margin-top: 32px; }
  /* Stack the optional blog thumbnail above the text sooner than the
     main layout breakpoint below — the two-column blog layout leaves
     less room for the excerpt next to a side-by-side thumbnail. */
  .blog-entry-body { flex-direction: column; align-items: center; }
  .blog-entry-thumb { width: 100%; max-width: 480px; }
}

@media (max-width: 700px) {
  .container { padding: 0 20px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; }
  .about-layout { grid-template-columns: 1fr; }
  .about-photo { max-width: 220px; }
  .page-title { font-size: 26px; }
  .post-title { font-size: 26px; }
  .proto-detail-body img.inline-image { width: 100%; max-width: 100%; float: none; margin: 0 0 24px; }
  /* Mobile nav: wrap to second row instead of hamburger */
  .nav-inner { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; }
  .nav-logo { width: 100%; padding: 6px 0; }
  .nav-links {
    flex: 0 0 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0;
    padding-bottom: 4px;
  }
  .nav-links a { height: auto; line-height: 1; padding: 8px 10px; font-size: 12px; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
}
