/* P49 — Pacific 49 Student Union
   Visual identity v2: Navy dominant, Gold + Sky as small accents, Paper ground.
   Amber is reserved for poster corner marks and is not used on the website. */

:root {
  --navy: #0B2454;
  --gold: #B8935A;
  --sky: #4FA6DE;
  --paper: #F7F5F0;
  --ink: #1B1F27;
  --white: #FFFFFF;
  --line: rgba(11, 36, 84, 0.1);
  --radius: 16px;
  --pad: 80px;
  --header-h: 80px;
  --font: 'Poppins', 'Noto Sans SC', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
a:hover { color: var(--sky); }
h1, h2, h3 { margin: 0; color: var(--navy); line-height: 1.2; font-weight: 700; }
p { margin: 0; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.pre { white-space: pre-line; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding-inline: var(--pad); }
.section { padding-block: 104px; }
.section--white { background: var(--white); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head > div { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.h2 { font-size: 42px; }
.lead { font-size: 17px; line-height: 1.75; }

/* Curve — one per section, thin, accent only */
.curve { display: block; width: 300px; height: 20px; }
.curve path { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; }
.arc { width: 120px; height: 60px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 28px; border-radius: 999px; font-size: 16px; font-weight: 600; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: opacity .15s, transform .15s; }
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { color: var(--white); }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { color: var(--navy); }
.btn--ghost { border-color: var(--navy); color: var(--navy); background: transparent; font-weight: 500; }
.btn--ghost-light { border-color: rgba(255,255,255,.75); color: var(--white); background: transparent; font-weight: 500; }
.btn--ghost-light:hover { color: var(--white); }
.btn--sm { min-height: 44px; padding: 0 22px; font-size: 14px; }
.link-arrow { font-size: 15px; font-weight: 600; }

/* Tags */
.tag { display: inline-block; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); background: rgba(79,166,222,.16); padding: 6px 14px; border-radius: 999px; }
.tag--gold { background: rgba(184,147,90,.2); }
.tags { display: flex; gap: 10px; flex-wrap: wrap; }

/* Cards */
.card { background: var(--paper); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 12px; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(11,36,84,.10); }
.section:not(.section--white) .card { background: var(--white); }
.card__title { font-size: 20px; font-weight: 600; color: var(--navy); }
.card__text { font-size: 15px; line-height: 1.6; }
.card__num { font-size: 32px; font-weight: 700; color: var(--navy); line-height: 1; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.icon { width: 36px; height: 36px; fill: none; stroke: var(--navy); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Header */
.header { position: sticky; top: 0; z-index: 30; background: var(--white); border-bottom: 1px solid var(--line); }
.header__inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 52px; height: 47px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__zh { font-size: 18px; font-weight: 700; color: var(--navy); }
.brand__en { font-size: 12px; font-weight: 500; color: var(--navy); letter-spacing: .04em; }
.nav { display: flex; align-items: center; gap: 32px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--navy); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--sky); }
.header__actions { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; gap: 4px; background: var(--paper); border-radius: 999px; padding: 4px; }
.lang button { border: 0; background: transparent; color: var(--navy); border-radius: 999px; min-height: 36px; padding: 0 14px; font-size: 13px; font-weight: 500; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--navy); color: var(--white); font-weight: 600; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--navy); align-items: center; justify-content: center; cursor: pointer; }
.menu-btn svg { width: 20px; height: 20px; stroke: var(--white); stroke-width: 2; stroke-linecap: round; fill: none; }
.mobile-nav { display: none; }

/* Hero */
.hero { background: var(--navy); color: var(--white); }
.hero__inner { display: flex; align-items: center; justify-content: space-between; gap: 64px; padding-block: 88px 80px; }
.hero__copy { display: flex; flex-direction: column; gap: 24px; max-width: 720px; }
.hero h1 { color: var(--white); font-size: 60px; line-height: 1.1; }
.hero__sub { font-size: 18px; color: rgba(255,255,255,.88); }
.hero__tag { align-self: flex-start; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; background: rgba(79,166,222,.22); padding: 7px 14px; border-radius: 999px; }
.hero__logo { width: 360px; flex-shrink: 0; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; }
.photo-band { position: relative; background: var(--navy); }
.photo-band img { width: 100%; height: 600px; object-fit: cover; object-position: 50% 62%; }
.photo-band figcaption { position: absolute; right: var(--pad); bottom: 28px; font-size: 13px; font-weight: 500; color: var(--white); background: rgba(11,36,84,.85); padding: 8px 16px; border-radius: 999px; }

/* Events */
.tabs { display: inline-flex; gap: 8px; background: var(--white); border-radius: 999px; padding: 6px; margin-bottom: 28px; }
.tabs button { border: 0; background: transparent; color: var(--navy); border-radius: 999px; min-height: 44px; padding: 0 26px; font-size: 15px; font-weight: 500; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--navy); color: var(--white); font-weight: 600; }
.event { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--white); border-radius: var(--radius); overflow: hidden; }
.event[hidden] { display: none; }
.event__media--duo { background: var(--navy); min-height: 400px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--white); }
.event__media--duo .kicker { font-size: 14px; font-weight: 500; letter-spacing: .14em; }
.logo-pair { display: flex; align-items: center; gap: 24px; }
.logo-pair .x { font-size: 28px; font-weight: 300; }
.logo-tile { width: 128px; height: 128px; border-radius: var(--radius); background: var(--white); display: flex; align-items: center; justify-content: center; padding: 18px; }
.logo-tile img { max-height: 92px; width: auto; }
.event__gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 6px; }
.event__gallery img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; }
.event__gallery img.wide { grid-column: span 2; height: 320px; }
.event__body { padding: 48px 52px; display: flex; flex-direction: column; gap: 16px; }
.event__body h3 { font-size: 32px; }
.event__meta { font-size: 15px; font-weight: 500; color: var(--navy); }
.event__desc { font-size: 16px; line-height: 1.7; }
.note { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; background: var(--paper); border-radius: 12px; font-size: 14px; }

/* About */
.about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px; align-items: center; }
.about__copy { display: flex; flex-direction: column; gap: 18px; }
.about__copy h2 { font-size: 40px; }
.org-stack { display: flex; flex-direction: column; gap: 16px; }
.org { display: flex; gap: 22px; align-items: center; border-radius: var(--radius); padding: 28px 32px; text-decoration: none; color: var(--ink); }
.org--p49 { background: var(--navy); color: var(--white); }
.org--p49:hover { color: var(--white); }
.org--camford { background: var(--paper); border: 1.5px solid rgba(184,147,90,.6); margin-left: 56px; transition: transform .2s, box-shadow .2s; }
.org--camford:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(11,36,84,.10); color: var(--ink); }
.org__logo { width: 64px; height: 64px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.org--camford .org__logo { background: var(--white); }
.org__logo img { max-width: 56px; max-height: 56px; }
.org__name { font-size: 20px; font-weight: 600; }
.org--camford .org__name { color: var(--navy); }
.org__desc { font-size: 14px; }
.org--p49 .org__desc { color: rgba(255,255,255,.85); }
.org__text { display: flex; flex-direction: column; gap: 4px; flex-grow: 1; }
.org__arrow { font-size: 22px; color: var(--navy); }

/* Banner CTA */
.banner { display: flex; align-items: center; justify-content: space-between; gap: 48px; background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 56px 64px; }
.banner > div { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.banner h2 { color: var(--white); font-size: 38px; }
.banner .eyebrow { color: var(--white); }
.banner p { color: rgba(255,255,255,.86); }

/* Partners */
.partner { height: 128px; background: var(--paper); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 12px; text-decoration: none; color: var(--ink); }
.partner img { height: 56px; width: auto; }
.partner__name { font-size: 20px; font-weight: 700; color: var(--navy); }
.partner__role { font-size: 12px; }
a.partner { border: 1.5px solid rgba(184,147,90,.6); transition: transform .2s, box-shadow .2s; }
a.partner:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(11,36,84,.10); color: var(--ink); }

/* Centre CTA */
.center-cta { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.center-cta p { max-width: 640px; }

/* Footer */
.footer { background: var(--navy); color: var(--white); padding-block: 80px 40px; }
.footer a { color: var(--white); }
.footer a:hover { color: var(--sky); }
.footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1.3fr 1.3fr; gap: 48px; }
.footer__col { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.footer__label { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.footer__muted { color: rgba(255,255,255,.85); }
.wechat { display: flex; gap: 16px; align-items: center; }
.wechat__icon { width: 72px; height: 72px; background: var(--white); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wechat__icon svg { width: 36px; height: 36px; fill: none; stroke: var(--navy); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wechat__name { font-size: 22px; font-weight: 700; }
.footer__curve { width: 100%; height: 24px; margin-block: 48px 24px; }
.footer__curve path { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: rgba(255,255,255,.75); flex-wrap: wrap; }

/* Sub pages */
.crumb { font-size: 13px; display: flex; gap: 8px; padding-top: 24px; }
.page-hero { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 72px; display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; margin-top: 32px; }
.page-hero h1 { color: var(--white); font-size: 56px; }
.page-hero > div:first-child { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.page-hero p { font-size: 18px; color: rgba(255,255,255,.86); }
.page-hero .eyebrow { color: var(--white); }
.page-hero__side { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; flex-shrink: 0; }
.page-hero__side a:not(.btn) { color: var(--white); font-size: 14px; }
.split-hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px; align-items: center; padding-block: 56px 96px; }
.split-hero__copy { display: flex; flex-direction: column; gap: 20px; }
.split-hero h1 { font-size: 60px; }
.split-hero__panel { height: 460px; background: var(--white); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
.split-hero__panel > img { width: 200px; }
.part-of { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.part-of img { width: 40px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.step { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; border-top: 3px solid var(--navy); }
.step__n { font-size: 14px; font-weight: 600; color: var(--navy); }
.step__t { font-size: 20px; font-weight: 600; color: var(--navy); }
.todo { background: #FFF6E0; outline: 1px dashed var(--gold); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(11,36,84,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal__box { width: 520px; max-width: 100%; max-height: calc(100vh - 32px); overflow: auto; background: var(--white); border-radius: var(--radius); padding: 40px; display: flex; flex-direction: column; gap: 18px; }
.modal__box h3 { font-size: 26px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--navy); }
.form input, .form select { height: 48px; border: 1px solid rgba(11,36,84,.25); border-radius: 12px; padding: 0 14px; font-family: inherit; font-size: 16px; background: var(--white); color: var(--ink); }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form__actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 6px; }
.form__error { color: #A3261B; font-size: 14px; }
.success { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding-block: 12px; }
.success[hidden], .form[hidden] { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  :root { --pad: 40px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__logo { width: 260px; }
  .nav { gap: 20px; }
}

@media (max-width: 900px) {
  :root { --pad: 16px; --header-h: 64px; }
  .section { padding-block: 56px; }
  .h2, .about__copy h2 { font-size: 28px; }
  .nav, .header__actions .btn { display: none; }
  .menu-btn { display: inline-flex; }
  .brand img { width: 40px; height: 36px; }
  .brand__en { display: none; }
  .brand__zh { font-size: 16px; }
  .mobile-nav { display: flex; flex-direction: column; position: sticky; top: var(--header-h); z-index: 29; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 16px 20px; }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav a:not(.btn) { text-decoration: none; color: var(--navy); font-size: 17px; font-weight: 500; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .mobile-nav .btn { margin-top: 12px; }
  .hero__inner { flex-direction: column-reverse; align-items: flex-start; gap: 20px; padding-block: 40px; }
  .hero h1 { font-size: 36px; }
  .hero__sub { font-size: 16px; }
  .hero__logo { width: 96px; }
  .curve { width: 200px; }
  .actions { flex-direction: column; width: 100%; }
  .actions .btn { width: 100%; }
  .photo-band img { height: 260px; }
  .photo-band figcaption { left: 16px; right: auto; bottom: 12px; font-size: 11px; }
  .grid-4, .grid-2, .grid-3, .steps { grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 12px; }
  .grid-4.grid-4--m2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 20px; }
  .tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .event { grid-template-columns: 1fr; }
  .event__media--duo { min-height: 160px; }
  .logo-tile { width: 88px; height: 88px; padding: 12px; }
  .logo-tile img { max-height: 64px; }
  .event__gallery img { height: 120px; }
  .event__gallery img.wide { height: 220px; }
  .event__body { padding: 22px 20px 24px; }
  .event__body h3 { font-size: 22px; }
  .event__body .btn { width: 100%; }
  .about { grid-template-columns: 1fr; gap: 24px; }
  .org { padding: 18px; }
  .org--camford { margin-left: 0; }
  .banner { flex-direction: column; align-items: stretch; padding: 32px 24px; gap: 20px; }
  .banner h2 { font-size: 26px; }
  .partner { height: 104px; }
  .partner img { height: 44px; }
  .footer { padding-block: 48px 32px; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .page-hero { flex-direction: column; align-items: flex-start; padding: 32px 24px; }
  .page-hero h1, .split-hero h1 { font-size: 36px; }
  .page-hero__side { align-items: flex-start; }
  .split-hero { grid-template-columns: 1fr; gap: 28px; padding-block: 32px 56px; }
  .split-hero__panel { height: 300px; }
  .split-hero__panel > img { width: 140px; }
  .modal { align-items: flex-end; padding: 0; }
  .modal__box { border-radius: var(--radius) var(--radius) 0 0; padding: 28px 16px 32px; max-height: 92vh; }
  .form__row { grid-template-columns: 1fr; }
  .form__actions { flex-direction: column-reverse; }
  .form__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
