/*
Theme Name: Board Game Library – Ocean
Theme URI: https://github.com/ballewcifer/BoardGameLibrary
Author: ballewcifer
Description: Simple download site for Board Game Library, in the app's Ocean colors. Free Windows and macOS downloads (pulled from the latest GitHub release) plus links to the mobile apps.
Version: 1.0.11
Requires at least: 6.0
Requires PHP: 7.4
License: MIT
Text Domain: bgl-ocean
*/

/* Ocean palette — the same values the apps use for the Ocean theme.
   Every text/background pair below is at least 4.5:1 (WCAG AA). */
:root {
  --hdr:      #12527E;   /* header / hero */
  --c2:       #4D5ACB;   /* primary buttons (white text 5.77:1) */
  --c3:       #21726A;   /* success / free badge */
  --c4:       #7F46C9;   /* accent */
  --stripe:   #5A5CE2;   /* the app's accent stripe under the header */
  --bg:       #F3F7F9;
  --surface:  #FFFFFF;
  --line:     #D6DCE1;
  --line-soft:#EAEEF0;
  --ink:      #16202B;
  --ink-2:    #51606E;
  --link:     #12527E;
  --radius:   14px;
  /* How wide a line of text may get before it wraps, in characters (so it scales with the font size).
     Set to "none" to let paragraphs fill the whole column. */
  --measure:  75ch;
  --gutter:   clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: clamp(16px, 0.94rem + 0.25vw, 19px)/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-wrap: break-word;   /* long words and URLs wrap instead of running off the screen */
}
.wp-block { max-width: none; } /* the block editor otherwise stops blocks at ~840px */
a { color: var(--link); }
a:hover { color: var(--c2); }
:focus-visible { outline: 3px solid var(--c4); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; color: var(--ink); padding: 10px 14px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Header */
.site-header { background: var(--hdr); color: #fff; border-bottom: 5px solid var(--stripe); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 22px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-icon { width: 128px; height: 128px; flex: none; border-radius: 28px; border: 4px solid rgba(255,255,255,.92); background: #fff; display: block; }
.brand-text { display: flex; flex-direction: column; gap: 4px; }
.site-title { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 700; line-height: 1.15; }
.site-tagline { font-size: 1.05rem; color: #EAF2F8; }
@media (max-width: 600px) { .brand { gap: 14px; } .brand-icon { width: 84px; height: 84px; border-radius: 20px; border-width: 3px; } }
.site-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { color: #fff; text-decoration: none; padding: 10px 12px; border-radius: 8px; display: inline-block; min-height: 44px; }
.site-nav a:hover, .site-nav a:focus-visible { background: rgba(255,255,255,.16); color: #fff; }

/* Hero */
.hero { background: var(--hdr); color: #fff; padding: 56px 0 72px; }
.hero h1 { margin: 0 0 12px; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; }
/* The hero intro can run wider than normal body text: about 110 characters per line. */
.hero p { margin: 0 0 24px; max-width: min(110ch, 100%); font-size: 1.2rem; color: #EAF2F8; }
/* A paragraph has a maximum width, so when you center it in the editor the box has to be centered too,
   not just the text inside it. */
p.has-text-align-center { margin-inline: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; padding: 0; margin: 0; list-style: none; }
.chips.has-text-align-center { justify-content: center; }
.chips li { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.55); padding: 10px 24px; border-radius: 999px; font-size: 1.15rem; font-weight: 500; }

/* Sections */
section { padding: 56px 0; }
section h2 { margin: 0 0 8px; font-size: 1.75rem; color: var(--hdr); }
.lead { color: var(--ink-2); margin: 0 0 28px; max-width: min(var(--measure), 100%); }
/* Card grid. WordPress 6.8 wraps a Group block's contents in an inner container, so in the editor version the
   grid has to go on that inner container; the plain .grid divs (download and mobile cards) use the first rule. */
.grid:not(.wp-block-group) { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
/* The feature cards (the editor-made grid): compact, in balanced rows of 3, then 2, then 1. */
.grid > .wp-block-group__inner-container { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.grid > .wp-block-group__inner-container > .card { margin: 0; }
@media (max-width: 900px) { .grid > .wp-block-group__inner-container { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid > .wp-block-group__inner-container { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.card p { margin: 0 0 12px; color: var(--ink-2); }
.card .meta { font-size: .9rem; color: var(--ink-2); }
/* Download and store buttons: just the buttons, centered, no card around them. The file size sits to the
   right of its button; on a narrow phone it drops under the button. */
.dl-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px 40px; }
.dl-item { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 14px; }
.dl-item .meta { margin: 0; font-size: .95rem; color: var(--ink-2); white-space: nowrap; }
#download h2, #mobile h2, #download .lead, #mobile .lead { text-align: center; }
#download .lead, #mobile .lead { margin-inline: auto; }
.feature { border-top: 4px solid var(--c2); padding: 14px 18px; }
.feature h3 { font-size: 1rem; margin: 0 0 4px; }
.feature p { font-size: .93rem; line-height: 1.5; margin: 0; }
.feature:nth-child(3n+2) { border-top-color: var(--c3); }
.feature:nth-child(3n+3) { border-top-color: var(--c4); }
.alt { background: var(--surface); border-block: 1px solid var(--line); }

/* Buttons and badges */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; text-align: center;
  background: var(--c2); color: #fff; text-decoration: none; font-weight: 700; border-radius: 10px; border: 0; cursor: pointer; }
.btn:hover { background: #3F4BB8; color: #fff; }
.btn.ghost { background: transparent; color: var(--hdr); border: 2px solid var(--hdr); }
.btn.ghost:hover { background: var(--hdr); color: #fff; }
.btn[aria-disabled="true"] { background: #E4E8EC; color: #3B4652; cursor: default; }
.badge { display: inline-block; background: var(--c3); color: #fff; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.badge.soon { background: #E4E8EC; color: #3B4652; }
.dl-note { font-size: .9rem; color: var(--ink-2); margin-top: 10px; }

/* Content pages */
.page-content { padding: 48px 0; }
.page-content .entry { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.page-content h1 { color: var(--hdr); margin-top: 0; }

/* Footer */
.site-footer { background: var(--hdr); color: #EAF2F8; padding: 28px 0; border-top: 5px solid var(--stripe); font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; display: flex; gap: 18px; flex-wrap: wrap; padding: 0; margin: 0 0 10px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
