/**
 * CRC Greenlight legal site — visual system aligned with crcmalaysia.com
 * (crcasean theme tokens), not the Greenlight mobile green UI.
 *
 * Brand reference from CRC ASEAN theme:
 * - Type: Barlow
 * - Accent red: #CD163F
 * - Body text: #3f3f40
 * - Footer: #1C1A1A
 * - Nav: uppercase, 4px red underline on active/hover
 *
 * Purpose: static Privacy / Terms pages for App Store + Play listing URLs.
 * Keep layout corporate and airy (white canvas), not a marketing microsite.
 */

:root {
  --crc-red: #cd163f;
  --crc-red-dark: #a91234;
  --ink: #3f3f40;
  --ink-strong: #323940;
  --ink-black: #1c1a1a;
  --white: #ffffff;
  --wash: #f5f4f3;
  --rule: #e8e8e8;
  --max: 48rem;
  --header-height: 5.5rem;
  --font: "Barlow", Arial, Helvetica, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.65;
  background: var(--white);
}

a {
  color: var(--crc-red);
  text-underline-offset: 0.12em;
}

a:hover {
  color: var(--crc-red-dark);
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
}

/* -------------------------------------------------------------------------- */
/* Header — white bar, CRC mark left, uppercase nav right                     */
/* -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner,
.shell,
.site-footer__inner {
  width: min(100% - 2.5rem, 72rem);
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: var(--header-height);
  padding: 0.75rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

/**
 * Official CRC wordmark saved at assets/crc-logo.png
 * (sourced from CRC Malaysia brand uploads).
 */
.brand__logo {
  display: block;
  height: 2.35rem;
  width: auto;
}

@media (min-width: 640px) {
  .brand__logo {
    height: 2.75rem;
  }
}

.brand__text {
  display: none;
  flex-direction: column;
  gap: 0.05rem;
}

.brand__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-strong);
  letter-spacing: 0.01em;
}

.brand__tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (min-width: 640px) {
  .brand__text {
    display: flex;
  }
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.35rem;
}

.nav a {
  position: relative;
  padding: 0.35rem 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: 4px solid transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--crc-red);
  border-bottom-color: var(--crc-red);
}

/* -------------------------------------------------------------------------- */
/* Page chrome                                                                */
/* -------------------------------------------------------------------------- */

.shell {
  padding: 2.5rem 0 4rem;
}

.page-band {
  background: var(--wash);
  border-bottom: 1px solid var(--rule);
}

.page-band__inner {
  width: min(100% - 2.5rem, 72rem);
  margin-inline: auto;
  padding: 2.25rem 0 2rem;
}

.page-band h1 {
  margin: 0 0 0.45rem;
  color: var(--ink-black);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-transform: uppercase;
}

.page-band p {
  margin: 0;
  max-width: 38rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 400;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  color: #666;
}

.meta strong {
  color: var(--ink-strong);
  font-weight: 700;
}

/* Home intro — centered body strip like Malaysia marketing copy */
.home-intro {
  max-width: 44rem;
  margin: 3rem auto 0;
  text-align: center;
}

.home-intro h1 {
  margin: 0 0 0.75rem;
  color: var(--ink-black);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.home-intro p {
  margin: 0 auto;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.7;
}

/* -------------------------------------------------------------------------- */
/* Legal document                                                             */
/* -------------------------------------------------------------------------- */

.doc {
  max-width: var(--max);
  margin: 2rem auto 0;
}

.doc > *:first-child {
  margin-top: 0;
}

.doc h2 {
  margin: 2.25rem 0 0.7rem;
  color: var(--crc-red);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.doc h3 {
  margin: 1.4rem 0 0.4rem;
  color: var(--ink-strong);
  font-size: 1.05rem;
  font-weight: 700;
}

.doc p,
.doc li {
  color: var(--ink);
}

.doc ul,
.doc ol {
  padding-left: 1.2rem;
}

.doc li + li {
  margin-top: 0.35rem;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.doc th,
.doc td {
  border: 1px solid var(--rule);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.doc th {
  background: var(--wash);
  color: var(--ink-strong);
  font-weight: 700;
}

.notice {
  margin: 2rem 0 0;
  padding: 1rem 1.1rem;
  background: var(--wash);
  border-left: 4px solid var(--crc-red);
  font-size: 0.95rem;
  color: #555;
}

.toc {
  margin: 0 0 1.75rem;
  padding: 1.1rem 1.2rem;
  background: var(--wash);
  border: 1px solid var(--rule);
}

.toc strong {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--ink-black);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding-left: 1.15rem;
}

.toc a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.toc a:hover {
  color: var(--crc-red);
}

/* Home cards */
.cards {
  display: grid;
  gap: 1rem;
  max-width: 52rem;
  margin: 2.5rem auto 0;
}

@media (min-width: 700px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  display: block;
  padding: 1.5rem 1.4rem;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--rule);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.card:hover {
  border-color: var(--crc-red);
  box-shadow: 0 8px 24px rgba(28, 26, 26, 0.08);
}

.card h2 {
  margin: 0 0 0.45rem;
  color: var(--crc-red);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.card p {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
}

.button {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.7rem 1.35rem;
  background: var(--crc-red);
  color: var(--white) !important;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none !important;
  text-transform: uppercase;
}

.button:hover {
  background: var(--crc-red-dark);
}

/* -------------------------------------------------------------------------- */
/* Footer — dark panel like malaysia site                                     */
/* -------------------------------------------------------------------------- */

.site-footer {
  background: var(--ink-black);
  color: var(--white);
  padding: 2.5rem 0 1.75rem;
  margin-top: auto;
}

.site-footer a,
.site-footer a:visited {
  color: var(--white);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--crc-red);
}

.site-footer__grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 720px) {
  .site-footer__grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

.site-footer__heading {
  margin: 0 0 0.65rem;
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0 0 0.5rem;
  color: #ddd;
  font-size: 0.92rem;
  line-height: 1.55;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  color: var(--crc-red);
  font-weight: 600;
  font-size: 0.92rem;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #aaa;
  font-size: 0.85rem;
}

.site-footer__bottom a {
  color: var(--crc-red);
}
