:root {
  color-scheme: light;
  --ink: #201a2d;
  --muted: #5c546b;
  --purple: #5635dc;
  --purple-dark: #4326ba;
  --paper: #fcfbfe;
  --lavender: #f0ebf8;
  --on-accent: #fcfbff;
  --line: #e5dff1;
  --control-line: #8b809d;
  --display: 'PingFang HK', 'Noto Sans HK', 'Microsoft JhengHei UI', 'Microsoft JhengHei', system-ui, sans-serif;
  --latin: 'Segoe UI', Arial, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.7 var(--display); }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; object-fit: cover; }
p, h1, h2, h3, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
:focus-visible { outline: 3px solid #7455f5; outline-offset: 4px; }
section[id] { scroll-margin-top: 1rem; }

.shell { width: min(100% - 6rem, 78rem); margin-inline: auto; }
.section { padding-block: clamp(4rem, 7vw, 7.25rem); }
.skip { position: fixed; z-index: 2; inset: 0 auto auto 1rem; transform: translateY(-160%); padding: .65rem .9rem; border-radius: .5rem; background: white; }
.skip:focus { transform: translateY(.5rem); }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; min-height: 4.875rem; align-items: center; gap: 1.5rem; }
.header-inner > .button { justify-self: end; }
.wordmark { display: inline-flex; align-items: center; gap: .6rem; width: fit-content; font: 800 1.35rem/1 var(--latin); letter-spacing: -.07em; text-decoration: none; white-space: nowrap; }
.brand-hk { color: var(--purple); font-size: .83em; letter-spacing: -.05em; }
.brand-mark { position: relative; display: inline-block; flex: none; width: 2.15rem; height: 2.15rem; overflow: hidden; border-radius: .62rem; background: var(--purple); }
.brand-mark::before, .brand-mark::after { content: ''; position: absolute; width: .84rem; height: .45rem; border-left: 2px solid white; border-bottom: 2px solid white; border-bottom-left-radius: .2rem; transform: rotate(-47deg); }
.brand-mark::before { top: .58rem; left: .44rem; }
.brand-mark::after { top: .95rem; left: .83rem; }
.nav { display: flex; gap: clamp(1rem, 3vw, 2.6rem); align-items: center; font-size: .96rem; font-weight: 650; }
.nav a { padding: .65rem .25rem; text-decoration: none; }
.nav a:hover, .footer-link:hover { color: var(--purple); }

.button { display: inline-flex; justify-content: center; align-items: center; min-height: 3.125rem; padding: .64rem 1.2rem; border: 1px solid transparent; border-radius: .7rem; text-decoration: none; text-align: center; font-size: .95rem; font-weight: 750; line-height: 1.35; transition: background-color .16s, border-color .16s, color .16s; }
.button-small { min-height: 2.75rem; padding-inline: 1rem; }
.button-primary { background: var(--purple); color: var(--on-accent); }
.button-primary:hover { background: var(--purple-dark); }
.button-primary:active { background: #321b98; }
.button-secondary { border-color: var(--control-line); color: var(--ink); background: var(--paper); }
.button-secondary:hover { background: #f0eafa; border-color: #746689; }
.button-secondary:active { background: #e7def7; }

.eyebrow { display: flex; gap: .58rem; align-items: center; color: var(--muted); font-size: .875rem; font-weight: 800; letter-spacing: .08em; }
.eyebrow-line { width: 1.15rem; height: 2px; flex: none; background: currentColor; border-radius: 2px; }
.card-actions, .brief-actions { display: flex; flex-wrap: wrap; gap: .66rem; }

.section h2 { margin-top: .65rem; font-size: clamp(2rem, 3.3vw, 3.25rem); font-weight: 850; letter-spacing: -.065em; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.65rem); }
.template-card { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; background: var(--paper); }
.template-image { display: block; aspect-ratio: 1.69; overflow: hidden; background: #e7d7cb; }
.template-image--cafe { background: #b6785a; }
.template-image--services { background: #57484e; }
.template-image img { width: 100%; height: 100%; transition: transform .25s ease; }
.template-image:hover img { transform: scale(1.04); }
.template-content { display: flex; flex-direction: column; padding: clamp(1rem, 2vw, 1.55rem); }
.template-content .category { color: var(--muted); font-size: .875rem; font-weight: 750; }
.template-content h3 { margin-block: .3rem .65rem; font: 750 clamp(1.35rem, 2vw, 1.75rem)/1.15 var(--latin); letter-spacing: -.04em; }
.template-content h3:lang(zh) { font-family: var(--display); }
.template-content > p:not(.category) { color: var(--muted); margin-bottom: 1rem; }
.card-actions { margin-top: auto; gap: .3rem 1.35rem; }
.text-link { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--purple-dark); font-size: .92rem; font-weight: 750; text-decoration-thickness: 1px; text-underline-offset: .24em; }
.text-link--muted { color: var(--muted); }
.text-link:hover { color: var(--purple); text-decoration-thickness: 2px; }
.more-templates { margin-top: 1.35rem; border-top: 1px solid var(--line); }
.more-templates summary { padding: .7rem .15rem; color: var(--purple-dark); cursor: pointer; font-weight: 750; }
.more-templates .template-grid { margin-top: .65rem; }

.colour-callout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(11rem, .9fr); align-items: center; gap: 2rem; min-height: 16rem; margin-top: clamp(1.5rem, 3vw, 2.5rem); padding: clamp(1.4rem, 4vw, 3.25rem); overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: linear-gradient(125deg, var(--lavender), var(--paper)); }
.colour-callout h3 { margin-block: .55rem .75rem; font-size: clamp(1.55rem, 3vw, 2.65rem); letter-spacing: -.055em; }
.colour-callout-copy > p:not(.eyebrow) { max-width: 22rem; margin-bottom: 1.25rem; color: var(--muted); }
.colour-callout-art { position: relative; display: grid; align-items: center; justify-items: center; width: 100%; min-height: 11rem; }
.tone-stack { position: absolute; display: flex; width: min(75%, 20rem); height: 4rem; overflow: hidden; border: 1px solid #201a2d24; border-radius: .7rem; box-shadow: 0 .4rem 1.2rem #201a2d1f; }
.tone-stack i:nth-child(1) { flex: 6; background: var(--sample-base); }
.tone-stack i:nth-child(2) { flex: 3; background: var(--sample-secondary); }
.tone-stack i:nth-child(3) { flex: 1; background: var(--sample-accent); }
.tone-stack--blue { --sample-base: #f5f5f2; --sample-secondary: #dde7f5; --sample-accent: #1f4fff; transform: translate(9%, -66%) rotate(9deg); }
.tone-stack--rose { --sample-base: #f6e1e1; --sample-secondary: #fff8f5; --sample-accent: #d7263d; transform: translate(1%, -2%) rotate(1deg); }
.tone-stack--oat { --sample-base: #efe6d8; --sample-secondary: #d8c3a5; --sample-accent: #8a4b1f; transform: translate(-8%, 65%) rotate(-8deg); }

.services { background: var(--paper); border-block: 1px solid var(--line); }
.services-inner, .contact-inner { display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(2rem, 7vw, 7rem); }
.services-intro p:last-child { max-width: 24rem; margin-top: 1rem; color: var(--muted); }
.service-list div { display: grid; grid-template-columns: minmax(7rem, .43fr) 1fr; align-items: baseline; gap: .8rem; padding-block: 1.13rem; border-top: 1px solid #ded6eb; }
.service-list div:last-child { border-bottom: 1px solid #ded6eb; }
.service-list dt { font-size: 1.075rem; font-weight: 800; }
.service-list dd { color: var(--muted); }

.contact { background: var(--lavender); }
.contact-inner { align-items: start; }
.contact-copy { padding-top: clamp(0rem, 2vw, 1.65rem); }
.contact-copy > p:not(.eyebrow) { max-width: 24rem; margin-top: 1.1rem; color: var(--muted); }
.direct-contact { display: grid; gap: .3rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.direct-contact a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--purple-dark); font-weight: 650; overflow-wrap: anywhere; text-underline-offset: .28em; }
.direct-contact a:hover { color: var(--purple); }
.brief { display: grid; gap: 1rem; min-width: 0; padding: clamp(1.1rem, 3vw, 1.85rem); border: 1px solid var(--line); border-radius: 1.05rem; background: var(--paper); color: var(--ink); }
.brief :focus-visible { outline-color: var(--purple); }
.brief label { display: block; min-width: 0; font-size: .925rem; font-weight: 750; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.optional { color: var(--muted); font-size: .875rem; font-weight: 500; }
.brief input, .brief select, .brief textarea { display: block; width: 100%; min-height: 2.85rem; margin-top: .3rem; padding: .55rem .7rem; border: 1px solid var(--control-line); border-radius: .48rem; background: #fbf9fe; color: var(--ink); font: 400 1rem/1.45 var(--display); }
.brief input:focus, .brief select:focus, .brief textarea:focus { border-color: var(--purple); }
.brief textarea { resize: vertical; }
.brief textarea::placeholder { color: #71697d; opacity: 1; }
.brief select { appearance: none; padding-right: 2.2rem; background-image: linear-gradient(45deg, transparent 50%, #504467 50%), linear-gradient(135deg, #504467 50%, transparent 50%); background-size: .34rem .34rem; background-position: calc(100% - 1.15rem) center, calc(100% - .81rem) center; background-repeat: no-repeat; }
.brief-status { color: var(--muted); font-size: .875rem; }
.brief-tone { display: grid; align-items: center; grid-template-columns: auto minmax(0, 1fr) auto; gap: .7rem; padding: .35rem .65rem; border: 1px solid var(--line); border-radius: .48rem; background: var(--lavender); font-size: .875rem; }
.brief-tone p { overflow-wrap: anywhere; }
.brief-tone p span { color: var(--muted); }
.brief-tone-swatches { display: flex; min-width: 2rem; height: .95rem; overflow: hidden; border: 1px solid #201a2d22; border-radius: .22rem; }
.brief-tone-swatches i { flex: 1; }
.tone-clear { min-height: 2.75rem; padding-inline: .4rem; border: 0; background: none; color: var(--purple-dark); text-decoration: underline; text-underline-offset: .19em; }

.footer { background: var(--paper); color: var(--muted); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: .7rem 1.35rem; flex-wrap: wrap; padding-block: 1.65rem; }
.footer-inner .wordmark { color: var(--ink); }
.footer-inner p { font-size: .875rem; }
.footer-link { font-size: .9rem; font-weight: 650; text-underline-offset: .22em; }

@media (max-width: 65rem) {
  .shell { width: min(100% - 3.5rem, 78rem); }
}

@media (max-width: 51rem) {
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services-inner, .contact-inner { grid-template-columns: 1fr; }
  .contact-copy { padding: 0; }
}

@media (max-width: 36rem) {
  .shell { width: calc(100% - 2.25rem); }
  .header-inner { grid-template-columns: 1fr auto; gap: .6rem; min-height: 4.3rem; }
  .nav { display: none; }
  .wordmark { font-size: 1.22rem; }
  .brand-mark { width: 2.05rem; height: 2.05rem; }
  .template-grid { grid-template-columns: 1fr; }
  .colour-callout { grid-template-columns: 1fr; gap: .75rem; }
  .colour-callout-art { min-height: 7.8rem; }
  .tone-stack { width: min(75%, 15rem); height: 2.75rem; }
  .service-list div { grid-template-columns: 1fr; gap: .28rem; }
  .field-pair { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .template-image img { transition: none; }
  .template-image:hover img { transform: none; }
}
