/* =========================================================
   Cathay International Holdings — brand tokens
   Colors sampled directly from the corporate mark.
   ========================================================= */
:root {
  --red:   #E00914;
  --green: #029849;
  --blue:  #0558A8;
  --ink:   #16181C;
  --muted: #5A616B;
  --paper: #FFFFFF;
  --wash:  #F7F8F9;
  --hairline: #E8EAED;

  --font-display: "Archivo", "Noto Sans SC", "Noto Sans TC", sans-serif;
  --font-body: "IBM Plex Sans", "Noto Sans SC", "Noto Sans TC", sans-serif;

  --wrap: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.lang-cn { font-family: "Noto Sans SC", "Noto Sans TC", var(--font-body); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark { height: 44px; width: auto; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.site-nav { display: flex; gap: 32px; }

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible { color: var(--ink); border-bottom-color: var(--red); }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 72px; }

/* Signature: the mark's open frame + floating dot, redrawn in CSS */
.hero-frame {
  position: relative;
  max-width: 780px;
  padding: 40px 0 40px 40px;
  border-left: 4px solid var(--red);
  border-top: 4px solid var(--red);
  border-bottom: 4px solid var(--red);
}

.hero-frame::before,
.hero-frame::after {
  content: "";
  position: absolute;
  right: 0;
  width: 72px;
  height: 4px;
  background: var(--red);
}
.hero-frame::before { top: -4px; }
.hero-frame::after  { bottom: -4px; }

.frame-dot {
  position: absolute;
  top: -9px;
  right: -34px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 16ch;
}

h1 .dot { color: var(--red); }

.hero-sub {
  margin-top: 22px;
  max-width: 54ch;
  font-size: 19px;
  color: var(--muted);
  padding-right: 40px;
}

.stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.1;
}

.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; border-top: 1px solid var(--hairline); }
.section-alt { background: var(--wash); }

.section-head { margin-bottom: 36px; }

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-top: 14px;
  max-width: 24ch;
}

.section-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}

.section-body p + p { margin-top: 18px; }
.section-body { max-width: 66ch; }

.lede {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.35;
  letter-spacing: -0.005em;
}

/* ---------- Business pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pillar {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-top: 4px solid var(--ink);
  padding: 28px 26px 30px;
}

.pillar-red   { border-top-color: var(--red); }
.pillar-green { border-top-color: var(--green); }
.pillar-blue  { border-top-color: var(--blue); }

.pillar h3,
.line-item h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 10px;
}

.pillar p,
.line-item p { font-size: 15.5px; color: var(--muted); }

.secondary-lines {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.line-item {
  background: var(--paper);
  border: 1px solid var(--hairline);
  padding: 24px 26px;
}

/* ---------- Subsidiaries ---------- */
.subs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.sub-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 190px;
  padding: 28px;
  border: 1px solid var(--hairline);
  border-left-width: 4px;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.sub-green { border-left-color: var(--green); }
.sub-red   { border-left-color: var(--red); }

.sub-card:hover,
.sub-card:focus-visible {
  box-shadow: 0 6px 24px rgba(22, 24, 28, 0.08);
  transform: translateY(-2px);
}

.sub-en {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.3;
}

.sub-cn {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  color: var(--muted);
}

.sub-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.sub-card:hover .sub-link,
.sub-card:focus-visible .sub-link { color: var(--ink); }

.arrow { color: var(--red); margin-left: 4px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 720px;
}

.contact-item {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--blue);
  padding: 26px 28px;
}

.contact-item h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 10px;
}

.contact-item p { font-size: 15.5px; color: var(--muted); }

.contact-address { line-height: 1.7; }

.contact-link {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid var(--red);
  transition: color 0.15s ease;
}

.contact-link:hover,
.contact-link:focus-visible { color: var(--red); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 44px 0 32px;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-mark { height: 38px; width: auto; }

.footer-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
}

.footer-info {
  text-align: right;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.footer-info p + p { margin-top: 8px; }

.footer-bottom {
  padding-top: 20px;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- Focus visibility ---------- */
a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* ---------- Entrance motion (hero only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-frame, .stats {
    animation: rise 0.6s ease both;
  }
  .stats { animation-delay: 0.15s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .pillars { grid-template-columns: 1fr; }
  .secondary-lines { grid-template-columns: 1fr; }
  .subs { grid-template-columns: 1fr; }
  .section-grid { grid-template-columns: 1fr; gap: 20px; }
  .contact-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-top { flex-direction: column; }
  .footer-info { text-align: left; }
}

@media (max-width: 640px) {
  .hero { padding: 64px 0 56px; }
  .hero-frame { padding: 28px 0 28px 22px; }
  .frame-dot { right: -26px; width: 14px; height: 14px; top: -7px; }
  .hero-sub { padding-right: 0; }
  .stats { grid-template-columns: 1fr; gap: 20px; }
  .section { padding: 64px 0; }
  .brand-name { font-size: 13px; }
  .site-nav { gap: 18px; }
  .site-nav a { font-size: 14px; }
  .header-inner { height: 68px; }
  .brand-mark { height: 36px; }
}
