/* =========================================================
   Beruiks — Clube de Jogos de Tabuleiro (Lisboa)
   Folha de estilos principal
   Design: mesa de jogo à noite (feltro verde) + latão +
   cores de jogador (meeples). Tipografia: Bricolage Grotesque
   (títulos), Inter (corpo), Space Mono (estatísticas de jogo).
   ========================================================= */

:root {
  /* Papel / superfícies claras */
  --paper:    #F7F0E1;
  --paper-2:  #EFE5D0;
  --card:     #FFFDF7;
  --line:     #DDCFAE;

  /* Tinta / texto */
  --ink:      #20211C;
  --ink-soft: #4C4D44;
  --ink-faint:#787869;

  /* Feltro / superfícies escuras */
  --night:    #14241F;
  --night-2:  #0D1A16;
  --line-dk:  rgba(247,240,225,.16);
  --paper-dk: #F4EEDD;
  --soft-dk:  rgba(247,240,225,.72);

  /* Cores de jogador (meeples) */
  --teal:     #14796A;
  --teal-deep:#0B5546;
  --amber:    #E7A235;
  --coral:    #DD5238;
  --plum:     #7A4BB0;
  --leaf:     #5E9A3D;

  /* Tipos */
  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Space Mono", ui-monospace, "Courier New", monospace;

  /* Geometria */
  --r:    14px;
  --r-lg: 22px;
  --r-sm: 9px;
  --maxw: 1140px;
  --gut:  clamp(20px, 5vw, 56px);

  --shadow:    0 1px 0 rgba(32,33,28,.04), 0 14px 32px -18px rgba(32,33,28,.28);
  --shadow-lg: 0 24px 60px -28px rgba(13,26,22,.55);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal-deep); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }
.section--paper2 { background: var(--paper-2); }
.section--dark { background: var(--night); color: var(--paper-dk); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--paper-dk); }
.center { text-align: center; }
.eyebrow {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin: 0 0 .9rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.section--dark .eyebrow { color: var(--amber); }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; display: inline-block; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.28rem); color: var(--ink-soft); max-width: 60ch; }
.section--dark .lede { color: var(--soft-dk); }
.h-xl { font-size: clamp(2.5rem, 6vw, 4.4rem); }
.h-lg { font-size: clamp(1.9rem, 3.6vw, 2.85rem); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  padding: .82rem 1.4rem; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  line-height: 1;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 10px 22px -12px rgba(11,85,70,.9); }
.btn-primary:hover { background: var(--teal-deep); }
.btn-amber { background: var(--amber); color: #2a1c00; }
.btn-amber:hover { background: #f3ad44; }
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn-ghost:hover { background: rgba(0,0,0,.05); }
.section--dark .btn-ghost { color: var(--paper-dk); }
.section--dark .btn-ghost:hover { background: rgba(247,240,225,.1); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 1.32rem; letter-spacing: -.02em; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand small { font-family: var(--mono); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); display: block; line-height: 1; margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .97rem;
  padding: .5rem .7rem; border-radius: 9px; transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: rgba(20,121,106,.1); }
.nav-cta { margin-left: .4rem; }
.nav-toggle { display: none; background: none; border: 1.5px solid var(--line); border-radius: 10px; padding: .5rem .6rem; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .15rem;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .6rem var(--gut) 1.1rem; box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem .7rem; }
  .nav-cta { margin: .4rem 0 0; }
}

/* ---------- Hero ---------- */
.hero { background: radial-gradient(120% 120% at 78% 8%, #1c352d 0%, var(--night) 46%, var(--night-2) 100%); color: var(--paper-dk); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: center; padding-block: clamp(56px, 8vw, 96px); }
.hero h1 { color: var(--paper-dk); }
.hero h1 .hl { color: var(--amber); }
.hero .lede { color: var(--soft-dk); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 1.6rem; margin-top: 2rem; }
.hero-stat .n { font-family: var(--display); font-weight: 800; font-size: 1.9rem; color: var(--amber); line-height: 1; }
.hero-stat .l { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--soft-dk); }
.hero-art { position: relative; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 460px; }
}

/* ---------- Cards ---------- */
.grid { display: grid; gap: clamp(16px, 2.4vw, 26px); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.5rem; box-shadow: var(--shadow); position: relative;
}
.card h3 { font-size: 1.22rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon { width: 46px; height: 46px; margin-bottom: 1rem; }

/* card with coloured top edge by player colour */
.card--tab { padding-top: 1.7rem; }
.card--tab::before { content: ""; position: absolute; top: 0; left: 1.5rem; right: 1.5rem; height: 5px; border-radius: 0 0 5px 5px; background: var(--teal); }
.tab-teal::before { background: var(--teal); }
.tab-amber::before { background: var(--amber); }
.tab-coral::before { background: var(--coral); }
.tab-plum::before { background: var(--plum); }
.tab-leaf::before { background: var(--leaf); }

/* ---------- Game-stat chips (mono) ---------- */
.stats { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.stat-chip {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .02em;
  background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-soft);
  padding: .26rem .55rem; border-radius: 999px; display: inline-flex; gap: .35rem; align-items: center;
}
.dot { width: .62rem; height: .62rem; border-radius: 50%; flex: none; display: inline-block; }
.dot-teal { background: var(--teal); } .dot-amber { background: var(--amber); }
.dot-coral { background: var(--coral); } .dot-plum { background: var(--plum); } .dot-leaf { background: var(--leaf); }

/* category tag */
.tag { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Lists with check ---------- */
.ticks { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .7rem; }
.ticks li { position: relative; padding-left: 1.9rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 1.25rem; height: 1.25rem;
  background: var(--teal); border-radius: 6px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/78% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/78% no-repeat;
}

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px,2vw,24px); }
@media (max-width: 820px) { .price-grid { grid-template-columns: 1fr; } }
.price { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.8rem; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.price.is-featured { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal), var(--shadow); }
.price .badge { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-deep); }
.price .amount { font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; margin: .4rem 0; }
.price .amount span { font-size: 1rem; font-weight: 600; color: var(--ink-faint); }
.price .btn { margin-top: auto; }

/* ---------- Schedule / events ---------- */
.sched { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.sched th, .sched td { text-align: left; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.sched th { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); background: var(--paper-2); }
.sched tr:last-child td { border-bottom: 0; }
.sched .day { font-family: var(--display); font-weight: 700; white-space: nowrap; }

/* ---------- FAQ (details) ---------- */
.faq { display: grid; gap: .7rem; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.faq summary { cursor: pointer; padding: 1.05rem 1.2rem; font-family: var(--display); font-weight: 700; font-size: 1.06rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 1.4rem; color: var(--teal); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 1.2rem 1.15rem; color: var(--ink-soft); }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Article ---------- */
.article { max-width: 720px; margin-inline: auto; }
.article p, .article ul, .article ol { font-size: 1.125rem; line-height: 1.82; }
.article h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 2.2em; }
.article h3 { font-size: 1.3rem; margin-top: 1.8em; }
.article ul, .article ol { padding-left: 1.3rem; margin-bottom: 1.3em; }
.article li { margin-bottom: .5em; }
.article figure { margin: 2rem 0; }
.article blockquote {
  margin: 2rem 0; padding: 1.1rem 1.4rem; border-left: 5px solid var(--amber);
  background: var(--paper-2); border-radius: 0 var(--r) var(--r) 0; font-size: 1.15rem; color: var(--ink-soft);
}
.article .lead { font-size: 1.28rem; color: var(--ink-soft); line-height: 1.65; }
.callout { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--teal); border-radius: 0 var(--r) var(--r) 0; padding: 1.2rem 1.4rem; margin: 2rem 0; }
.callout h4 { margin: 0 0 .4rem; font-size: 1.05rem; }

/* References */
.refs { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.refs h2 { font-size: 1.25rem; margin-top: 0; }
.refs ol { font-size: .95rem; color: var(--ink-soft); line-height: 1.6; padding-left: 1.3rem; }
.refs li { margin-bottom: .7rem; }
.refs a { word-break: break-word; }

.post-meta { font-family: var(--mono); font-size: .8rem; letter-spacing: .04em; color: var(--ink-faint); margin-bottom: 1.4rem; display: flex; flex-wrap: wrap; gap: .8rem; }

/* Blog list cards */
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.post-card .thumb { aspect-ratio: 16/9; }
.post-card .body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.18rem; margin-bottom: .5rem; }
.post-card .body p { color: var(--ink-soft); font-size: .98rem; }
.post-card .more { margin-top: auto; font-family: var(--display); font-weight: 700; color: var(--teal-deep); text-decoration: none; }
.post-card .more:hover { text-decoration: underline; }

/* ---------- Breadcrumb ---------- */
.crumb { font-family: var(--mono); font-size: .76rem; letter-spacing: .06em; color: var(--ink-faint); padding-top: 1.4rem; }
.crumb a { color: var(--ink-soft); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; padding: .8rem .9rem; border: 1.5px solid var(--line);
  border-radius: var(--r-sm); background: var(--card); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(20,121,106,.18); }
.form-note { font-size: .85rem; color: var(--ink-faint); }

/* ---------- Info / contact blocks ---------- */
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.info-list li { display: flex; gap: .8rem; align-items: flex-start; }
.info-list .ic { width: 26px; height: 26px; flex: none; color: var(--teal); margin-top: 2px; }
.info-list b { font-family: var(--display); }
.map-embed { border: 0; width: 100%; aspect-ratio: 16/10; border-radius: var(--r-lg); filter: saturate(.9); }

/* ---------- Decorative hex band ---------- */
.hexband { height: 12px; background:
  repeating-linear-gradient(135deg, var(--teal) 0 22px, var(--amber) 22px 44px, var(--coral) 44px 66px, var(--plum) 66px 88px, var(--leaf) 88px 110px);
  opacity: .9; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night-2); color: var(--soft-dk); padding-block: clamp(48px, 6vw, 72px) 2rem; }
.site-footer a { color: var(--paper-dk); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: clamp(24px,3vw,40px); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: var(--paper-dk); font-size: .82rem; font-family: var(--mono); font-weight: 400; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; font-size: .96rem; }
.footer-brand .brand { color: var(--paper-dk); }
.footer-brand p { font-size: .95rem; max-width: 32ch; }
.footer-legal { margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line-dk); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .82rem; }
.footer-legal nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }

/* ---------- Cookie banner ---------- */
.cookie {
  position: fixed; inset: auto 1rem 1rem 1rem; z-index: 90; max-width: 560px; margin-inline: auto;
  background: var(--night); color: var(--paper-dk); border: 1px solid var(--line-dk);
  border-radius: var(--r-lg); padding: 1.2rem 1.3rem; box-shadow: var(--shadow-lg);
  display: none;
}
.cookie.show { display: block; }
.cookie p { font-size: .9rem; color: var(--soft-dk); margin-bottom: .9rem; }
.cookie p a { color: var(--amber); }
.cookie .row { display: flex; flex-wrap: wrap; gap: .6rem; }
.cookie .btn { padding: .6rem 1.1rem; font-size: .92rem; }

/* ---------- Misc utilities ---------- */
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px,4vw,64px); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.pill-note { display: inline-block; font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; background: var(--paper-2); border: 1px solid var(--line); padding: .3rem .7rem; border-radius: 999px; color: var(--ink-soft); }
.skip { position: absolute; left: -999px; top: 0; background: var(--amber); color: #2a1c00; padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 100; }
.skip:focus { left: 0; }
.placeholder-img { background: linear-gradient(135deg, var(--paper-2), #e6dcc4); border: 1px dashed var(--line); border-radius: var(--r-lg); display: grid; place-items: center; color: var(--ink-faint); font-family: var(--mono); font-size: .76rem; letter-spacing: .06em; text-align: center; padding: 1rem; min-height: 180px; }

/* ---------- Imagens (fotos reais nos slots) ---------- */
img.ph { width: 100%; object-fit: cover; border-radius: var(--r-lg); display: block; }
.post-card img.thumb { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 16/9; }
