/* chris-teng.com — static rebuild. Same look as the previous site, no WordPress or plugins. */
/* Social and arrow icons in the pages are from Bootstrap Icons (MIT licence), https://icons.getbootstrap.com */

/* Layout: photo hero (white | yellow | triangle pattern), one dark slab with the pattern
   accent, white press band, black footer. 1060px measure. Viga for display, Archivo for text. */
:root {
  --yellow: #fcdc31;
  --yellow-photo: #f7d229;
  --ink: #111113;
  --slab: #27272a;
  --slab-line: #404147;
  --footer: #121212;
  --paper: #ffffff;
  --tile: #f6f6f4;
  --rule: #e3e3e0;
  --text: #66666a;
  --text-on-dark: #a9a9ad;
  --text-on-footer: #8a8a8d;
  --white: #ffffff;
  --blue: #3c5bf9;
  --blue-deep: #2a45d6;
  --pill: #ebebeb;
  --error: #ffb9ad;

  --display: "Viga", "Arial Narrow", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
  --body: "Archivo", Arial, Tahoma, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;

  --wrap: 1060px;
  --gutter: clamp(20px, 5vw, 40px);
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.menu-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 16px/1.75 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  font-synthesis: none;
  text-wrap: balance;
}
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.nb { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 18px;
  background: var(--ink); color: var(--white);
  font: 600 15px/1.2 var(--body); text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---------- header and menu ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  padding: 45px 34px 0;
  pointer-events: none;
}
.site-header .logo { display: inline-block; pointer-events: auto; }
.site-header .logo img { width: 300px; }

.menu-toggle {
  position: fixed; z-index: 60;
  top: calc(40px + env(safe-area-inset-top, 0px)); right: 50px;
  width: 45px; height: 45px; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 0;
  background: var(--ink); color: var(--white);
  cursor: pointer;
}
.bars { position: relative; display: block; width: 23px; height: 17px; }
.bars::before, .bars::after, .bars i {
  content: ""; position: absolute; left: 0; right: 0; height: 2px;
  background: currentColor;
  transition: transform .25s ease, opacity .2s ease;
}
.bars::before { top: 0; }
.bars i { top: 50%; margin-top: -1px; }
.bars::after { bottom: 0; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars i { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7.5px) rotate(-45deg); }

.overlay {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: rgba(252, 220, 49, .95);
}
.overlay ul { margin: 0; padding: 0; list-style: none; text-align: center; }
.overlay a {
  font: 600 26px/39px var(--body);
  letter-spacing: 3px; text-transform: uppercase; text-decoration: none;
  color: #000000;
}
.overlay a:hover, .overlay a[aria-current="page"] { color: var(--blue); }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--paper); }
.hero--photo {
  min-height: min(56.25vw, 860px);
  background: var(--paper) url("../img/chris-teng-hero.jpg") 65% 0 / cover no-repeat;
}
.hero__copy {
  padding: min(12.5vw, 180px) 0 0 min(11.46vw, 165px);
  max-width: calc(min(11.46vw, 165px) + min(46vw, 662px));
}
.eyebrow {
  margin: 0 0 clamp(10px, 1.25vw, 18px);
  font: 400 clamp(10.5px, 1.04vw, 15px)/1.4 var(--display);
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink);
}
.hero h1 { font-size: clamp(30px, 3.61vw, 52px); line-height: 1.04; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: clamp(20px, 2.15vw, 31px); }
.hero__photo { display: none; }

.pill {
  display: inline-flex; align-items: center;
  height: 40px; padding: 0 25px; border-radius: 25px;
  font: 400 17px/1 var(--display);
  text-transform: uppercase; text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.pill--blue { background: var(--blue); color: var(--white); }
.pill--blue:hover { background: var(--blue-deep); }
.pill--grey { background: var(--pill); color: var(--ink); }
.pill--grey:hover { background: var(--ink); color: var(--white); }

.hero--plain {
  padding: 200px 0 100px;
  background: var(--paper) url("../img/contact-hero.png") 50% 50% / cover no-repeat;
}
.hero--plain .hero__copy {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  max-width: none; margin-inline: auto; padding: 0 0 0 11px;
}
.hero--plain h1 { max-width: 13.5em; font-size: clamp(34px, 4.86vw, 70px); line-height: 1.07; }

/* ---------- dark slab ---------- */
.slab { background-color: var(--slab); color: var(--text-on-dark); }
.label {
  font: 400 15px/25px var(--display);
  text-transform: uppercase; color: var(--yellow);
}
.statement { font: 400 30px/38px var(--display); color: var(--white); text-wrap: balance; }

.slab--about {
  padding: 120px 0 84px;
  background: var(--slab) url("../img/slab-pattern.png") 100% 100% no-repeat;
}
.about-row { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 10px; }

.facts {
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 5px;
}
.slab--about .facts { margin-top: 104px; }
.facts .num {
  display: block;
  font: 400 70px/75px var(--display);
  font-variant-numeric: tabular-nums;
  color: var(--yellow);
}
.facts li { position: relative; }
/* the currency label sits just above its number, so every number in a row starts on the same line */
.facts .unit { position: absolute; left: 3px; top: -19px; font-size: 18px; line-height: 1; letter-spacing: .04em; }
.facts .cap { display: block; max-width: 235px; margin-top: 15px; font-size: 18px; line-height: 28px; }

.slab--services { padding: 26px 0 110px; }
.services {
  margin-top: 26px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 48px;
}
.service {
  display: flex; flex-direction: column; gap: 14px;
  min-width: 0; padding-top: 26px;
  border-top: 1px solid var(--slab-line);
}
.service h3, .steps h3 { font-size: 24px; line-height: 30px; color: var(--white); }
@media (min-width: 901px) { .service h3 { min-height: 60px; } }
.more {
  margin-top: auto; padding-top: 6px;
  display: inline-flex; align-items: center; gap: 9px; align-self: flex-start;
  font: 400 15px/1.2 var(--display);
  text-transform: uppercase; text-decoration: none;
  color: var(--yellow);
}
.more svg { flex: none; transition: transform .2s ease; }
.more:hover svg { transform: translateX(4px); }
.more--ink { margin-top: 0; padding-top: 0; align-self: center; color: var(--ink); }

.slab--person {
  padding: 100px 0 0;
  background: var(--slab) url("../img/slab-pattern.png") 100% 0 no-repeat;
}
.person { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 64px; align-items: start; }
.person__text { max-width: 416px; padding: 30px 0 60px; color: var(--white); font-size: 15px; line-height: 27px; }
.person__text p + p { margin-top: 15px; }
.person__text .btn { margin-top: 44px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 49px; padding: 0 35px; border: 0; border-radius: 50px;
  font: 700 15px/1.2 var(--body);
  text-transform: uppercase; text-decoration: none; text-align: center;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.btn--blue { background: var(--blue); color: var(--white); }
.btn--blue:hover { background: var(--blue-deep); }
.btn--yellow { min-height: 44px; background: var(--yellow); color: #000000; font-weight: 500; text-transform: none; }
.btn--yellow:hover { background: var(--white); }
.btn--ink { background: var(--ink); color: var(--white); }
.btn--ink:hover { background: var(--blue); }

/* ---------- press band ---------- */
.band { background: var(--paper); }
.band--press { padding: 100px 0 84px; }
.band__title { font-size: 30px; line-height: 38px; text-transform: uppercase; }
.press {
  margin: 46px 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 26px 18px;
}
.press a {
  display: flex; flex-direction: column; align-items: center; gap: 11px;
  text-decoration: none; text-align: center;
  font-size: 13px; line-height: 18px; color: var(--text);
}
.press .tile {
  width: 100%; padding: 20px 12px;
  display: grid; place-items: center;
  background: var(--tile);
  transition: background-color .2s ease;
}
.press a:hover .tile { background: var(--yellow); }
.press img { width: 150px; }
.recognition {
  margin-top: 46px; padding-top: 26px;
  border-top: 1px solid var(--rule);
  font-size: 16px; line-height: 27px;
}
.recognition strong { font-weight: 600; color: var(--ink); }
.recognition a { color: var(--blue); text-underline-offset: 3px; }

/* ---------- bio timeline ---------- */
.band--timeline { padding: 20px 0 96px; }
.timeline {
  position: relative;
  max-width: 1000px; margin: 0 auto; padding: 9px 0 0; list-style: none;
}
.timeline::before {
  content: ""; position: absolute; top: 0; bottom: 60px; left: 50%;
  width: 1px; background: var(--rule);
}
.tl { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-bottom: 15px; }
.tl::before {
  content: ""; position: absolute; top: 24px; left: 50%;
  width: 15px; height: 15px; margin-left: -7.5px;
  border: 4px solid var(--yellow); border-radius: 50%;
  background: var(--paper);
}
.tl__date {
  grid-column: 1; grid-row: 1;
  padding: 22px 22px 0;
  font: italic 700 14px/18px var(--body);
  text-align: right; color: #747478;
}
.tl__body { grid-column: 2; grid-row: 1; min-width: 0; padding: 15px 0 15px 25px; }
.tl__body h2 { font-size: 30px; line-height: 35px; }
.tl__body h2 .cjk { font-weight: 700; }
.tl__body p { margin-top: 15px; line-height: 30px; }
.tl:nth-child(even) .tl__date { grid-column: 2; text-align: left; }
.tl:nth-child(even) .tl__body { grid-column: 1; padding: 15px 25px 15px 0; text-align: right; }

.tl--now { display: block; padding: 34px 0 0; }
.tl--now::before { top: 26px; }
.now {
  position: relative; margin-top: 44px; padding: 54px 56px 56px;
  background: var(--yellow); color: var(--ink);
}
.now__label { font: italic 700 14px/18px var(--body); }
.now h2 { margin-top: 10px; font-size: 38px; line-height: 43px; }
.now__cols { margin-top: 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 36px; }
.now__cols p { line-height: 28px; }
.now__mission {
  margin-top: 30px; padding-top: 26px;
  border-top: 1px solid rgba(17, 17, 19, .28);
  font: 400 21px/31px var(--display); text-wrap: balance;
}
.now__actions { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 30px; }

/* ---------- contact ---------- */
.slab--contact { padding: 150px 0 100px; }
.contact-head { display: grid; grid-template-columns: 345px minmax(0, 1fr); gap: 20px 81px; align-items: start; }
.label--rule { padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, .4); }
.statement--lg { font-size: 40px; line-height: 50px; }

.contact-form { margin-top: 56px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 21px; }
.field { display: flex; flex-direction: column; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { padding-left: 10px; font-size: 14px; line-height: 20px; color: var(--text-on-dark); }
.field input, .field textarea {
  width: 100%; padding: 6px 10px 10px;
  border: 0; border-bottom: 1px solid rgba(255, 255, 255, .45); border-radius: 0;
  background: transparent; color: var(--white);
  font: 400 16px/1.5 var(--body);
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible {
  outline: none; border-bottom-color: var(--yellow); box-shadow: 0 1px 0 var(--yellow);
}
.field [aria-invalid="true"] { border-bottom-color: var(--error); }
.form-actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.form-note { font-size: 14px; line-height: 22px; }
.form-note a { color: var(--white); text-underline-offset: 3px; }
.form-error { margin-top: 14px; font-size: 15px; color: var(--error); }
.form-ready { margin-top: 18px; font-size: 16px; color: var(--white); }
.form-ready a { color: var(--yellow); text-underline-offset: 3px; }

.steps {
  margin: 96px 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 48px;
  counter-reset: step;
}
.steps li { min-width: 0; padding-top: 26px; border-top: 1px solid var(--slab-line); counter-increment: step; }
.steps h3::before { content: counter(step) ". "; color: var(--yellow); }
.steps p { margin-top: 12px; }
.slab--contact .facts { margin-top: 100px; }

/* ---------- footer ---------- */
.site-footer { background: var(--footer); color: var(--text-on-footer); }
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 22px; padding: 145px 0 90px; }
.footer-grid > div { min-width: 0; padding: 0 11px; }
.footer-lead { font: 400 21px/31px var(--display); color: var(--white); }
.hl { color: var(--yellow); }
a.hl { text-decoration: none; }
a.hl:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer blockquote {
  margin: 30px 0 0 25px;
  font: italic 400 21px/31px var(--display);
  font-synthesis: style;
  color: var(--white);
}
.footer-phone { margin-top: 15px; font: 400 30px/38px var(--display); color: var(--white); }
.footer-phone a { text-decoration: none; }
.footer-phone a:hover { color: var(--yellow); }
.footer-note { font-size: 15px; }
.site-footer address { margin-top: 15px; font-style: normal; font-size: 18px; line-height: 28px; }

.footer-bar-outer { border-top: 1px solid rgba(255, 255, 255, .07); }
.footer-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  padding: 28px 11px calc(28px + env(safe-area-inset-bottom, 0px));
  font-size: 15px; line-height: 27px;
}
.footer-bar .co { color: var(--yellow); text-decoration: none; }
.footer-bar .co:hover { text-decoration: underline; }
.footer-tools { display: flex; align-items: center; gap: 34px; }
.social { margin: 0; padding: 0; list-style: none; display: flex; gap: 6px; }
.social a, .to-top {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  color: var(--text-on-footer);
  transition: color .2s ease;
}
.social a:hover, .to-top:hover { color: var(--yellow); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .person { gap: 40px; }
  .contact-head { grid-template-columns: 260px minmax(0, 1fr); gap: 20px 48px; }
  .now { padding: 44px 40px 46px; }
  .now__cols { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
}

@media (max-width: 900px) {
  /* stacked hero: text on white, photo band below */
  .site-header {
    position: static; height: 61px; padding: 0 0 0 26px;
    display: flex; align-items: center;
    background: var(--paper); pointer-events: auto;
  }
  .site-header .logo img { width: 210px; }
  .menu-toggle { top: calc(8px + env(safe-area-inset-top, 0px)); right: 5px; }

  .hero--photo { min-height: 0; background: var(--paper); }
  .hero__copy { max-width: none; padding: 30px var(--gutter) 36px; }
  .eyebrow { font-size: 12px; line-height: 1.5; letter-spacing: .08em; margin-bottom: 12px; }
  .eyebrow .sep { display: none; }
  .eyebrow .nb { display: block; }
  .hero h1 { font-size: clamp(30px, 6.4vw, 46px); line-height: 1.08; }
  .hero__actions { margin-top: 24px; }
  .hero__photo {
    display: block; width: 100%;
    aspect-ratio: 1229 / 1080; max-height: 520px;
    background: var(--yellow-photo) url("../img/chris-teng-hero-mobile.jpg") 100% 0 / auto 100% no-repeat;
  }
  .hero--plain { padding: 72px 0 80px; background: var(--yellow); }
  .hero--plain .hero__copy { width: auto; margin: 0; padding: 0 var(--gutter); }
  .hero--plain h1 { font-size: clamp(34px, 7.6vw, 56px); }

  .slab--about { padding: 84px 0 70px; }
  .about-row { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .statement { font-size: 24px; line-height: 32px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 24px; }
  .slab--about .facts { margin-top: 64px; }
  .facts .unit { left: 2px; top: -15px; font-size: 15px; }
  .facts .num { font-size: 56px; line-height: 60px; }
  .facts .cap { margin-top: 10px; font-size: 16px; line-height: 25px; }

  .slab--services { padding: 10px 0 80px; }
  .services, .steps { grid-template-columns: minmax(0, 1fr); gap: 34px; }

  .slab--person { padding-top: 72px; }
  .person { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .person__photo { order: 2; width: 100%; max-width: 520px; }
  .person__text { max-width: 560px; padding: 0 0 48px; font-size: 16px; }
  .person__text .btn { margin-top: 30px; }

  .band--press { padding: 72px 0 64px; }
  .band__title { font-size: 26px; line-height: 33px; }
  .press { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 34px; }

  .slab--contact { padding: 84px 0 80px; }
  .contact-head { grid-template-columns: minmax(0, 1fr); }
  .statement--lg { font-size: 28px; line-height: 36px; }
  .contact-form { margin-top: 40px; }
  .steps { margin-top: 72px; }
  .slab--contact .facts { margin-top: 72px; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); padding: 84px 0 64px; }
  .footer-grid > div { padding: 0; }
  .footer-bar { padding-inline: 0; }
}

@media (max-width: 760px) {
  /* timeline becomes one column with the line on the left */
  .band--timeline { padding: 16px 0 72px; }
  .timeline::before { left: 7px; bottom: 30px; }
  .tl, .tl:nth-child(even) { display: block; padding: 0 0 22px 34px; }
  .tl::before { top: 6px; left: 7px; }
  .tl__date, .tl:nth-child(even) .tl__date { padding: 4px 0 0; text-align: left; }
  .tl__body, .tl:nth-child(even) .tl__body { padding: 8px 0 0; text-align: left; }
  .tl__body h2 { font-size: 25px; line-height: 30px; }
  .tl__body p { margin-top: 10px; line-height: 28px; }
  .tl--now, .tl--now:nth-child(even) { padding: 10px 0 0; }
  .tl--now::before { display: none; }
  .now { margin-top: 20px; padding: 34px 24px 38px; }
  .now h2 { font-size: 28px; line-height: 33px; }
  .now__mission { font-size: 19px; line-height: 28px; }
}

@media (max-width: 600px) {
  .fields { grid-template-columns: minmax(0, 1fr); }
  .press { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-lead, .site-footer blockquote { font-size: 19px; line-height: 28px; }
  .site-footer blockquote { margin-left: 16px; }
  .footer-phone { font-size: 26px; line-height: 34px; }
  .site-footer address { font-size: 16px; line-height: 26px; }
  .footer-bar { flex-direction: column-reverse; align-items: flex-start; }
  .overlay a { font-size: 20px; line-height: 44px; letter-spacing: 2px; }
}

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