/*
 * Kerwin & Vance, public site.
 *
 * Hand-written, no build step. The palette is the brand navy (#102A43) on
 * white and ivory, with brass for rules, numerals and the lozenge taken from
 * the V of the mark. Headings are set in Cormorant Garamond (Latin) and
 * Noto Serif Thai; text in IBM Plex Sans and IBM Plex Sans Thai, which share
 * metrics, so Thai and English sit together on one line.
 *
 * Sections: tokens, base, type, layout, buttons, header, hero, sections of
 * the home page, practices page, insights, article, legal, footer, motion.
 */

/* ---------- Tokens ---------- */

:root {
    --navy: #102a43;
    --navy-deep: #0b1d2e;
    --navy-soft: #1c3a57;
    --ink: #13202d;
    --text: #2f3b47;
    --muted: #5e6a76;
    --paper: #ffffff;
    --ivory: #f6f3ec;
    --ivory-deep: #eee8dc;
    --rule: #ddd6c8;
    --rule-soft: #e9e4d9;
    --brass: #a8864f;
    --brass-ink: #7a6136;
    --brass-light: #c9ae78;
    --on-navy: rgba(255, 255, 255, 0.86);
    --on-navy-muted: rgba(255, 255, 255, 0.64);
    --on-navy-rule: rgba(255, 255, 255, 0.16);
    --danger: #8a2e2e;

    --serif: 'Cormorant Garamond', 'Noto Serif Thai', 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', Georgia, 'Times New Roman', serif;
    --sans: 'IBM Plex Sans', 'IBM Plex Sans Thai', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --container: 1240px;
    --gutter: clamp(20px, 4vw, 40px);
    --section: clamp(72px, 9vw, 128px);
    --header: 80px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header) + 16px);
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

:lang(th) body,
body:lang(th) {
    line-height: 1.8;
}

img,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

p {
    margin: 0;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-weight: inherit;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

::selection {
    background: rgba(168, 134, 79, 0.28);
    color: var(--ink);
}

:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 3px;
}

.visually-hidden {
    position: absolute !important;
    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;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--navy);
    color: #fff;
    font-size: 0.875rem;
    transform: translateY(-160%);
    transition: transform 0.2s var(--ease);
}

.skip-link:focus {
    transform: none;
}

/* ---------- Type ---------- */

.t-display,
.t-h1,
.t-h2,
.t-h3 {
    font-family: var(--serif);
    color: var(--ink);
    font-weight: 500;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.t-display {
    --size: clamp(2.6rem, 5.4vw, 4.9rem);
    font-size: var(--size);
    line-height: 1.04;
}

.t-h1 {
    --size: clamp(2.2rem, 4vw, 3.5rem);
    font-size: var(--size);
    line-height: 1.08;
}

.t-h2 {
    --size: clamp(1.8rem, 3vw, 2.6rem);
    font-size: var(--size);
    line-height: 1.12;
}

.t-h3 {
    --size: clamp(1.4rem, 2vw, 1.75rem);
    font-size: var(--size);
    line-height: 1.2;
    font-weight: 600;
}

/*
 * A Thai phrase in a heading (see App\Support\Typography::phrases): kept on
 * one line when it fits, so lines break at the spaces between phrases.
 */
.ph {
    display: inline-block;
}

/*
 * Thai and Chinese glyphs are larger at the same size than Cormorant's small
 * x-height, and Thai stacks vowels and tone marks above and below, so their
 * headings are set a step smaller with room between lines.
 */
:lang(th) .t-display,
.t-display:lang(th) {
    font-size: calc(var(--size) * 0.74);
    line-height: 1.34;
    letter-spacing: 0;
}

:lang(th) .t-h1,
:lang(th) .t-h2,
:lang(th) .t-h3,
.t-h1:lang(th),
.t-h2:lang(th),
.t-h3:lang(th) {
    font-size: calc(var(--size) * 0.8);
    line-height: 1.42;
    letter-spacing: 0;
}

:lang(zh-Hans) .t-display,
.t-display:lang(zh-Hans) {
    font-size: calc(var(--size) * 0.76);
    line-height: 1.3;
    letter-spacing: 0.02em;
}

:lang(zh-Hans) .t-h1,
:lang(zh-Hans) .t-h2,
:lang(zh-Hans) .t-h3,
.t-h1:lang(zh-Hans),
.t-h2:lang(zh-Hans),
.t-h3:lang(zh-Hans) {
    font-size: calc(var(--size) * 0.82);
    line-height: 1.36;
    letter-spacing: 0.02em;
}

.t-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--brass-ink);
}

.t-eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    background: currentColor;
    transform: rotate(45deg);
    flex: none;
}

:lang(th) .t-eyebrow,
:lang(zh-Hans) .t-eyebrow {
    font-size: 0.875rem;
    letter-spacing: 0.06em;
}

.t-lead {
    font-size: clamp(1.08rem, 1.4vw, 1.25rem);
    line-height: 1.65;
    color: var(--text);
}

:lang(th) .t-lead {
    line-height: 1.85;
}

.t-muted {
    color: var(--muted);
}

.numeral {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--brass-ink);
    /* Cormorant's default old-style figures drop 3, 4 and 5 below the line,
       which throws a numbered row out of step. */
    font-variant-numeric: lining-nums;
}

.lozenge {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--brass);
    transform: rotate(45deg);
    flex: none;
}

/* ---------- Layout ---------- */

.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container--narrow {
    max-width: calc(780px + 2 * var(--gutter));
}

.section {
    padding-block: var(--section);
}

.section--ivory {
    background: var(--ivory);
}

.section--navy {
    background: var(--navy);
    color: var(--on-navy);
}

.section--navy .t-display,
.section--navy .t-h1,
.section--navy .t-h2,
.section--navy .t-h3 {
    color: #fff;
}

.section--navy .t-eyebrow {
    color: var(--brass-light);
}

.section-head {
    display: grid;
    gap: 20px 64px;
    margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head__title {
    display: grid;
    gap: 18px;
    max-width: 760px;
}

@media (min-width: 960px) {
    .section-head--split {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
        align-items: end;
    }
}

.rule {
    height: 1px;
    border: 0;
    margin: 0;
    background: var(--rule);
}

/* ---------- Buttons and links ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 52px;
    padding: 14px 28px;
    border: 1px solid transparent;
    border-radius: 0;
    font-family: var(--sans);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

:lang(th) .btn,
:lang(zh-Hans) .btn {
    font-size: 0.9375rem;
    letter-spacing: 0.04em;
}

.btn svg {
    width: 16px;
    height: 16px;
    flex: none;
    transition: transform 0.25s var(--ease);
}

.btn:hover svg {
    transform: translateX(3px);
}

.btn--navy {
    background: var(--navy);
    color: #fff;
}

.btn--navy:hover {
    background: var(--navy-deep);
}

.btn--brass {
    background: var(--brass-light);
    color: var(--navy-deep);
}

.btn--brass:hover {
    background: #d8c294;
}

.btn--outline {
    border-color: var(--navy);
    color: var(--navy);
}

.btn--outline:hover {
    background: var(--navy);
    color: #fff;
}

.btn--block {
    width: 100%;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--navy);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}

:lang(th) .link-arrow,
:lang(zh-Hans) .link-arrow {
    font-size: 0.9375rem;
    letter-spacing: 0.03em;
}

.link-arrow svg {
    width: 15px;
    height: 15px;
    transition: transform 0.25s var(--ease);
}

.link-arrow:hover {
    border-color: currentColor;
}

.link-arrow:hover svg {
    transform: translateX(3px);
}

.link-arrow--light {
    color: #fff;
}

/* ---------- Utility bar and header ---------- */

.utility {
    background: var(--navy-deep);
    color: var(--on-navy-muted);
    font-size: 0.8125rem;
}

.utility__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 24px;
    min-height: 40px;
    padding-block: 6px;
}

.utility__contact {
    display: none;
    align-items: center;
    gap: 22px;
}

.utility__contact a:hover {
    color: #fff;
}

.utility__contact span + a,
.utility__contact a + a {
    position: relative;
}

@media (min-width: 760px) {
    .utility__contact {
        display: flex;
    }
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.lang-switch a {
    padding: 2px 8px;
    color: var(--on-navy-muted);
    font-weight: 500;
    letter-spacing: 0.08em;
    border-bottom: 1px solid transparent;
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.lang-switch a:hover {
    color: #fff;
}

.lang-switch a[aria-current] {
    color: #fff;
    border-color: var(--brass-light);
}

.lang-switch__sep {
    width: 1px;
    height: 12px;
    background: var(--on-navy-rule);
}

.lang-hint {
    display: none;
    align-items: center;
    gap: 10px;
    width: 100%;
    order: 3;
    color: #fff;
}

.lang-hint.is-shown {
    display: flex;
}

.lang-hint svg {
    width: 16px;
    height: 16px;
    flex: none;
    color: var(--brass-light);
}

.lang-hint button svg {
    width: 12px;
    height: 12px;
    color: currentColor;
}

.lang-hint a {
    color: var(--brass-light);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lang-hint button {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--on-navy-muted);
    cursor: pointer;
}

.lang-hint button:hover {
    color: #fff;
}

@media (min-width: 760px) {
    .lang-hint {
        width: auto;
        order: 0;
        margin-left: auto;
    }

    .lang-hint + .lang-switch {
        margin-left: 12px;
    }
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--rule-soft);
    transition: box-shadow 0.3s var(--ease);
}

@supports (backdrop-filter: blur(10px)) {
    .site-header {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: saturate(1.4) blur(12px);
    }
}

.site-header.is-scrolled {
    box-shadow: 0 10px 30px -18px rgba(11, 29, 46, 0.35);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--header);
}

.brand {
    display: block;
    flex: none;
}

.brand img {
    width: auto;
    height: 30px;
}

@media (min-width: 1200px) {
    .brand img {
        height: 34px;
    }
}

.nav {
    display: none;
    align-items: center;
    gap: clamp(20px, 2.4vw, 40px);
}

.nav__link {
    position: relative;
    padding-block: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
}

.nav__link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--brass);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
}

.nav__link:hover::after,
.nav__link[aria-current='page']::after {
    transform: scaleX(1);
}

.header-cta {
    display: none;
}

.header-cta .btn {
    min-height: 44px;
    padding: 10px 20px;
}

@media (min-width: 1080px) {
    .nav,
    .header-cta {
        display: flex;
    }
}

.menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--navy);
    cursor: pointer;
}

.menu-toggle svg {
    width: 20px;
    height: 20px;
}

@media (min-width: 1080px) {
    .menu-toggle {
        display: none;
    }
}

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    background: var(--navy);
    color: #fff;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
}

.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s var(--ease);
}

.mobile-menu__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header);
    border-bottom: 1px solid var(--on-navy-rule);
}

.mobile-menu__top img {
    height: 28px;
    width: auto;
}

.mobile-menu__close {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--on-navy-rule);
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.mobile-menu__close svg {
    width: 20px;
    height: 20px;
}

.mobile-menu__nav {
    display: grid;
    padding-block: 24px;
}

.mobile-menu__nav a {
    display: flex;
    align-items: baseline;
    gap: 18px;
    padding-block: 16px;
    border-bottom: 1px solid var(--on-navy-rule);
    font-family: var(--serif);
    font-size: 1.9rem;
    line-height: 1.2;
}

:lang(th) .mobile-menu__nav a,
:lang(zh-Hans) .mobile-menu__nav a {
    font-size: 1.5rem;
}

.mobile-menu__nav a .numeral {
    font-size: 0.9rem;
    color: var(--brass-light);
    min-width: 2ch;
}

.mobile-menu__foot {
    display: grid;
    gap: 20px;
    margin-top: auto;
    padding-block: 28px 40px;
    color: var(--on-navy-muted);
    font-size: 0.9375rem;
}

.mobile-menu__foot a:hover {
    color: #fff;
}

body.menu-open {
    overflow: hidden;
}

/* ---------- Hero ---------- */

.hero {
    /* The rosette's size, and how far its centre (the seal) sits from the right edge. */
    --art: min(980px, 110vw);
    --art-centre: clamp(96px, 16vw, 300px);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 80% at 85% 35%, rgba(255, 255, 255, 0.07), transparent 60%),
        linear-gradient(180deg, var(--navy) 0%, #0e263d 100%);
    color: var(--on-navy);
}

.hero__art {
    position: absolute;
    z-index: -1;
    top: 50%;
    right: calc(var(--art-centre) - var(--art) / 2);
    width: var(--art);
    aspect-ratio: 1;
    transform: translateY(-54%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    display: grid;
    gap: 28px;
    padding-top: clamp(80px, 11vw, 150px);
    padding-bottom: clamp(56px, 7vw, 96px);
}

.hero .t-eyebrow {
    color: var(--brass-light);
}

.hero .t-display {
    max-width: 17ch;
    color: #fff;
}

.hero .t-display:lang(th),
:lang(th) .hero .t-display {
    max-width: 16em;
}

.hero .t-display:lang(zh-Hans),
:lang(zh-Hans) .hero .t-display {
    max-width: 16em;
}

.hero .t-lead {
    max-width: 62ch;
    color: var(--on-navy);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 32px;
    margin-top: 8px;
}

.hero__practices {
    position: relative;
    border-top: 1px solid var(--on-navy-rule);
}

.hero__practices ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero__practices li + li {
    border-left: 1px solid var(--on-navy-rule);
}

.hero__practices li:nth-child(3) {
    border-left: 0;
}

.hero__practices li:nth-child(n + 3) {
    border-top: 1px solid var(--on-navy-rule);
}

.hero__practices a {
    display: grid;
    align-content: start;
    gap: 6px;
    height: 100%;
    padding: 22px 20px 26px;
    color: #fff;
    transition: background-color 0.3s var(--ease);
}

.hero__practices a:hover {
    background: rgba(255, 255, 255, 0.05);
}

.hero__practices .numeral {
    color: var(--brass-light);
    font-size: 1rem;
}

.hero__practices span:last-child {
    font-family: var(--serif);
    font-size: 1.25rem;
    line-height: 1.25;
}

:lang(th) .hero__practices span:last-child,
:lang(zh-Hans) .hero__practices span:last-child {
    font-size: 1.05rem;
    line-height: 1.5;
}

@media (min-width: 900px) {
    .hero__practices ol {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero__practices li:nth-child(3) {
        border-left: 1px solid var(--on-navy-rule);
    }

    .hero__practices li:nth-child(n + 3) {
        border-top: 0;
    }

    .hero__practices li:first-child a {
        padding-left: 0;
    }

    .hero__practices a {
        padding: 28px 28px 34px;
    }
}

.guilloche path {
    fill: none;
    stroke: var(--brass-light);
    stroke-width: 0.7;
    vector-effect: non-scaling-stroke;
}

.guilloche {
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.6s var(--ease);
}

.guilloche.is-drawn {
    opacity: 0.34;
}

/* The hero's rosette wakes a little as the pointer nears the seal (--near, from site.js). */
.hero__art .guilloche.is-drawn {
    opacity: calc(0.34 + var(--near, 0) * 0.16);
}

.hero__art.is-live .guilloche {
    transition: none;
}

@media (prefers-reduced-motion: no-preference) {
    .guilloche--turning.is-drawn {
        animation: guilloche-turn 350s linear infinite;
    }

    /* First view: the rosette is engraved round like a lathe turning (needs --sweep registered by site.js). */
    .can-sweep .guilloche--turning {
        -webkit-mask-image: conic-gradient(from -90deg, #000 calc(var(--sweep) - 40deg), transparent var(--sweep));
        mask-image: conic-gradient(from -90deg, #000 calc(var(--sweep) - 40deg), transparent var(--sweep));
    }

    .can-sweep .guilloche--turning.is-drawn {
        animation:
            guilloche-sweep 2.8s cubic-bezier(0.45, 0.05, 0.25, 1) both,
            guilloche-turn 350s linear infinite;
    }
}

@keyframes guilloche-turn {
    to {
        transform: rotate(360deg);
    }
}

@keyframes guilloche-sweep {
    from {
        --sweep: 0deg;
    }

    to {
        --sweep: 400deg;
    }
}

/* ---------- Hero: the KV monogram ---------- */

.seal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 25.5%; /* the open centre of the rosette */
    aspect-ratio: 1;
    translate: -50% -50%;
}

.seal__body {
    position: absolute;
    inset: 0;
}

/*
 * Nothing moves when the pointer comes near; the monogram only glows.
 * --near runs from 0 (far away) to 1 (on it), set by site.js on .hero__art.
 */
.seal__glow {
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(236, 210, 148, 0.3), rgba(236, 210, 148, 0.08) 45%, rgba(236, 210, 148, 0) 70%);
    opacity: var(--near, 0);
}

/* Brighter, with a gold halo round the letters, as the pointer nears; its cast shadow fades as it lights up. */
.seal__lift {
    position: absolute;
    inset: 25% 18%;
    filter:
        brightness(calc(1 + var(--near, 0) * 0.2))
        drop-shadow(0 0 calc(var(--near, 0) * 14px) rgba(240, 214, 150, calc(var(--near, 0) * 0.75)))
        drop-shadow(3px 7px 6px rgba(4, 12, 22, calc(0.5 - var(--near, 0) * 0.35)));
}

/* The monogram in brushed brass, lit from the upper left. */
.seal__mark {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 250, 234, 0.95), rgba(255, 250, 234, 0) 42%),
        linear-gradient(140deg, #8a6d3b 0%, #d8c08a 26%, #a8864f 46%, #ecdcae 62%, #8f7240 80%, #c9ae78 100%);
    -webkit-mask: url('../images/brand/kv-mark-white.svg') center / contain no-repeat;
    mask: url('../images/brand/kv-mark-white.svg') center / contain no-repeat;
}

/* A glint crosses the monogram once, as the page opens. */
.seal__mark::after {
    content: '';
    position: absolute;
    inset: -20% -60%;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 251, 238, 0.95) 50%, transparent 60%);
    translate: -100% 0;
}

.seal.is-glinting .seal__mark::after {
    animation: seal-glint 1.5s cubic-bezier(0.3, 0.1, 0.2, 1) both;
}

@keyframes seal-glint {
    from {
        translate: -100% 0;
    }

    to {
        translate: 100% 0;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .js .seal {
        opacity: 0;
    }

    .js .guilloche.is-drawn + .seal {
        animation: seal-in 1.4s var(--ease) 0.9s both;
    }
}

@keyframes seal-in {
    from {
        opacity: 0;
        scale: 0.92;
    }

    to {
        opacity: 1;
        scale: 1;
    }
}

/* Where the rosette sits behind the text, the monogram is only a watermark. */
@media (max-width: 959px) {
    .seal__body {
        opacity: 0.28;
    }
}

/* ---------- Home: the firm ---------- */

.firm {
    display: grid;
    gap: 40px 80px;
}

@media (min-width: 960px) {
    .firm {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

.firm__head {
    display: grid;
    align-content: start;
    gap: 22px;
}

.firm__body {
    display: grid;
    align-content: start;
    gap: 22px;
    padding-top: 6px;
}

.firm__body .t-lead {
    color: var(--ink);
}

@media (min-width: 960px) {
    .firm__body {
        padding-top: 44px;
        border-left: 1px solid var(--rule);
        padding-left: 64px;
    }
}

.principles {
    display: grid;
    margin-top: clamp(56px, 7vw, 96px);
    border-top: 1px solid var(--rule);
}

.principles__title {
    padding-block: 24px 8px;
}

.principles ol {
    display: grid;
}

.principles li {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px 16px;
    padding-block: 26px;
    border-bottom: 1px solid var(--rule);
}

.principles li .numeral {
    font-size: 1.05rem;
    padding-top: 3px;
}

.principles h3 {
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--ink);
}

:lang(th) .principles h3,
:lang(zh-Hans) .principles h3 {
    font-size: 1.2rem;
    line-height: 1.5;
}

.principles p {
    grid-column: 2;
    color: var(--muted);
}

@media (min-width: 760px) {
    .principles ol {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .principles li:nth-child(odd) {
        padding-right: 40px;
    }

    .principles li:nth-child(even) {
        padding-left: 40px;
        border-left: 1px solid var(--rule);
    }
}

@media (min-width: 1100px) {
    .principles ol {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .principles li {
        grid-template-columns: minmax(0, 1fr);
        padding: 30px 28px 34px;
        border-bottom: 0;
        border-left: 1px solid var(--rule);
    }

    .principles li:nth-child(odd),
    .principles li:nth-child(even) {
        padding: 30px 28px 34px;
    }

    .principles li:first-child {
        padding-left: 0;
        border-left: 0;
    }

    .principles p {
        grid-column: 1;
    }
}

/* ---------- Home: practices ---------- */

.practice-grid {
    display: grid;
    border-top: 1px solid var(--navy);
}

@media (min-width: 720px) {
    .practice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .practice-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.practice-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 34px 28px 32px;
    border-bottom: 1px solid var(--rule);
    background: transparent;
    transition: background-color 0.35s var(--ease);
}

.practice-card:hover {
    background: var(--paper);
}

@media (min-width: 720px) {
    .practice-card:nth-child(even) {
        border-left: 1px solid var(--rule);
    }
}

@media (min-width: 1100px) {
    .practice-card {
        border-bottom: 0;
        border-left: 1px solid var(--rule);
    }

    .practice-card:first-child {
        border-left: 0;
    }
}

.practice-card .numeral {
    font-size: 1.1rem;
}

.practice-card h3 a::after {
    content: '';
    position: absolute;
    inset: 0;
}

.practice-card p {
    color: var(--muted);
}

.practice-card ul {
    display: grid;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--rule);
    font-size: 0.9375rem;
    color: var(--text);
}

.practice-card li {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.practice-card li .lozenge {
    width: 5px;
    height: 5px;
    transform: rotate(45deg) translateY(-2px);
}

.practice-card .link-arrow {
    margin-top: auto;
    padding-top: 12px;
    align-self: flex-start;
}

/* ---------- Home: approach ---------- */

.approach {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.approach__art {
    position: absolute;
    z-index: -1;
    left: -220px;
    bottom: -320px;
    width: 720px;
    aspect-ratio: 1;
    pointer-events: none;
}

.steps {
    display: grid;
    counter-reset: step;
    border-top: 1px solid var(--on-navy-rule);
}

.steps li {
    display: grid;
    gap: 12px;
    padding: 30px 0 34px;
    border-bottom: 1px solid var(--on-navy-rule);
}

.steps .numeral {
    color: var(--brass-light);
    font-size: 2.6rem;
    line-height: 1;
    letter-spacing: 0.02em;
}

.steps h3 {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
}

:lang(th) .steps h3,
:lang(zh-Hans) .steps h3 {
    font-size: 1.3rem;
    line-height: 1.5;
}

.steps p {
    color: var(--on-navy-muted);
}

@media (min-width: 900px) {
    .steps {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        border-bottom: 1px solid var(--on-navy-rule);
    }

    .steps li {
        padding: 36px 32px 40px;
        border-bottom: 0;
        border-left: 1px solid var(--on-navy-rule);
    }

    .steps li:first-child {
        padding-left: 0;
        border-left: 0;
    }
}

/* ---------- Insights ---------- */

.insights-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 24px 48px;
    margin-bottom: clamp(36px, 4vw, 56px);
}

.insights-feature {
    display: grid;
    gap: 40px 56px;
}

@media (min-width: 1000px) {
    .insights-feature {
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    }
}

.article-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.article-card__media {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--navy);
}

.article-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.article-card:hover .article-card__media img {
    transform: scale(1.035);
}

.article-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    font-size: 0.8125rem;
    color: var(--muted);
}

.article-card__category {
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brass-ink);
}

:lang(th) .article-card__category,
:lang(zh-Hans) .article-card__category {
    letter-spacing: 0.04em;
    font-size: 0.875rem;
}

.article-card__meta .lozenge {
    width: 4px;
    height: 4px;
    background: var(--rule);
}

.article-card__title {
    font-family: var(--serif);
    font-size: 1.55rem;
    font-weight: 600;
    line-height: 1.22;
    color: var(--ink);
    text-wrap: balance;
}

.article-card__title:lang(th),
.article-card__title:lang(zh-Hans) {
    font-size: 1.25rem;
    line-height: 1.55;
}

.article-card__title a {
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0 1px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size 0.4s var(--ease);
}

.article-card:hover .article-card__title a {
    background-size: 100% 1px;
}

.article-card__title a::after {
    content: '';
    position: absolute;
    inset: 0;
}

.article-card__excerpt {
    color: var(--muted);
    font-size: 0.975rem;
}

.article-card--feature .article-card__title {
    font-size: clamp(1.8rem, 2.6vw, 2.35rem);
    line-height: 1.12;
}

.article-card--feature .article-card__title:lang(th),
.article-card--feature .article-card__title:lang(zh-Hans) {
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    line-height: 1.45;
}

.article-list {
    display: grid;
    border-top: 1px solid var(--rule);
}

.article-list .article-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 6px 20px;
    padding-block: 22px;
    border-bottom: 1px solid var(--rule);
}

.article-list .article-card__media {
    grid-row: span 2;
    aspect-ratio: 1;
}

.article-list .article-card__title {
    font-size: 1.3rem;
}

.article-list .article-card__title:lang(th),
.article-list .article-card__title:lang(zh-Hans) {
    font-size: 1.08rem;
}

.article-grid {
    display: grid;
    gap: 56px 40px;
}

@media (min-width: 720px) {
    .article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .article-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 72px 24px;
    border: 1px solid var(--rule);
    text-align: center;
}

.empty-state img {
    width: 56px;
    opacity: 0.8;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 72px;
    padding-top: 32px;
    border-top: 1px solid var(--rule);
    font-size: 0.9375rem;
}

.pagination a,
.pagination span {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    padding-inline: 12px;
    border: 1px solid transparent;
}

.pagination a {
    color: var(--navy);
}

.pagination a:hover {
    border-color: var(--rule);
}

.pagination [aria-current] {
    border-color: var(--navy);
    color: var(--navy);
    font-weight: 600;
}

.pagination .is-disabled {
    color: var(--rule);
}

.pagination__step {
    gap: 8px;
    display: inline-flex !important;
    letter-spacing: 0.08em;
}

/* ---------- Consultation and contact ---------- */

.consult {
    display: grid;
    gap: 56px 80px;
}

@media (min-width: 1000px) {
    .consult {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    }
}

.consult__intro {
    display: grid;
    align-content: start;
    gap: 22px;
}

.contact-list {
    display: grid;
    margin: 18px 0 0;
    border-top: 1px solid var(--rule);
}

.contact-list div {
    display: grid;
    gap: 4px;
    padding-block: 18px;
    border-bottom: 1px solid var(--rule);
}

@media (min-width: 560px) {
    .contact-list div {
        grid-template-columns: 150px minmax(0, 1fr);
        gap: 20px;
    }
}

.contact-list dt {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brass-ink);
    padding-top: 4px;
}

:lang(th) .contact-list dt,
:lang(zh-Hans) .contact-list dt {
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    padding-top: 0;
}

.contact-list dd {
    margin: 0;
    color: var(--ink);
}

.contact-list dd a {
    border-bottom: 1px solid var(--rule);
    transition: border-color 0.2s var(--ease);
}

.contact-list dd a:hover {
    border-color: var(--navy);
}

.contact-list .hours li {
    color: var(--text);
}

.consult__card {
    position: relative;
    padding: clamp(28px, 4vw, 48px);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-top: 3px solid var(--navy);
}

.consult__card h3 {
    margin-bottom: 8px;
}

.form {
    display: grid;
    gap: 22px;
    margin-top: 28px;
}

@media (min-width: 640px) {
    .form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form .field--wide,
    .form .form__foot {
        grid-column: 1 / -1;
    }
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
}

.field label .req {
    color: var(--brass);
    margin-left: 2px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--rule);
    border-radius: 0;
    background: #fff;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
    appearance: none;
}

.field textarea {
    min-height: 150px;
    resize: vertical;
}

.field select {
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23102a43' stroke-width='1.5'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #97a0a9;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: #c5bca9;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(16, 42, 67, 0.1);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
    border-color: var(--danger);
}

.field__error {
    font-size: 0.875rem;
    color: var(--danger);
}

.form__foot {
    display: grid;
    gap: 16px;
    padding-top: 6px;
}

.form__note {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--muted);
}

.form__note a {
    color: var(--navy);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.notice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 14px;
    margin-top: 24px;
    padding: 18px 20px;
    border: 1px solid var(--rule);
    border-left: 3px solid var(--navy);
    background: var(--ivory);
}

.notice .lozenge {
    margin-top: 9px;
}

.notice strong {
    color: var(--ink);
    font-weight: 600;
}

.notice p {
    grid-column: 2;
    color: var(--text);
}

.notice--error {
    border-left-color: var(--danger);
}

.notice--error .lozenge {
    background: var(--danger);
}

/* ---------- Inner page headers ---------- */

.page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(180deg, var(--navy) 0%, #0e263d 100%);
    color: var(--on-navy);
}

.page-hero__art {
    position: absolute;
    z-index: -1;
    top: 50%;
    right: -260px;
    width: 720px;
    aspect-ratio: 1;
    transform: translateY(-50%);
    pointer-events: none;
}

.page-hero__inner {
    display: grid;
    gap: 22px;
    padding-block: clamp(64px, 8vw, 112px) clamp(48px, 6vw, 80px);
}

.page-hero .t-eyebrow {
    color: var(--brass-light);
}

.page-hero .t-display,
.page-hero .t-h1 {
    color: #fff;
    max-width: 20ch;
}

.page-hero .t-lead {
    max-width: 64ch;
    color: var(--on-navy);
}

.page-hero--ivory {
    background: var(--ivory);
    color: var(--text);
}

.page-hero--ivory .t-eyebrow {
    color: var(--brass-ink);
}

.page-hero--ivory .t-h1 {
    color: var(--ink);
}

.page-hero--ivory .t-lead {
    color: var(--text);
}

.page-index {
    border-top: 1px solid var(--on-navy-rule);
}

.page-index ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-index a {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 20px 16px 22px 0;
    color: #fff;
    font-family: var(--serif);
    font-size: 1.15rem;
    line-height: 1.3;
    transition: color 0.2s var(--ease);
}

:lang(th) .page-index a,
:lang(zh-Hans) .page-index a {
    font-size: 1rem;
    line-height: 1.5;
}

.page-index a:hover {
    color: var(--brass-light);
}

.page-index .numeral {
    color: var(--brass-light);
    font-size: 0.95rem;
}

@media (min-width: 900px) {
    .page-index ol {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ---------- Practices page ---------- */

.practice {
    padding-block: var(--section);
    border-bottom: 1px solid var(--rule);
}

.practice:nth-of-type(even) {
    background: var(--ivory);
}

.practice__grid {
    display: grid;
    gap: 48px 96px;
}

@media (min-width: 1000px) {
    .practice__grid {
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    }

    .practice__head {
        position: sticky;
        top: calc(var(--header) + 40px);
        align-self: start;
    }
}

.practice__head {
    display: grid;
    gap: 20px;
    align-content: start;
}

.practice__numeral {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(3.5rem, 6vw, 5.5rem);
    font-weight: 500;
    line-height: 0.9;
    color: var(--brass);
}

.practice__english {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.35rem;
    font-style: italic;
    color: var(--brass-ink);
}

.practice__head .btn {
    justify-self: start;
    margin-top: 8px;
}

.practice__services {
    border-top: 1px solid var(--navy);
}

.service {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px 20px;
    padding-block: 32px 36px;
    border-bottom: 1px solid var(--rule);
}

.service__no {
    font-variant-numeric: lining-nums;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--brass-ink);
    padding-top: 6px;
    letter-spacing: 0.06em;
}

.service__body {
    display: grid;
    gap: 10px;
}

.service__english {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--brass-ink);
}

.service__detail {
    color: var(--text);
}

/* ---------- Article ---------- */

.article-header {
    display: grid;
    gap: 22px;
    padding-block: clamp(48px, 6vw, 88px) clamp(32px, 4vw, 48px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    color: var(--muted);
}

.breadcrumb a {
    color: var(--navy);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

:lang(th) .breadcrumb a,
:lang(zh-Hans) .breadcrumb a {
    letter-spacing: 0.03em;
    font-size: 0.9rem;
}

.breadcrumb a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* The header lines up with the text column below it (the width left by the
   320px aside and its 80px gap). */
.article-header > * {
    max-width: 840px;
}

.article-header .t-h1 {
    max-width: min(24ch, 840px);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding-top: 18px;
    border-top: 1px solid var(--rule);
    font-size: 0.875rem;
    color: var(--muted);
}

.article-meta__langs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.article-meta__langs a {
    padding: 2px 10px;
    border: 1px solid var(--rule);
    color: var(--navy);
    font-weight: 500;
}

.article-meta__langs a:hover {
    border-color: var(--navy);
}

.article-cover {
    margin: 0 0 clamp(40px, 5vw, 64px);
}

.article-cover img {
    width: 100%;
    max-height: 620px;
    object-fit: cover;
}

.article-layout {
    display: grid;
    gap: 64px 80px;
    padding-bottom: var(--section);
}

@media (min-width: 1040px) {
    .article-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

.article-aside {
    display: grid;
    align-content: start;
    gap: 40px;
}

@media (min-width: 1040px) {
    .article-aside {
        position: sticky;
        top: calc(var(--header) + 32px);
    }
}

.aside-box {
    display: grid;
    gap: 14px;
    padding-top: 20px;
    border-top: 1px solid var(--navy);
}

.aside-box h2 {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--ink);
}

:lang(th) .aside-box h2,
:lang(zh-Hans) .aside-box h2 {
    font-size: 1.15rem;
}

.aside-box dl {
    display: grid;
    margin: 0;
}

.aside-box dl div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-block: 10px;
    border-bottom: 1px solid var(--rule);
    font-size: 0.9375rem;
}

.aside-box dt {
    color: var(--muted);
}

.aside-box dd {
    margin: 0;
    color: var(--ink);
    text-align: right;
}

.aside-box--navy {
    padding: 28px;
    border-top: 0;
    background: var(--navy);
    color: var(--on-navy);
}

.aside-box--navy h2 {
    color: #fff;
}

.aside-box--navy .btn {
    margin-top: 6px;
}

.aside-box .article-list .article-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 4px 16px;
    padding-block: 16px;
}

.aside-box .article-list .article-card__title {
    font-size: 1.1rem;
}

.aside-box .article-list .article-card__title:lang(th),
.aside-box .article-list .article-card__title:lang(zh-Hans) {
    font-size: 0.975rem;
}

.untranslated {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 14px 18px;
    border: 1px solid var(--rule);
    background: var(--ivory);
    font-size: 0.9375rem;
}

/* Rich text from the article editor and the legal pages */
.prose {
    color: var(--text);
    font-size: 1.0625rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

:lang(th) .prose,
.prose:lang(th) {
    line-height: 1.9;
}

.prose > * + * {
    margin-top: 1.25em;
}

.prose h2,
.prose h3,
.prose h4 {
    font-family: var(--serif);
    color: var(--ink);
    line-height: 1.25;
}

.prose h2 {
    margin-top: 2.2em;
    font-size: 2rem;
    font-weight: 500;
}

.prose h3 {
    margin-top: 1.8em;
    font-size: 1.5rem;
    font-weight: 600;
}

.prose h4 {
    margin-top: 1.6em;
    font-size: 1.25rem;
    font-weight: 600;
}

.prose:lang(th) h2,
:lang(th) .prose h2 {
    font-size: 1.6rem;
    line-height: 1.5;
}

.prose:lang(th) h3,
:lang(th) .prose h3 {
    font-size: 1.28rem;
    line-height: 1.55;
}

.prose:lang(zh-Hans) h2,
:lang(zh-Hans) .prose h2 {
    font-size: 1.6rem;
    line-height: 1.45;
}

.prose:lang(zh-Hans) h3,
:lang(zh-Hans) .prose h3 {
    font-size: 1.3rem;
    line-height: 1.5;
}

.prose > h2:first-child,
.prose > h3:first-child {
    margin-top: 0;
}

.prose a {
    color: var(--navy);
    text-decoration: underline;
    text-decoration-color: var(--brass);
    text-underline-offset: 3px;
}

.prose a:hover {
    text-decoration-color: var(--navy);
}

.prose strong {
    color: var(--ink);
    font-weight: 600;
}

.prose ul,
.prose ol {
    padding-left: 1.4em;
}

.prose ul {
    list-style: none;
}

.prose ul > li {
    position: relative;
}

.prose ul > li::before {
    content: '';
    position: absolute;
    left: -1.2em;
    top: 0.78em;
    width: 5px;
    height: 5px;
    background: var(--brass);
    transform: rotate(45deg);
}

.prose ol {
    list-style: decimal;
}

.prose ol > li::marker {
    color: var(--brass-ink);
    font-weight: 600;
}

.prose li + li {
    margin-top: 0.5em;
}

.prose blockquote {
    margin: 2em 0;
    padding: 4px 0 4px 28px;
    border-left: 2px solid var(--brass);
    font-family: var(--serif);
    font-size: 1.45rem;
    line-height: 1.5;
    color: var(--ink);
}

.prose img {
    width: auto;
    max-width: 100%;
    margin-block: 2em;
}

.prose figure {
    margin: 2em 0;
}

.prose figcaption {
    margin-top: 10px;
    font-size: 0.875rem;
    color: var(--muted);
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    display: block;
    overflow-x: auto;
}

.prose th,
.prose td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--rule);
    text-align: left;
    vertical-align: top;
}

.prose th {
    color: var(--ink);
    font-weight: 600;
    border-bottom-color: var(--navy);
}

.prose hr {
    height: 1px;
    border: 0;
    background: var(--rule);
    margin-block: 2.5em;
}

/* ---------- Legal pages ---------- */

.legal {
    padding-block: clamp(48px, 6vw, 80px) var(--section);
}

.legal .notice {
    margin: 0 0 40px;
}

.legal__links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--rule);
}

/* ---------- Footer ---------- */

.site-footer {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--navy-deep);
    color: var(--on-navy-muted);
    font-size: 0.9375rem;
}

.site-footer__art {
    position: absolute;
    z-index: -1;
    right: -180px;
    top: -260px;
    width: 640px;
    aspect-ratio: 1;
    pointer-events: none;
}

.footer-top {
    display: grid;
    gap: 48px;
    padding-block: clamp(64px, 7vw, 96px) 56px;
}

@media (min-width: 760px) {
    .footer-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .footer-top {
        grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
        gap: 56px;
    }
}

.footer-brand {
    display: grid;
    align-content: start;
    gap: 20px;
}

.footer-brand img {
    width: auto;
    height: 32px;
}

.footer-brand p {
    max-width: 30ch;
    font-family: var(--serif);
    font-size: 1.3rem;
    line-height: 1.4;
    color: var(--on-navy);
}

:lang(th) .footer-brand p,
:lang(zh-Hans) .footer-brand p {
    font-size: 1.05rem;
    line-height: 1.7;
}

.footer-col h2 {
    margin-bottom: 18px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brass-light);
}

:lang(th) .footer-col h2,
:lang(zh-Hans) .footer-col h2 {
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.footer-col ul {
    display: grid;
    gap: 10px;
}

.footer-col a {
    transition: color 0.2s var(--ease);
}

.footer-col a:hover {
    color: #fff;
}

.footer-col address {
    font-style: normal;
    display: grid;
    gap: 10px;
}

.footer-bottom {
    display: grid;
    gap: 14px;
    padding-block: 28px 36px;
    border-top: 1px solid var(--on-navy-rule);
    font-size: 0.8125rem;
}

@media (min-width: 900px) {
    .footer-bottom {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }
}

.footer-bottom nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.footer-bottom nav a:hover {
    color: #fff;
}

.footer-disclaimer {
    grid-column: 1 / -1;
    max-width: 90ch;
    color: rgba(255, 255, 255, 0.46);
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
    .js [data-reveal] {
        opacity: 0;
        transform: translateY(18px);
        transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    }

    .js [data-reveal].is-visible {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

@media print {
    .utility,
    .site-header,
    .site-footer,
    .article-aside,
    .hero__art,
    .page-hero__art {
        display: none !important;
    }

    .page-hero,
    .hero {
        background: none;
        color: #000;
    }

    .page-hero .t-h1,
    .hero .t-display {
        color: #000;
    }
}
