/* ============================================================
   Sers Digital — bridge-table contact page
   Palette: deep felt green + cream + gold
   ============================================================ */

:root {
  --felt-900: #062a1f;
  --felt-800: #0b3d2e;
  --felt-700: #0f4a38;
  --felt-600: #14624a;
  --gold:     #d9b46a;
  --gold-dim: #b9904a;
  --cream:    #f4ecd9;
  --cream-dim: #cdbf9f;
  --card-red: #c0392b;
  --ink:      #1c2620;
  --shadow:   0 18px 50px rgba(0, 0, 0, 0.45);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  color: var(--cream);
  background:
    radial-gradient(120% 90% at 50% -10%, var(--felt-600) 0%, var(--felt-800) 45%, var(--felt-900) 100%);
  position: relative;
  overflow-x: hidden;
}

/* subtle felt texture + corner vignette */
.felt-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 50% 50%, transparent 55%, rgba(0,0,0,0.38) 100%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,0.04) 0 2px, transparent 2px 4px);
}

.stage, .site-header, .site-footer { position: relative; z-index: 1; }

/* ---------------- Header ---------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.6rem) clamp(1.1rem, 5vw, 3rem);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--cream);
}
.wordmark-suit { color: var(--gold); font-size: 1.1rem; transform: translateY(-1px); }
.wordmark-text {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  letter-spacing: 0.04em;
}

.lang-switch { display: inline-flex; gap: 0.4rem; }
.flag-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(217, 180, 106, 0.25);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--cream-dim);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.1s;
}
.flag-btn svg { border-radius: 2px; display: block; box-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.flag-btn:hover { color: var(--cream); border-color: rgba(217, 180, 106, 0.55); }
.flag-btn:active { transform: scale(0.96); }
.flag-btn.is-active {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
}

/* ---------------- Stage / layout ---------------- */
.stage {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.8rem, 4vw, 3rem);
  align-items: center;
  justify-items: center;
  padding: clamp(1rem, 4vw, 2.5rem) clamp(1.1rem, 5vw, 3rem) clamp(2rem, 5vw, 3rem);
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .stage {
    grid-template-columns: 1.05fr 1fr;
    justify-items: stretch;
  }
}

/* ---------------- Intro ---------------- */
.intro { max-width: 30rem; }
@media (min-width: 900px) { .intro { padding-right: 1rem; } }

.title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #fdf7e8 0%, var(--cream) 45%, var(--gold-dim) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* tight line-height + background-clip:text would clip the descender of the
     "g"; extend the gradient paint box downward so it's fully painted */
  padding-bottom: 0.18em;
  margin-bottom: 2.2rem;
}
.lede {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  font-weight: 500;
  color: var(--cream-dim);
  line-height: 1.4;
  margin-bottom: 0.9rem;
  text-wrap: pretty;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.1rem;
  padding: 0.85rem 1.4rem 0.85rem 1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(244,236,217,0.07), rgba(0,0,0,0.12));
  border: 1px solid rgba(217, 180, 106, 0.35);
  text-decoration: none;
  color: var(--cream);
  transition: transform 0.18s ease, border-color 0.2s, box-shadow 0.2s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.contact-pill:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}
.contact-suit {
  font-size: 1.6rem;
  color: var(--card-red);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3));
}
.contact-text { display: flex; flex-direction: column; line-height: 1.25; }
.contact-label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.contact-name {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  font-weight: 600;
  line-height: 1.15;
}
.contact-mail {
  font-size: 0.92rem;
  color: var(--cream-dim);
  letter-spacing: 0.01em;
}

/* actions column — stacks the project link + contact card so they never overlap */
.actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

/* project link (evalmybridge.com) */
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  max-width: 100%;
  padding: 0.7rem 1.1rem 0.7rem 0.7rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--cream);
  background: linear-gradient(180deg, rgba(244,236,217,0.06), rgba(0,0,0,0.1));
  border: 1px solid rgba(217, 180, 106, 0.3);
  transition: transform 0.18s ease, border-color 0.2s, box-shadow 0.2s;
}
.project-link:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}
/* EvalMyBridge mark */
.project-mark {
  display: block;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  flex: none;
}
.project-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.project-name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.8vw, 1.3rem);
  letter-spacing: -0.01em;
}
/* EvalMyBridge logotype colors */
.emb-eval { color: #3aa55f; }
.emb-my { color: #5a8fd0; }
.emb-bridge { color: #3aa55f; }
.project-desc {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
}
.project-arrow { margin-left: 0.2rem; color: var(--gold); font-size: 1.05rem; }
.project-link:hover .project-arrow { transform: translate(1px, -1px); }

/* ---------------- Game panel ---------------- */
.game-panel { width: 100%; display: flex; justify-content: center; }
.game-frame {
  width: 100%;
  max-width: 30rem;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.22), rgba(0,0,0,0.32)),
    var(--felt-700);
  border: 1px solid rgba(217, 180, 106, 0.3);
  border-radius: 20px;
  padding: clamp(0.9rem, 2.5vw, 1.3rem);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.04);
}

.scoreboard {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding: 0 0.2rem;
}
.score-item { display: flex; flex-direction: column; }
.score-item--right { align-items: flex-end; }
.score-item--center { align-items: center; }
.score-target {
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--cream);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.score-key {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.score-val {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 50% 0%, var(--felt-600), var(--felt-800) 80%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35), inset 0 8px 30px rgba(0,0,0,0.35);
}
#board { display: block; width: 100%; height: 100%; touch-action: none; }

/* overlay */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 42, 31, 0.82);
  backdrop-filter: blur(3px);
  transition: opacity 0.3s ease;
  padding: 1rem;
}
.overlay.is-hidden { opacity: 0; pointer-events: none; }
.overlay-card { text-align: center; max-width: 20rem; }
.overlay-suit { font-size: 2.4rem; color: var(--gold); margin-bottom: 0.4rem; }
.overlay-title {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.overlay-sub { color: var(--cream-dim); font-size: 0.95rem; line-height: 1.45; margin-bottom: 1.2rem; }
.play-btn {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: linear-gradient(180deg, #f0d79c, var(--gold) 60%, var(--gold-dim));
  border: none;
  border-radius: 999px;
  padding: 0.7rem 2.1rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  transition: transform 0.12s ease, box-shadow 0.2s;
}
.play-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,0.4); }
.play-btn:active { transform: translateY(0); }
.overlay-hint { margin-top: 1rem; font-size: 0.76rem; color: var(--cream-dim); letter-spacing: 0.04em; }

/* touch pad (mobile only) */
.touch-pad {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas: ". up ." "left down right";
  gap: 0.4rem;
  max-width: 13rem;
  margin: 0.9rem auto 0.2rem;
}
.pad-btn {
  font-size: 1.3rem;
  color: var(--cream);
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(217,180,106,0.25);
  border-radius: 12px;
  padding: 0.6rem 0;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s;
}
.pad-btn:active { background: var(--gold); color: var(--ink); transform: scale(0.95); }
.pad-up { grid-area: up; } .pad-left { grid-area: left; }
.pad-down { grid-area: down; } .pad-right { grid-area: right; }
@media (hover: none) and (pointer: coarse) {
  .touch-pad { display: grid; }
}

/* ---------------- Footer ---------------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.4rem;
  font-size: 0.82rem;
  color: var(--cream-dim);
  border-top: 1px solid rgba(217,180,106,0.14);
}
.footer-suits { color: var(--gold); letter-spacing: 0.1em; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
