/* =========================================================
   Yeefei Koay — website styles
   Built from the Yeefei Koay Brand Book.
   Colours: Ivory, Onyx, Aubergine (headings), Yellow (dots only), Stone (rules)
   Fonts: Jost (name, labels, body) + Instrument Serif (headings)
   ========================================================= */

/* ---------- Fonts (self-hosted: no Google requests, GDPR-friendly) ---------- */
@font-face {
  font-family: "Jost";
  src: url("../fonts/Jost-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Italic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- Brand tokens ---------- */
:root {
  --ivory: #F5F2EA;
  --onyx: #141416;
  --aubergine: #34213A;
  --yellow: #FFC20E;
  --stone: #8A877E;
  --rule: #DDD9CE;
  --white: #FFFFFF;

  --sans: "Jost", "Futura", "Century Gothic", "Avenir Next", sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --space: clamp(72px, 10vw, 136px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--onyx);
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--onyx); outline-offset: 3px; }
::selection { background: var(--yellow); color: var(--onyx); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--onyx); color: var(--ivory); padding: 10px 16px;
  font-size: 14px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Headings: Instrument Serif in aubergine ---------- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--aubergine);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0 0 .45em;
  text-wrap: balance;
}
h1 { font-size: clamp(46px, 7.2vw, 92px); }
h2 { font-size: clamp(34px, 4.4vw, 54px); }
h3 { font-size: clamp(26px, 2.6vw, 32px); line-height: 1.15; }
h1 em, h2 em, h3 em { font-style: italic; }
p { margin: 0 0 1.1em; }
.lede { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.55; max-width: 34em; }
.measure { max-width: 38em; }

/* Section label: small Jost capitals with a yellow dot */
.label {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  margin: 0 0 26px;
}
.label::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--yellow); flex: none;
}

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px 40px; flex-wrap: wrap;
  padding-top: 26px; padding-bottom: 26px;
}
.lockup { display: inline-flex; align-items: center; gap: 16px; text-decoration: none; color: var(--onyx); }
.lockup svg { height: 42px; width: auto; flex: none; }
.lockup-text { display: flex; flex-direction: column; gap: 5px; }
.lockup-name {
  font-family: var(--sans); font-weight: 500; font-size: 18px; line-height: 1;
  letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
}
.lockup-desc {
  font-family: var(--sans); font-weight: 400; font-size: 11px; line-height: 1;
  letter-spacing: .22em; text-transform: uppercase; white-space: nowrap;
}

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 34px; }
.site-nav a {
  font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; padding: 6px 0; display: inline-flex; align-items: center; gap: 8px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--onyx); }
.site-nav a[aria-current="page"]::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow);
}

/* ---------- Sections ---------- */
.section { padding: var(--space) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.hero { padding: clamp(80px, 12vw, 160px) 0 var(--space); }
.page-hero { padding: clamp(72px, 10vw, 128px) 0 clamp(56px, 7vw, 88px); }
.page-hero h1 { max-width: 12em; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 34px; margin-top: 40px; }
.btn {
  display: inline-block; background: var(--onyx); color: var(--ivory);
  font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; padding: 19px 34px; border: 1px solid var(--onyx); cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--onyx); }
.btn-light { background: var(--ivory); color: var(--onyx); border-color: var(--ivory); }
.btn-light:hover { background: transparent; color: var(--ivory); }
.text-link {
  font-size: 14px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  text-decoration: underline; text-underline-offset: .5em;
}

/* ---------- Grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px clamp(28px, 4vw, 64px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px clamp(28px, 5vw, 80px); }
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 40px clamp(32px, 6vw, 96px); align-items: start; }
.card h3 { margin-bottom: .4em; }
.card p { margin-bottom: .8em; }
.card .text-link { font-size: 12px; }

.num {
  display: block; font-family: var(--serif); font-style: italic; color: var(--aubergine);
  font-size: 22px; margin-bottom: 14px;
}
.audiences { display: flex; flex-wrap: wrap; gap: 10px 0; list-style: none; padding: 0; margin: 0; font-size: 20px; }
.audiences li:not(:last-child)::after { content: "·"; margin: 0 16px; color: var(--stone); }

/* ---------- Services page ---------- */
.service { display: grid; grid-template-columns: 5fr 7fr; gap: 24px clamp(32px, 6vw, 96px); padding: clamp(48px, 6vw, 80px) 0; border-top: 1px solid var(--rule); scroll-margin-top: 24px; }
.service:first-child { border-top: 0; padding-top: 0; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; }
.ticks li { position: relative; padding: 12px 0 12px 26px; border-top: 1px solid var(--rule); }
.ticks li:last-child { border-bottom: 1px solid var(--rule); }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 1.15em; width: 7px; height: 7px; border-radius: 50%; background: var(--onyx);
}
.note { border-left: 2px solid var(--onyx); padding: 4px 0 4px 22px; max-width: 40em; }

/* ---------- Experience (formerly Portfolio) ---------- */
.projects { list-style: none; padding: 0; margin: 0; }
.project {
  display: grid; grid-template-columns: 190px 1fr 1.25fr; gap: 12px clamp(24px, 4vw, 56px);
  padding: 36px 0; border-top: 1px solid var(--rule); align-items: baseline;
}
.project:last-child { border-bottom: 1px solid var(--rule); }
.project .year { font-size: 14px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.project h3 { margin: 0 0 6px; }
.project .meta { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; margin: 0; }
.project p { margin: 0; }
blockquote {
  margin: 0; font-family: var(--serif); font-size: clamp(26px, 3vw, 36px); line-height: 1.25; color: var(--aubergine);
}
figcaption { margin-top: 18px; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; }

/* ---------- About ---------- */
.portrait { aspect-ratio: 4 / 5; width: 100%; height: auto; object-fit: cover; background: var(--rule); }

/* ---------- Contact form ---------- */
.contact-direct { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 42px); color: var(--aubergine); line-height: 1.2; word-break: break-word; }
.contact-direct a { text-decoration-thickness: 1px; }
form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
label { font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
label .opt { font-weight: 400; letter-spacing: .1em; text-transform: none; color: var(--onyx); opacity: .7; }
input, select, textarea {
  font: inherit; color: var(--onyx); background: var(--white);
  border: 1px solid var(--stone); border-radius: 0; padding: 14px 16px; width: 100%;
}
textarea { min-height: 170px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--onyx); outline-offset: 0; border-color: var(--onyx); }
.hp { position: absolute; left: -9999px; }
.small { font-size: 15px; }

/* ---------- Onyx band + footer ---------- */
.band { background: var(--onyx); color: var(--ivory); padding: clamp(64px, 8vw, 112px) 0; }
.band h2 { color: var(--ivory); max-width: 14em; }
.band .label { color: var(--ivory); }
.site-footer { background: var(--onyx); color: var(--ivory); border-top: 1px solid #2a2a2e; padding: 56px 0 40px; font-size: 15px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; align-items: flex-start; }
.site-footer .lockup { color: var(--ivory); }
.footer-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-nav a, .footer-bottom a { text-decoration: none; font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.footer-nav a:hover, .footer-bottom a:hover { text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; margin-top: 48px; padding-top: 24px; border-top: 1px solid #2a2a2e; font-size: 13px; }
.band :focus-visible, .site-footer :focus-visible { outline-color: var(--ivory); }

/* ---------- Legal ---------- */
.legal h2 { font-size: 32px; margin-top: 1.4em; }
.legal h3 { font-size: 24px; margin-top: 1.2em; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; gap: 44px; }
  .grid-2, .split, .service { grid-template-columns: 1fr; }
  .project { grid-template-columns: 1fr; gap: 8px; }
  .portrait { max-width: 420px; }
}
@media (max-width: 620px) {
  body { font-size: 17px; }
  .site-header .wrap { padding-top: 20px; padding-bottom: 18px; }
  .lockup svg { height: 38px; }
  .lockup-name { font-size: 16px; }
  .lockup-desc { font-size: 11px; letter-spacing: .14em; }
  .site-nav { width: 100%; }
  .site-nav ul { gap: 4px 22px; }
  .site-nav a { font-size: 12px; letter-spacing: .14em; }
  .field-row { grid-template-columns: 1fr; }
  .btn { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- Contact facts ---------- */
.facts { margin: 56px 0 0; display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--rule); }
.facts div:last-child { border-bottom: 1px solid var(--rule); }
.facts dt { font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; padding-top: 3px; }
.facts dd { margin: 0; }
