/* Palette tuned to public/G4SG_logo.png — deep stitched green primary, antique brass neutral, wine burgundy emphasis. Each accent is differentiated by both hue and luminance for deuteranopia/protanopia safety. */

:root {
  --font-hand: "Permanent Marker", "Segoe Print", "Bradley Hand", cursive;
  --font-site-title: "Fredoka", ui-sans-serif, system-ui, sans-serif;
  --fairway-deep: #105236;
  --fairway: #157346;
  --fairway-mid: #268a59;
  --rough: #3daf72;
  --sand: #e8f1ec;
  --sand-accent: #2d9f63;
  --brass-accent: #8e6420;
  --four-some-accent: var(--brass-accent);
  --text: #0c1814;
  --text-muted: #3a5c4c;
  --border: #bed8cb;
  --white: #ffffff;
  --page-bg: #f2f8f5;
  --panel-bg: #fbfcfb;
  --footer-band-bg: var(--fairway-deep);
  --shadow: rgba(16, 82, 54, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 112.5%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background-color: var(--page-bg);
  background-image: repeating-linear-gradient(
    -48deg,
    transparent,
    transparent 14px,
    rgba(21, 115, 70, 0.045) 14px,
    rgba(21, 115, 70, 0.045) 28px
  );
  line-height: 1.6;
  outline: none;
}

.main-poster {
  max-width: 30rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

/* Poster: document flow only — no overlapping absolute stacks */
.poster-board {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  min-height: 0;
  padding: 1.35rem 1rem 1.5rem;
  background: var(--panel-bg);
  border: none;
  border-radius: 18px;
  box-shadow: none;
  overflow: visible;
  outline: 1px solid rgba(16, 82, 54, 0.12);
  container-type: inline-size;
  container-name: poster-board;
}

.poster-layer {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 0;
}

.poster-header-brand {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  width: 100%;
  container-type: inline-size;
  container-name: poster-header-brand;
}

.poster-header-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  width: 100%;
}

.poster-logo-wrap {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex: 0 0 auto;
}

.poster-header-brand > .poster-logo-wrap {
  justify-content: center;
  width: 100%;
}

.poster-logo {
  display: block;
  width: min(184px, 44vw);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.poster-header-brand h1.poster-title-domain-rotator {
  margin: 0;
  padding: 0;
  text-align: center;
}

/* As large as possible while Golf4SomeGames.com (+ caret) fits header width; falls back to .poster-title if no cqi */
@supports (font-size: 1cqi) {
  .poster-header-brand h1.poster-title-domain-rotator {
    font-size: clamp(0.74rem, 8.5cqi, 2.35rem);
  }
}

.poster-header-subtitle {
  margin: 0;
  padding: 0;
  font-family: var(--font-site-title);
  font-size: clamp(0.76rem, 2.75vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  color: var(--text);
}

.poster-domain-typer {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: nowrap;
  max-width: 100%;
  white-space: nowrap;
}

.poster-domain-typer-display {
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.poster-domain-typer-display .g4sg-domain-green {
  color: var(--fairway-deep);
}

.poster-domain-typer-display .g4sg-domain-red {
  color: var(--four-some-accent);
}

.poster-domain-caret {
  flex-shrink: 0;
  display: inline-block;
  width: 0.072em;
  min-width: 2px;
  height: 0.92em;
  margin-left: 0.06em;
  background: currentColor;
  vertical-align: -0.08em;
  border-radius: 1px;
  animation: poster-domain-caret-blink 0.92s steps(2, jump-none) infinite;
}

@keyframes poster-domain-caret-blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .poster-domain-caret {
    animation: none;
    opacity: 0.65;
  }
}

.poster-title {
  margin: 0;
  padding: 0;
  font-family: var(--font-site-title);
  font-size: clamp(0.84rem, 3.5vw, 1.28rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  color: var(--fairway-deep);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.poster-trial-card {
  margin: 0;
  padding: 1.05rem 1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(155deg, #f8fcfa 0%, #e9f4ee 42%, #f4faf7 100%);
  box-shadow: 0 1px 4px var(--shadow);
}

.poster-trial-card .poster-trial-cta {
  text-decoration: none;
}

.poster-trial-price {
  margin: 0.75rem 0 0;
  padding: 0 0.25rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--brass-accent);
  line-height: 1.35;
}

.subscribe-placeholder-heading {
  margin-bottom: 0.85rem !important;
  padding-bottom: 0 !important;
}

.subscribe-placeholder-intro .poster-lead {
  margin-bottom: 1.05rem;
}

.construction-muted {
  color: var(--text-muted);
  font-size: 0.98rem !important;
}

.newsletter-form {
  margin: 0.85rem 0 0;
  text-align: left;
}

.newsletter-field {
  margin-bottom: 0.75rem;
}

.newsletter-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--fairway-deep);
  letter-spacing: 0.03em;
}

.newsletter-optional {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.92em;
}

.newsletter-field input {
  width: 100%;
  padding: 0.65rem 0.72rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
}

.newsletter-field input:focus-visible {
  outline: 3px solid var(--brass-accent);
  outline-offset: 2px;
}

.newsletter-submit {
  margin-top: 0.5rem !important;
}

.construction-feedback {
  margin: 0 0 0.85rem !important;
  padding: 0.65rem 0.72rem;
  border-radius: 8px;
  font-size: 0.93rem !important;
  line-height: 1.45 !important;
  font-weight: 600 !important;
}

.construction-feedback-success {
  border: 1px solid rgba(34, 120, 80, 0.35);
  background: rgba(232, 245, 239, 0.95);
  color: var(--fairway-deep) !important;
}

.construction-feedback-error {
  border: 1px solid rgba(200, 100, 50, 0.4);
  background: rgba(255, 244, 235, 0.95);
  color: var(--text) !important;
}

.construction-home-link {
  margin-top: 1rem !important;
}

.poster-intro-card {
  position: relative;
  margin: 0;
  padding: 1rem 1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-bg);
}

.poster-intro-card:not(.subscribe-placeholder-intro) > .poster-lead {
  margin: 0 0 0.9rem;
  padding-right: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.poster-intro-stamp {
  position: absolute;
  top: 40%;
  right: 0.85rem;
  left: auto;
  bottom: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  margin: 0;
  text-align: center;
  transform: translateY(-50%) rotate(8deg);
  transform-origin: center center;
  line-height: 1.08;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}

.poster-intro-stamp-line {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brass-accent);
}

.poster-intro-stamp-strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--fairway-deep);
}

@media (prefers-reduced-motion: reduce) {
  .poster-intro-stamp {
    transform: translateY(-50%);
  }
}

.poster-lead {
  margin: 0 0 0.9rem;
  font-size: 1.02rem;
  line-height: 1.55;
  font-weight: 600;
  color: var(--text);
}

.poster-lead-accent {
  font-family: var(--font-site-title);
  font-weight: 700;
  font-size: 1.28em;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--fairway-deep);
}

.poster-simply-label {
  margin: 0 0 0.6rem;
  padding: 0.2rem 0;
  font-weight: 800;
  font-size: 1rem;
  color: var(--fairway-deep);
}

.poster-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.poster-steps li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text);
}

.poster-steps li:last-child {
  margin-bottom: 0;
}

.poster-step-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7em;
  height: 1.7em;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--brass-accent);
  color: var(--white);
  font-size: 0.92em;
  font-weight: 700;
  line-height: 1;
}

.poster-tagline {
  margin: 0;
  padding: 1rem 0.85rem 1.1rem;
  text-align: center;
  white-space: nowrap;
  font-size: clamp(0.56rem, 3.45vw, 0.9rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--fairway-deep);
  line-height: 1.35;
  border-radius: 10px;
  background: linear-gradient(155deg, #f8fcfa 0%, #e9f4ee 42%, #f4faf7 100%);
  border: 1px solid var(--border);
}

@supports (font-size: 1cqi) {
  .poster-tagline {
    font-size: clamp(0.56rem, 4.25cqi, 0.9rem);
  }
}

.poster-tagline-line {
  display: inline;
}

.poster-game-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.poster-game-howto-hint {
  margin: 0.35rem 0 0;
  padding: 0 0.25rem;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.5;
  font-weight: 600;
  color: var(--text-muted);
}

.poster-howto-hint-icon-wrap {
  display: inline-flex;
  vertical-align: -0.22em;
  margin: 0 0.12em;
  color: var(--brass-accent);
}

.poster-howto-hint-icon {
  display: block;
  width: 1.12em;
  height: 1.12em;
}

.poster-howto-hint-strong {
  color: var(--brass-accent);
  font-weight: 800;
}

.game-tile {
  --game-tile-pad-inline: 0.65rem;
  --game-tile-pad-top: 1rem;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: var(--game-tile-pad-top) var(--game-tile-pad-inline) 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-bg);
  box-shadow: 0 1px 4px var(--shadow);
  box-sizing: border-box;
}

.game-tile-title {
  font-family: var(--font-hand);
  font-size: clamp(1.35rem, 5vw, 1.85rem);
  font-weight: 400;
  letter-spacing: 0.015em;
  color: var(--fairway-deep);
  line-height: 1.15;
}

.game-tile-heading-row {
  --game-tile-logo-size: clamp(56px, 18vw, 96px);
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  padding-right: clamp(6.25rem, 36vw, 10.25rem);
  box-sizing: border-box;
}

.game-tile-heading-row .game-tile-title {
  margin: 0;
  min-width: 0;
  flex: 1;
}

.game-tile-heading-row:has(.game-tile-logo) .game-tile-title {
  display: flex;
  align-items: center;
  align-self: stretch;
  min-height: var(--game-tile-logo-size);
}

.game-tile-logo {
  flex-shrink: 0;
  width: var(--game-tile-logo-size);
  height: var(--game-tile-logo-size);
  align-self: center;
  object-fit: contain;
  display: block;
}

.game-tile-blurb {
  margin: 0 0 0.28rem;
  font-size: clamp(0.78rem, 2.2vw, 0.86rem);
  line-height: 1.35;
  font-weight: 500;
  color: var(--text-muted);
}

.game-tile-blurb:last-of-type {
  margin-bottom: 0.65rem;
}

.game-tile-howto {
  position: absolute;
  top: var(--game-tile-pad-top);
  right: var(--game-tile-pad-inline);
  left: auto;
  bottom: auto;
  z-index: 2;
  margin: 0;
  padding: 0.2rem 0.25rem;
  border: none;
  background: transparent;
  color: var(--brass-accent);
  font-family: inherit;
  font-size: clamp(0.68rem, 2.8vw, 0.8rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

.game-tile-howto:hover {
  color: var(--fairway-deep);
}

.game-tile-howto:focus-visible {
  outline: 3px solid var(--brass-accent);
  outline-offset: 2px;
}

.game-tile-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto;
}

.game-tile-actions .btn-poster {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.game-tile-actions .btn {
  transition: transform 0.18s ease;
}

.game-tile-actions .btn:hover {
  transform: scale(1.06);
}

.game-tile-actions .btn-primary:hover {
  background: var(--fairway-deep);
  border-color: var(--fairway-deep);
}

@media (prefers-reduced-motion: reduce) {
  .game-tile-actions .btn {
    transition: none;
  }

  .game-tile-actions .btn:hover {
    transform: none;
  }

  .game-tile-howto {
    transition: none;
  }
}

.btn-poster {
  width: 100%;
  min-height: 48px;
  padding: 0.55rem 0.75rem;
  font-size: 0.92rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-poster .btn-cluster {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-poster .btn-text {
  text-align: center;
  line-height: 1.2;
}

.btn-poster .btn-icon {
  flex-shrink: 0;
  display: block;
}

.poster-publisher-footer {
  margin: 1.5rem -1rem -1.5rem;
  padding: 1.15rem 1rem calc(1.35rem + 1.5rem);
  max-width: none;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--footer-band-bg);
  color: #fff;
  border-radius: 0 0 10px 10px;
}

.poster-publisher-footer .steadtra-published-line {
  color: #fff;
}

.steadtra-brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.steadtra-brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.65rem;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
  line-height: 1.52;
}

.steadtra-published-line {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.steadtra-svgator-logo {
  display: block;
  width: min(172px, 52vw);
  height: 52px;
  border: 0;
  vertical-align: middle;
  overflow: hidden;
  pointer-events: none;
}

.steadtra-svgator-logo img {
  display: block;
  width: min(172px, 52vw);
  height: auto;
  max-height: 52px;
  object-fit: contain;
}

.poster-publisher-footer .publisher-legal-nav {
  margin: 0.75rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.65rem;
  font-size: 0.86rem;
}

.poster-publisher-footer .publisher-legal-nav a {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  text-decoration: none;
}

.poster-publisher-footer .publisher-legal-nav a:hover {
  color: #fff;
  text-decoration: underline;
}

.poster-publisher-footer .publisher-legal-nav a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.95);
  outline-offset: 3px;
}

.poster-publisher-footer .publisher-legal-sep {
  color: rgba(255, 255, 255, 0.45);
  user-select: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.15rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  font-family: inherit;
  line-height: 1.2;
}

.btn-primary {
  background: var(--fairway-deep);
  color: var(--white);
  border-color: var(--fairway-deep);
}

.btn-primary:hover {
  background: var(--brass-accent);
  border-color: var(--brass-accent);
}

.btn-secondary {
  background: var(--brass-accent);
  color: var(--white);
  border-color: var(--brass-accent);
}

.btn-secondary:hover {
  background: var(--fairway-deep);
  border-color: var(--fairway-deep);
  color: var(--white);
}

.btn:focus-visible {
  outline: 3px solid var(--brass-accent);
  outline-offset: 3px;
}

.footer-copy {
  margin: 2rem 0 0.75rem;
  font-size: 1rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.55;
}

.footer-age {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--fairway-deep);
  text-align: center;
}

/* Modal — light panel for readability */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 24, 20, 0.58);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  overflow-y: auto;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: min(100%, 26rem);
  margin: auto;
  background: var(--panel-bg);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 0;
  max-height: calc(100vh - 2rem);
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.modal-backdrop.is-open .modal {
  transform: translateY(0);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin: 0;
  padding: 1.12rem 1.25rem 0.72rem;
  background: var(--panel-bg);
  border-bottom: 2px solid var(--sand);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 8px 16px rgba(244, 250, 247, 1);
}

.modal-title-cluster {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.modal-title-logo {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.modal-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: var(--font-hand);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.015em;
  color: var(--fairway-deep);
  line-height: 1.25;
}

.modal-close {
  flex-shrink: 0;
  min-width: 48px;
  min-height: 48px;
  background: var(--white);
  border: 2px solid var(--border);
  color: var(--fairway-deep);
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.modal-close:hover {
  background: var(--sand);
  border-color: var(--brass-accent);
  color: var(--brass-accent);
}

.modal-close:focus-visible {
  outline: 3px solid var(--brass-accent);
  outline-offset: 2px;
}

.modal-body {
  padding: 0.72rem 1.25rem 1.35rem;
}

.modal-body h3 {
  margin: 1.1rem 0 0.4rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  color: var(--brass-accent);
}

.modal-body h3:first-child {
  margin-top: 0;
}

.modal-body p,
.modal-body ul {
  margin: 0 0 0.65rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text);
}

.modal-body ul {
  padding-left: 1.25rem;
}

.modal-body li {
  margin-bottom: 0.45rem;
}

.modal-body li::marker {
  color: var(--brass-accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 480px) {
  .main-poster {
    max-width: 36rem;
  }

  .poster-board {
    max-width: min(100%, 540px);
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .poster-publisher-footer {
    margin-left: -1.15rem;
    margin-right: -1.15rem;
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .modal {
    width: min(100%, 28rem);
  }
}

@media (max-width: 340px) {
  .poster-layer {
    gap: 1.2rem;
  }

  .poster-publisher-footer {
    padding-inline: 0.75rem;
  }

  .steadtra-brand-row {
    font-size: 0.82rem;
    gap: 0.38rem 0.5rem;
  }

  .steadtra-svgator-logo {
    width: min(156px, 48vw);
    height: 48px;
    max-height: 48px;
  }
}
