/* cates.sg website — shared styles.
   Tokens come from the 2026-10-20 homepage (templates/getcates/indexmin.html).
   Page-specific styles live in each template's {% block head %}. */

:root {
    --bg: #fbfaf7;
    --surface: #ffffff;
    --cream: #f5f1e8;
    --ink: #18181b;
    --ink-2: #26231f;
    --muted: #6b6760;
    --line: #ece4d8;
    --gold: #b08755;
    --gold-hi: #c89e6e;
    --gold-text: #846540;
    --edge: rgba(176, 135, 85, 0.24);
    --wash: rgba(176, 135, 85, 0.08);
    --ok: #22ae73;
    --display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', Roboto, sans-serif;
    --sans: var(--display);
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --spring: cubic-bezier(0.3, 1.35, 0.5, 1);
    --gutter: 24px;
    --max: 1160px;
    --radius: 24px;
    --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; }
.skip:focus { top: 12px; }

/* Type */
.eyebrow {
    display: inline-flex; align-items: center; gap: 12px;
    font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--gold-text);
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--gold); flex: none; }
.eyebrow.on-dark { color: var(--gold-hi); }
.eyebrow.on-dark::before { background: var(--gold-hi); }
.display {
    font-family: var(--display); font-weight: 800; letter-spacing: -0.04em; line-height: 1.04;
    font-size: clamp(40px, 5.2vw, 70px); margin: 24px 0;
}
.h2 {
    font-family: var(--display); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08;
    font-size: clamp(32px, 3.8vw, 52px); margin: 20px 0 0;
}
.display em, .h2 em {
    font-style: normal; color: var(--gold);
    background: linear-gradient(100deg, #b08755 0%, #d8ad74 55%, #b08755 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.lede { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 32em; margin: 0; }
html[lang^="zh"] .eyebrow { letter-spacing: 0.16em; }
html[lang^="zh"] .display, html[lang^="zh"] .h2 { letter-spacing: -0.01em; line-height: 1.15; }

.sec { padding: 112px 0; }
.sec-head { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: end; margin-bottom: 56px; }
.sec-head p { color: var(--muted); font-size: 17px; margin: 0; max-width: 28em; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
    font-size: 15px; font-weight: 600; letter-spacing: -0.005em; text-align: center;
    transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-ink { background: var(--ink); color: #fff; box-shadow: 0 16px 32px -18px rgba(24, 18, 14, 0.6); }
.btn-ink:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--edge); }
.btn-ghost:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--gold); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.text-link { color: var(--gold-text); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.text-link:hover { color: var(--ink); }
.text-link svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.text-link:hover svg { transform: translateX(3px); }

/* Navigation */
.nav {
    position: sticky; top: 0; z-index: 50;
    padding-top: env(safe-area-inset-top);
    background: rgba(251, 250, 247, 0.82);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    backdrop-filter: saturate(160%) blur(18px);
    box-shadow: 0 1px 0 transparent;
    transition: box-shadow 0.3s var(--ease);
}
.nav.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.nav .bar { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 24px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 32px; font-size: 14.5px; color: var(--muted); }
.nav-links a { position: relative; padding: 6px 0; transition: color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--gold);
}
.nav-cta { display: flex; align-items: center; gap: 12px; }
.pill {
    display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 20px;
    border-radius: 999px; background: var(--ink); color: #fff; font-weight: 500; font-size: 14px;
    transition: transform 0.2s var(--ease), background 0.2s;
}
.pill:hover { background: #000; }
.pill:active { transform: scale(0.97); }
.menu-btn {
    display: none; width: 44px; height: 44px; margin-right: -10px; border-radius: 12px; border: 0; background: transparent; cursor: pointer;
    align-items: center; justify-content: center;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
    display: block; width: 20px; height: 1.6px; border-radius: 2px; background: var(--ink); position: relative;
    transition: transform 0.3s var(--ease), background 0.2s;
}
.menu-btn span::before, .menu-btn span::after { content: ''; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.nav.is-open .menu-btn span { background: transparent; }
.nav.is-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.nav.is-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }
.mobile-panel { display: none; }

/* Footer */
.footer { background: var(--cream); border-top: 1px solid var(--line); padding: 72px 0 calc(40px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer-brand img { height: 28px; width: auto; margin-bottom: 18px; }
.footer-brand p { margin: 0; max-width: 22em; }
.footer h2 { margin: 0 0 16px; font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a:hover { color: var(--ink); }
.footer .ext { display: inline-flex; align-items: center; gap: 6px; }
.footer .ext svg { width: 12px; height: 12px; opacity: 0.6; }
.footer-base {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
    margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px;
}
.footer-base nav { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); background: var(--bg); }
.lang-switch a { padding: 3px 10px; border-radius: 999px; }
.lang-switch a[aria-current="true"] { background: var(--ink); color: #fff; }

/* Reveal on scroll — only hidden when JS is running (html.js) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.85s var(--ease), transform 0.85s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Logos */
.logo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px 48px; }
.logo-row img { height: 34px; width: auto; filter: grayscale(1); opacity: 0.62; transition: filter 0.3s, opacity 0.3s; }
.logo-row img.tall { height: 44px; }
.logo-row img:hover { filter: none; opacity: 1; }

/* Forms (enquiry) */
.form { background: var(--surface); border-radius: 28px; padding: 36px; box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -60px rgba(54, 38, 18, 0.5); }
.form fieldset { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }
.form legend { font-size: 14px; font-weight: 600; margin-bottom: 12px; padding: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
    box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; transition: background 0.2s, box-shadow 0.2s, color 0.2s;
}
.seg label:hover { box-shadow: inset 0 0 0 1px var(--edge); }
.seg input:checked + label { background: var(--ink); color: #fff; box-shadow: none; }
.seg input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 2px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
    width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 14px; border: 0; background: var(--bg);
    box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; transition: box-shadow 0.2s, background 0.2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--gold); }
.field input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px #c4473b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.form-foot small { color: var(--muted); font-size: 12.5px; max-width: 26em; }
.form-foot small a { text-decoration: underline; }
.form-error { display: none; margin: 16px 0 0; padding: 12px 16px; border-radius: 12px; background: #fdf0ee; color: #9c3a2f; font-size: 14px; }
.form-error.on { display: block; }
.form-done { display: none; text-align: center; padding: 48px 12px; }
.form-done .tick { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 20px; background: var(--wash); color: var(--gold-text); display: flex; align-items: center; justify-content: center; }
.form-done .tick svg { width: 30px; height: 30px; }
.form-done h3 { margin: 0 0 8px; font-size: 22px; }
.form-done p { margin: 0; color: var(--muted); }
.form.is-done .form-body { display: none; }
.form.is-done .form-done { display: block; animation: fadeUp 0.6s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } }

/* Responsive */
@media (max-width: 960px) {
    .sec { padding: 84px 0; }
    .sec-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 40px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
    .nav-links, .nav-cta .pill { display: none; }
    .menu-btn { display: inline-flex; }
    .mobile-panel {
        display: block; overflow: hidden; max-height: 0; transition: max-height 0.4s var(--ease);
        border-top: 1px solid transparent;
    }
    .nav.is-open .mobile-panel { max-height: 460px; border-top-color: var(--line); }
    .mobile-panel ul { list-style: none; margin: 0; padding: 8px var(--gutter) 20px; display: grid; }
    .mobile-panel a { display: block; padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
    .mobile-panel a[aria-current="page"] { color: var(--gold-text); font-weight: 600; }
    .mobile-panel .pill { display: flex; margin-top: 18px; height: 52px; padding: 0 24px; border-bottom: 0; color: #fff; }
}
@media (max-width: 560px) {
    :root { --gutter: 16px; --nav-h: 64px; }
    .lede { font-size: 17px; }
    .sec { padding: 72px 0; }
    .logo-row { gap: 22px 32px; }
    .logo-row img { height: 26px; }
    .logo-row img.tall { height: 34px; }
    .footer-grid { grid-template-columns: 1fr; }
    .form { padding: 24px 20px; border-radius: 22px; }
    .fields { grid-template-columns: 1fr; }
}
