/* Boya Maple Inc. — shared styles for the homepage and the legal pages.
   Tone follows byzw.ca / bysx.ca: serif Chinese headings, Boya red, warm paper, generous whitespace. */
:root {
  --red: #94070a;
  --red-dark: #6e0507;
  --red-tint: #f6ecea;
  --cream: #faf7f4;
  --paper: #ffffff;
  --ink: #1f1a17;
  --muted: #6b625c;
  --line: #e8e1da;
  --todo-bg: #fff3b0;
  --max: 1120px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Noto Serif SC", "Songti SC", STSong, "SimSun", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
}
a { color: var(--red); }
a:hover { color: var(--red-dark); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.3; }

/* Unfilled facts. Remove every <mark class="todo"> before launch. */
mark.todo { background: var(--todo-bg); color: inherit; padding: 0 .2em; border-radius: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.en { color: var(--muted); font-size: .92em; }
.eyebrow {
  font-family: var(--sans); font-size: .78rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--red); margin: 0 0 14px;
}

/* Header */
.topbar { height: 4px; background: var(--red); }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 48px; width: auto; display: block; }
.nav { display: flex; gap: 28px; font-size: .95rem; }
.nav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--red); border-bottom-color: var(--red); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  background: var(--red); color: #fff; text-decoration: none;
  padding: 11px 24px; border-radius: 999px; font-size: .95rem; font-weight: 500;
  transition: background .15s;
}
.btn:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.btn-ghost:hover { background: var(--red); color: #fff; }

/* Hero */
.hero { padding: 88px 0 96px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0 0 12px; letter-spacing: .02em; }
.hero .hero-en { font-family: var(--serif); font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: var(--muted); margin: 0 0 28px; }
.hero .rule { width: 64px; height: 2px; background: var(--red); border: 0; margin: 0 0 24px; }
.hero p.lead { max-width: 560px; margin: 0 0 10px; }
.hero-panel {
  background: var(--red); color: #fff; border-radius: 18px; padding: 40px 36px;
  box-shadow: 0 24px 48px -24px rgba(148, 7, 10, .45);
}
.hero-panel .eyebrow { color: rgba(255, 255, 255, .7); }
.hero-panel ol { list-style: none; margin: 0; padding: 0; }
.hero-panel li { display: grid; grid-template-columns: auto 1fr; gap: 20px; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .25); }
.hero-panel li:first-child { border-top: 0; padding-top: 4px; }
.hero-panel .num { font-family: var(--serif); font-weight: 300; font-size: 2.2rem; line-height: 1; opacity: .85; }
.hero-panel h3 { margin: 0; font-size: 1.35rem; color: #fff; }
.hero-panel p { margin: 4px 0 0; font-size: .92rem; color: rgba(255, 255, 255, .82); }
.hero-panel a { color: #fff; text-decoration: none; }
.hero-panel a:hover h3 { text-decoration: underline; text-underline-offset: 4px; }

/* Sections */
.section { padding: 96px 0; }
.section-white { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin: 0 0 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 0 0 6px; }
.section-head p { margin: 0; }

/* Brand cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 40px 36px; display: flex; flex-direction: column;
}
.section-white .card { background: var(--cream); }
.card-logo { height: 44px; width: auto; align-self: flex-start; margin: 0 0 28px; }
.card .tagline { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 4px; color: var(--ink); }
.card .tagline-en { color: var(--muted); margin: 0 0 24px; }
.card ul { list-style: none; margin: 0 0 32px; padding: 0; border-top: 1px solid var(--line); }
.card li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.card li .en { display: block; font-size: .85rem; }
.card .btn { margin-top: auto; align-self: flex-start; }

/* Values (01–04) */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--ink); }
.value { padding: 28px 28px 8px 0; }
.value + .value { padding-left: 28px; border-left: 1px solid var(--line); }
.value .num { font-family: var(--serif); font-weight: 300; font-size: 3rem; line-height: 1; color: var(--red); margin: 0 0 18px; }
.value h3 { font-size: 1.25rem; margin: 0 0 2px; }
.value .h-en { font-size: .85rem; letter-spacing: .04em; color: var(--muted); margin: 0 0 12px; }
.value p { margin: 0 0 8px; font-size: .95rem; }

/* Quote band */
.quote { background: var(--red); color: #fff; padding: 88px 0; text-align: center; }
.quote blockquote { margin: 0 auto; max-width: 820px; }
.quote p { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.6; margin: 0 0 16px; }
.quote .en { color: rgba(255, 255, 255, .78); font-family: var(--serif); font-style: italic; font-size: 1.05rem; }
.quote cite { display: block; margin-top: 20px; font-style: normal; font-size: .85rem; letter-spacing: .2em; color: rgba(255, 255, 255, .7); }

/* Campuses */
.campuses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.campus { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 32px 36px; }
.campus h3 { font-size: 1.3rem; margin: 0 0 2px; }
.campus .h-en { color: var(--muted); font-size: .9rem; margin: 0 0 16px; }
.campus address { font-style: normal; }
.campus .tags { margin: 16px 0 0; color: var(--muted); font-size: .9rem; }

/* About + contact */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.about-grid h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin: 0 0 16px; }
.about-grid p { margin: 0 0 12px; }
.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list .k { color: var(--muted); font-size: .9rem; }
address { font-style: normal; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .7); padding: 48px 0; font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.site-footer a { color: rgba(255, 255, 255, .85); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }

/* Legal pages */
.legal { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 48px clamp(20px, 5vw, 64px); margin: 48px auto; max-width: 840px; }
.legal h1 { margin: 0 0 6px; font-size: 2.2rem; }
.legal .effective { color: var(--muted); font-style: italic; margin: 0 0 28px; }
.legal h2 { font-size: 1.2rem; margin: 36px 0 8px; }
.legal p, .legal li { margin: 0 0 12px; }
.legal table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: .95rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { background: var(--cream); font-weight: 600; }
.table-scroll { overflow-x: auto; }

.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: 0 0 28px; }
.lang-switch button {
  font: inherit; font-size: .9rem; border: 0; background: transparent; color: var(--ink);
  padding: 6px 18px; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--red); color: #fff; }
/* With JS, show one language at a time; without JS both versions stay visible. */
.js [data-lang-panel][hidden] { display: none; }
.lang-divider { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.js .lang-divider { display: none; }

@media (max-width: 900px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .campuses { grid-template-columns: 1fr; }
  .value:nth-child(3) { padding-left: 0; border-left: 0; }
  .value:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .site-header { position: static; }
  .site-header .wrap { flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; min-height: 0; }
  .brand img { height: 40px; }
  .nav { gap: 18px; font-size: .9rem; }
  .hero { padding: 48px 0 64px; }
  .hero-panel { padding: 28px 24px; }
  .section { padding: 64px 0; }
  .cards, .campuses { grid-template-columns: 1fr; }
  .card, .campus { padding: 28px 24px; }
  .values { grid-template-columns: 1fr; }
  .value, .value + .value { padding: 24px 0 8px; border-left: 0; }
  .value + .value { border-top: 1px solid var(--line); }
  .quote { padding: 64px 0; }
  .legal { margin: 0 auto; border-radius: 0; border-left: 0; border-right: 0; }
  .contact-list li { grid-template-columns: 1fr; gap: 0; }
}
