/* ===========================================================
   Fogberry Games — site styles
   Shared by index.html and jig/index.html.

   Sections of this file:
     1. Colours & sizes   (change these first)
     2. Base text
     3. Page layout
     4. Header & navigation
     5. Content blocks     (photos, badge, captions, etc.)
     6. Small screens      (phones)
   =========================================================== */


/* ---------- 1. Colours & sizes ---------- */
:root {
  --orange-dark: #935807;   /* links, badge rules */
  --orange:      #ff990bc4;
  --orange-deep: #d27e08c4;   /* button hover */
  --black:       #000000;
  --ink:         #161210;   /* main text */
  --ink-soft:    #555;      /* captions, copyright */
  --rule:        #e3d6cb;   /* thin divider lines */
  --rule-strong: #1b1714;   /* heavy lines around the nav */
  --paper:       #ffffff;
  --fog-blue:    #AECEDA;   /* header background */
  --section-a:   #fcefe6;   /* sections alternate between these */
  --section-b:   #f8ddca;   /*   two light orange shades */

  --font: Avenir, "Avenir Next", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --content-width: 720px;   /* max width of the text column */
  --photo-width:   340px;   /* max width of photos */
}


/* ---------- 2. Base text ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;   /* keeps headings clear of the sticky nav */
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
  margin: 0 0 0.4em;
  line-height: 1.12;
}
h2 { font-size: clamp(1.8rem, 5vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.6rem); }

p { margin: 0 0 1.1rem; }

a { color: var(--orange-dark); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

img { max-width: 100%; height: auto; }


/* ---------- 3. Page layout ---------- */

/* Each block of content is a <section class="section">. */
.section {
  padding: clamp(2.5rem, 7vw, 4.5rem) 1.25rem;
  text-align: center;
}

/* First section sits right under the nav, so it needs less top padding. */
#games { padding-top: clamp(1rem, 3vw, 1.5rem); }
#games .button-row { margin-top: 0; }

/* Sections alternate between two shades of orange automatically. */
main > .section:nth-child(odd)  { background: var(--section-a); }
main > .section:nth-child(even) { background: var(--section-b); }

/* The centred text column inside each section. */
.column {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* Paragraphs are justified; short centred lines use class="centered". */
.column p {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.column p.centered { text-align: center; }


/* ---------- 4. Header & navigation ---------- */
.site-header {
  padding: 1.8rem 1.25rem 1.6rem;
  background: var(--fog-blue);
  text-align: center;
}
.site-header img {
  display: block;
  margin: 0 auto;
  width: 431px;       /* logo is ~104px tall at this width */
  max-width: 100%;
}

/* Stays stuck to the top of the screen while scrolling. */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  background: var(--paper);
  border-top: 3px double var(--rule-strong);
  border-bottom: 3px double var(--rule-strong);
}
.site-nav a {
  padding: 0.85rem 1.15rem;
  font-size: 0.9rem;
  letter-spacing: 0.13em;
  color: var(--ink);
  text-decoration: none;
  border-left: 1px solid var(--rule);
}
.site-nav a:first-child { border-left: 0; }
.site-nav a:hover { color: var(--orange-dark); }
.site-nav a[aria-current="page"] {
  color: var(--orange-dark);
  box-shadow: inset 0 -3px 0 var(--orange-dark);   /* underline for the current page */
}


 /* ---------- 5. Content blocks ---------- */

/* Photos: black frame, centred. */
.photo {
  display: block;
  width: 100%;
  max-width: var(--photo-width);
  margin: 0 auto 1.5rem;
  border: 3px solid black;
}

/* cardbacks: black frame, centred. */
.cardback {
  display: block;
  width: 40%;
  max-width: var(--photo-width);
  margin: 0 auto;
  border: 2px solid black;
}

/* cardbacks: black frame, centred. */
.doryback {
  display: block;
  width: 50%;
  max-width: var(--photo-width);
  margin: 0 auto;
  border: 2px solid black;
}
/* lgo*/
.logo {
  display: block;
  width: 30%;
  max-width: var(--photo-width);
  margin: 0 auto; 
}
.button-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);  /* two equal columns */
  gap: 12px;
  width: fit-content;                     /* row is only as wide as the buttons */
  margin: 1rem auto;                      /* centres the row */
}

/* Buttons: square-cornered, black frame (matches the photo frames),
   solid orange fill. Used for .btn (button rows) and .btnA (rulebook link). */
.btn,
.btnA {
  display: block;
  box-sizing: border-box;
  padding: 0.7rem 1.4rem;
  background-color: var(--orange);
  color: var(--black);
  border: 1px solid var(--black);
  border-radius: 0;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;                    /* keep each label on one line */
  transition: background-color 0.12s, color 0.12s;
}
/* Icons inside buttons. */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}
.icon {
  flex: none;
  display: block;
  height: 1.25em;
  width: auto;
  max-width: none;
}
.icon-email { width: 1.35em; }
.icon-book  { width: 1.55em; }

.btnA {
  display: inline-flex;                   /* shrink to content; icon sits beside the text */
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0.4rem 0 0.25rem;
}
.btn:hover,
.btnA:hover {
  background-color: var(--orange-deep);
  color: var(--black);
}
.btn:focus-visible,
.btnA:focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 3px;
}

/* On narrow screens, stack the buttons at the same width */
@media (max-width: 540px) {
  .button-row {
    grid-template-columns: 1fr;
    width: min(100%, 18rem);
  }
}
.site-header img.logo_rules, 
img.logo_rules {
  display: block !important;
  margin: 0 auto 15px auto !important;
  width: 120px !important;     
  max-width: 100% !important; 
  height: auto !important;
}



/* "Players: 4, 6, or 8 | Ages: 12+ | Time: 15-30 mins" line. */
.column p.game-meta {
  font-size: 0.95rem;
  line-height: 1.5;
  text-wrap: balance;
}
.nowrap { white-space: nowrap; }
@media (max-width: 480px) {
  .game-meta .sep { display: none; }
  .game-meta .nowrap { display: block; }   /* stack the three items on phones */
}

/* Small grey line under a photo. */
.caption {
  margin-top: 0.5rem;
  font-size: 0.9em;
  color: var(--ink-soft);
}

/* "Coming early 2027!" label with orange lines above & below. */
.badge {
  display: inline-block;
  margin: 0.6rem 0 1.75rem;
  padding: 0.35rem 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
}

/* A block separated from what's above by a thin line. */
.divided {
  --gap: clamp(1.75rem, 4.5vw, 2.75rem);   /* same space above and below every rule */
  margin-top: var(--gap);
  padding-top: var(--gap);
  border-top: 1px solid var(--rule);
}
.divided > :last-child { margin-bottom: 0; }

/* Google Form sign-up box. */
.signup-form {
  display: block;
  width: 100%;
  max-width: 640px;
  height: 586px;
  margin: 1.5rem auto 0;
  border: 0;
}

.copyright {
  margin-top: 2.75rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}


/* ---------- 6. Small screens (phones) ---------- */
@media (max-width: 600px) {
  .site-header { padding: 1.25rem 1rem; }

  .site-nav a {
    padding: 0.7rem 0.6rem;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
  }

  /* Justified text leaves big gaps on narrow screens, so left-align it. */
  .column p { text-align: left; }

  .signup-form { height: 720px; }
}

/* Very small phones: squeeze the nav so it fits on one line. */
@media (max-width: 360px) {
  .site-nav a { padding: 0.7rem 0.4rem; letter-spacing: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
