

:root {
  --color-paper: oklch(33% 0.050 38);
  --color-paper-surface: oklch(36% 0.045 38);
  --color-paper-light: oklch(40% 0.040 38);
  --color-paper-torn: oklch(29% 0.045 38);
  --color-paper-tape: oklch(75% 0.035 65);
  --color-tape-border: oklch(68% 0.040 65);
  --color-rule: oklch(44% 0.030 38);
  --color-neutral: oklch(65% 0.025 38);
  --color-muted: oklch(78% 0.020 38);
  --color-ink: oklch(95% 0.015 38);
  --color-ink-dark: oklch(20% 0.020 38);
  --color-accent: oklch(70% 0.110 38);
  --color-accent-ink: oklch(20% 0.020 38);
  --color-accent-subtle: oklch(48% 0.080 38);
  --color-secondary: oklch(65% 0.095 18);
  --color-focus: oklch(75% 0.110 38);

  --hue-anchor: 38;
  --hue-secondary: 18;

  --font-display: 'Crimson Pro', Georgia, serif;
  --font-thai: 'Taviraj', 'Noto Serif Thai', serif;
  --font-sub: 'Noto Serif Thai', serif;

  --space-3xs: 4px;
  --space-2xs: 8px;
  --space-xs: 12px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 80px;

  --radius-paper: 2px;
  --radius-chip: 999px;
  --max-width: 1180px;

  --dur-short: 180ms;
  --dur-medium: 220ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  overflow-x: clip;
  background-color: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-thai);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.85;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.r88-container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

/* TORN PAPER EDGES */
.r88-torn-divider-bottom {
  position: relative;
  margin-bottom: var(--space-xl);
}

.r88-torn-divider-bottom::after {
  content: "";
  display: block;
  width: 100%;
  height: 18px;
  background-color: var(--color-paper-torn);
  clip-path: polygon(
    0% 0%,
    2% 70%, 4% 20%, 6% 85%, 8% 30%, 10% 90%, 12% 40%, 14% 80%,
    16% 25%, 18% 95%, 20% 35%, 22% 80%, 24% 20%, 26% 90%, 28% 45%,
    30% 75%, 32% 15%, 34% 85%, 36% 30%, 38% 90%, 40% 40%, 42% 80%,
    44% 20%, 46% 95%, 48% 30%, 50% 85%, 52% 25%, 54% 90%, 56% 40%,
    58% 75%, 60% 20%, 62% 85%, 64% 35%, 66% 90%, 68% 45%, 70% 80%,
    72% 20%, 74% 95%, 76% 30%, 78% 85%, 80% 25%, 82% 90%, 84% 40%,
    86% 75%, 88% 20%, 90% 85%, 92% 35%, 94% 90%, 96% 45%, 98% 80%,
    100% 0%
  );
}

/* HEADER - N30 Ribbon Crest Mast */
.r88-site-header {
  position: relative;
  background-color: var(--color-paper-surface);
  border-bottom: 1px solid var(--color-rule);
}

.r88-ribbon-crest {
  position: absolute;
  top: 0;
  left: var(--space-md);
  background-color: var(--color-accent);
  color: var(--color-accent-ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.05em;
  padding: var(--space-3xs) var(--space-sm) var(--space-2xs);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), 50% 100%, 0 calc(100% - 8px));
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.r88-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding-left: 120px;
}

.r88-nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
  align-items: center;
}

.r88-nav-item a {
  position: relative;
  padding-block: var(--space-2xs);
  font-size: 16px;
  color: var(--color-muted);
  transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out);
}

.r88-nav-item a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--color-rule);
  opacity: 0.6;
}

.r88-nav-item a:hover {
  opacity: 0.85;
  color: var(--color-ink);
}

.r88-nav-item a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.r88-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-accent);
  color: var(--color-accent-ink);
  font-weight: 700;
  font-size: 15px;
  padding: var(--space-2xs) var(--space-md);
  border-radius: var(--radius-chip);
  white-space: nowrap;
  transition: transform var(--dur-short) var(--ease-out), opacity var(--dur-short) var(--ease-out);
}

.r88-nav-btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.r88-nav-btn:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.r88-nav-btn:active {
  transform: translateY(0);
}

/* SECTION 2 - HERO TORN */
.r88-section-hero {
  position: relative;
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-3xl);
  background: linear-gradient(180deg, var(--color-paper-surface) 0%, var(--color-paper) 100%);
}

.r88-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: var(--space-xl);
  align-items: center;
}

.r88-hero-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.r88-hero-title {
  font-family: var(--font-thai);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.35;
  color: var(--color-ink);
  overflow-wrap: anywhere;
}

.r88-hero-highlight-wrap {
  position: relative;
  display: inline-block;
  color: var(--color-accent);
  font-style: normal;
}

.r88-hero-highlight-svg {
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 12px;
  pointer-events: none;
}

.r88-hero-desc {
  font-size: 18px;
  color: var(--color-muted);
  max-width: 60ch;
  line-height: 1.8;
}

.r88-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
  align-items: center;
}

.r88-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-accent);
  color: var(--color-accent-ink);
  font-family: var(--font-thai);
  font-weight: 700;
  font-size: 16px;
  padding: var(--space-xs) var(--space-lg);
  border-radius: var(--radius-chip);
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: transform var(--dur-short) var(--ease-out), opacity var(--dur-short) var(--ease-out);
}

.r88-btn-primary:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.r88-btn-primary:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.r88-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--color-ink);
  font-family: var(--font-thai);
  font-weight: 700;
  font-size: 16px;
  padding: var(--space-xs) var(--space-lg);
  border-radius: var(--radius-chip);
  border: 1px solid var(--color-rule);
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur-short) var(--ease-out), opacity var(--dur-short) var(--ease-out);
}

.r88-btn-secondary:hover {
  border-color: var(--color-neutral);
  background-color: var(--color-paper-light);
}

.r88-btn-secondary:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.r88-hero-media {
  position: relative;
  padding: var(--space-2xs);
  background-color: var(--color-paper-light);
  border-radius: var(--radius-paper);
  border: 1px solid var(--color-rule);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.r88-hero-media img {
  border-radius: var(--radius-paper);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* SECTION 3 - SIGNPOST ROW */
.r88-section-signpost {
  padding-block: var(--space-2xl);
  background-color: var(--color-paper);
}

.r88-signpost-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
}

.r88-signpost-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-md) var(--space-sm);
  background-color: var(--color-paper-surface);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-paper);
}

.r88-signpost-icon-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  color: var(--color-accent);
}

.r88-signpost-title {
  font-family: var(--font-thai);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-ink);
  margin-bottom: var(--space-3xs);
}

.r88-signpost-sub {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.5;
}

/* SECTION 4 - JOURNEY MAP */
.r88-section-journey {
  padding-block: var(--space-3xl);
  background-color: var(--color-paper-surface);
  position: relative;
}

.r88-section-head {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.r88-section-title {
  font-family: var(--font-thai);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 32px);
  color: var(--color-ink);
  margin-bottom: var(--space-2xs);
}

.r88-section-desc {
  color: var(--color-muted);
  font-size: 16px;
  max-width: 60ch;
  margin-inline: auto;
}

.r88-journey-container {
  position: relative;
  padding-block: var(--space-md);
}

.r88-journey-svg-desktop {
  position: absolute;
  top: 40px;
  left: 5%;
  width: 90%;
  height: 60px;
  pointer-events: none;
  z-index: 1;
}

.r88-journey-pins {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-sm);
  position: relative;
  z-index: 2;
}

.r88-journey-pin-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.r88-journey-pin-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  padding: 3px;
  background-color: var(--color-paper);
  margin-bottom: var(--space-xs);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.r88-journey-pin-circle img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.r88-journey-pin-label {
  font-family: var(--font-thai);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-ink);
  margin-bottom: var(--space-3xs);
}

.r88-journey-pin-desc {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.4;
}

/* SECTION 5 - TAPED SCENES */
.r88-section-taped {
  padding-block: var(--space-3xl);
  background-color: var(--color-paper);
}

.r88-taped-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.r88-polaroid-card {
  position: relative;
  background-color: var(--color-paper-light);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-paper);
  padding: var(--space-sm) var(--space-sm) var(--space-md);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* CSS Paper Tape */
.r88-polaroid-card::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 80px;
  height: 24px;
  background-color: var(--color-paper-tape);
  border-left: 1px dashed var(--color-tape-border);
  border-right: 1px dashed var(--color-tape-border);
  opacity: 0.85;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  z-index: 3;
}

.r88-polaroid-img-box {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background-color: var(--color-paper-surface);
  border: 1px solid var(--color-rule);
}

.r88-polaroid-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.r88-polaroid-title {
  font-family: var(--font-thai);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-ink);
}

.r88-polaroid-desc {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.6;
}

/* SECTION 6 - BRAND CROSS */
.r88-section-brand-cross {
  padding-block: var(--space-3xl);
  background-color: var(--color-paper-surface);
}

.r88-cross-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl);
}

.r88-cross-col {
  padding: var(--space-lg);
  background-color: var(--color-paper);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-paper);
  display: flex;
  flex-direction: column;
}

.r88-cross-title {
  font-family: var(--font-thai);
  font-weight: 700;
  font-size: 22px;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-2xs);
  border-bottom: 1px solid var(--color-rule);
}

.r88-cross-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-grow: 1;
}

.r88-cross-item {
  position: relative;
  padding-left: var(--space-md);
  font-size: 15px;
  color: var(--color-muted);
  line-height: 1.6;
}

.r88-cross-item::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 18px;
  line-height: 1;
}

.r88-cross-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-weight: 700;
  font-size: 15px;
  color: var(--color-ink);
  transition: transform var(--dur-short) var(--ease-out), opacity var(--dur-short) var(--ease-out);
}

.r88-cross-link:hover {
  color: var(--color-accent);
  transform: translateX(3px);
}

.r88-cross-link:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* SECTION 7 - GAME GRID */
.r88-section-game-grid {
  padding-block: var(--space-3xl);
  background-color: var(--color-paper);
}

.r88-game-grid-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.r88-game-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  background-color: var(--color-paper-surface);
  padding: var(--space-xs);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-paper);
}

.r88-game-img-wrap {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: var(--radius-paper);
  background-color: var(--color-paper-light);
}

.r88-game-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.r88-game-label {
  font-family: var(--font-thai);
  font-weight: 700;
  font-size: 15px;
  color: var(--color-ink);
  text-align: center;
  padding-block: var(--space-3xs);
}

/* SECTION 8 - HOW STEPS */
.r88-section-steps {
  padding-block: var(--space-3xl);
  background-color: var(--color-paper-surface);
}

.r88-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.r88-step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-lg) var(--space-sm);
  background-color: var(--color-paper);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-paper);
}

.r88-step-num-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.r88-step-title {
  font-family: var(--font-thai);
  font-weight: 700;
  font-size: 17px;
  color: var(--color-ink);
  margin-bottom: var(--space-2xs);
}

.r88-step-desc {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.6;
}

/* SECTION 9 - FAQ LITE */
.r88-section-faq {
  padding-block: var(--space-3xl);
  background-color: var(--color-paper);
}

.r88-faq-list {
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.r88-faq-item {
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-paper);
  background-color: var(--color-paper-surface);
  overflow: hidden;
}

.r88-faq-toggle {
  display: none;
}

.r88-faq-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-thai);
  font-weight: 700;
  font-size: 17px;
  color: var(--color-ink);
  cursor: pointer;
  user-select: none;
}

.r88-faq-label:hover {
  background-color: var(--color-paper-light);
}

.r88-faq-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  transition: transform var(--dur-short) var(--ease-out);
}

.r88-faq-content {
  display: none;
  padding: 0 var(--space-lg) var(--space-md);
  font-size: 15px;
  color: var(--color-muted);
  line-height: 1.7;
  border-top: 1px dashed var(--color-rule);
  padding-top: var(--space-sm);
}

.r88-faq-toggle:checked ~ .r88-faq-content {
  display: block;
}

.r88-faq-toggle:checked ~ .r88-faq-label .r88-faq-icon {
  transform: rotate(45deg);
}

/* SECTION 10 - CTA BAND */
.r88-section-cta {
  padding-block: var(--space-3xl);
  background-color: var(--color-paper-surface);
  text-align: center;
  border-top: 1px solid var(--color-rule);
}

.r88-cta-box {
  max-width: 680px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.r88-cta-title {
  font-family: var(--font-thai);
  font-weight: 700;
  font-size: clamp(24px, 3.5vw, 34px);
  color: var(--color-ink);
}

.r88-cta-desc {
  font-size: 16px;
  color: var(--color-muted);
  line-height: 1.75;
}

/* SECTION 11 - FOOTER Ft27 Icon-label row */
.r88-site-footer {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-xl);
  background-color: var(--color-paper-torn);
  border-top: 1px solid var(--color-rule);
}

.r88-footer-icon-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--color-rule);
  margin-bottom: var(--space-2xl);
}

.r88-footer-icon-item {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  color: var(--color-muted);
  font-size: 14px;
}

.r88-footer-icon-item svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
}

.r88-footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.r88-footer-group-title {
  font-family: var(--font-thai);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-ink);
  margin-bottom: var(--space-sm);
}

.r88-footer-group-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.r88-footer-group-list a {
  font-size: 14px;
  color: var(--color-muted);
  transition: opacity var(--dur-short) var(--ease-out);
}

.r88-footer-group-list a:hover {
  color: var(--color-ink);
  opacity: 0.85;
}

.r88-footer-group-list a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.r88-footer-bottom {
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-rule);
  font-size: 13px;
  color: var(--color-neutral);
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 992px) {
  .r88-hero-grid {
    grid-template-columns: 1fr;
  }
  .r88-signpost-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .r88-journey-pins {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .r88-journey-svg-desktop {
    display: none;
  }
  .r88-taped-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .r88-game-grid-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .r88-steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .r88-nav-inner {
    padding-left: 0;
    padding-top: 48px;
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
  }
  .r88-nav-links {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
  .r88-signpost-grid {
    grid-template-columns: 1fr;
  }
  .r88-journey-pins {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .r88-journey-pin-item {
    flex-direction: row;
    text-align: left;
    gap: var(--space-md);
  }
  .r88-journey-pin-circle {
    margin-bottom: 0;
    flex-shrink: 0;
  }
  .r88-taped-grid {
    grid-template-columns: 1fr;
  }
  .r88-cross-grid {
    grid-template-columns: 1fr;
  }
  .r88-game-grid-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .r88-steps-grid {
    grid-template-columns: 1fr;
  }
  .r88-footer-links-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .r88-footer-icon-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: opacity var(--dur-short) ease-out !important;
    animation: none !important;
  }
}
