/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Font faces */

/* Barlow Condensed — VN headings, latin subset */
@font-face {
    font-family: 'Barlow Condensed';
    src: url('../fonts/BarlowCondensed-Regular-latin.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Barlow Condensed — VN headings, vietnamese subset */
@font-face {
    font-family: 'Barlow Condensed';
    src: url('../fonts/BarlowCondensed-Regular-vietnamese.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* Barlow Condensed Bold — latin */
@font-face {
    font-family: 'Barlow Condensed';
    src: url('../fonts/BarlowCondensed-Bold-latin.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Barlow Condensed Bold — vietnamese */
@font-face {
    font-family: 'Barlow Condensed';
    src: url('../fonts/BarlowCondensed-Bold-vietnamese.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* Roboto — body text both EN/VN, latin subset */
@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Regular-latin.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Roboto — body text both EN/VN, vietnamese subset */
@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Regular-vietnamese.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* Roboto Thin — latin (for decorative project numbers) */
@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Thin-latin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Roboto Bold — latin */
@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Bold-latin.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Roboto Bold — vietnamese */
@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Bold-vietnamese.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* CSS custom properties */
:root {
    /* AAI palette */
    --color-primary: #780606;
    --color-primary-text: #C20000;
    --color-text: #ffffff;
    --color-bg: #000000;
    --color-border: #780606;

    /* AAI fonts */
    --font-heading: 'Libre Bodoni', serif;
    --font-body: 'Roboto', sans-serif;
    --color-text-body: var(--color-text);

    /* Typography scale */
    --fs-11: 11px;
    --fs-12: 12px;
    --fs-13: 13px;
    --fs-14: 14px;
    --fs-15: 15px;
    --fs-16: 16px;
    --fs-18: 18px;
    --fs-20: 20px;
    --fs-22: 22px;
    --fs-23: 23px;
    --fs-24: 24px;
    --fs-25: 25px;
    --fs-27: 27px;
    --fs-28: 28px;
    --fs-30: 30px;
    --fs-34: 34px;
    --fs-48: 48px;
    --fs-60: 60px;
    --fs-78: 78px;
    --fs-88: 88px;
    --fs-fluid-13-17: clamp(13px, 1.15vw, 17px);
    --fs-fluid-20-28: clamp(20px, 3vw, 28px);
    --fs-fluid-22-28: clamp(22px, 3vw, 28px);
    --fs-fluid-22-34: clamp(22px, 2.15vw, 34px);
    --fs-fluid-24-31: clamp(24px, 2vw, 31px);
    --fs-fluid-24-42: clamp(24px, 3vw, 42px);
    --fs-fluid-28-42: clamp(28px, 4vw, 42px);
    --fs-fluid-28-58: clamp(28px, 4.2vw, 58px);
    --fs-fluid-30-42: clamp(30px, 4vw, 42px);
    --fs-fluid-30-46: clamp(30px, 4vw, 46px);
    --fs-fluid-30-46-tight: clamp(30px, 3.4vw, 46px);
    --fs-fluid-31-42: clamp(31px, 4vw, 42px);
    --fs-fluid-32-42: clamp(32px, 4vw, 42px);
    --fs-fluid-32-58: clamp(32px, 4.4vw, 58px);
    --fs-fluid-34-58: clamp(34px, 4vw, 58px);
    --fs-fluid-36-56: clamp(36px, 5vw, 56px);
    --fs-fluid-36-78: clamp(36px, 6.3vw, 78px);
    --fs-fluid-42-64: clamp(42px, 13.2vw, 64px);
    --fs-fluid-45-65: clamp(45px, 7vw, 65px);
    --fs-fluid-46-78: clamp(46px, 6vw, 78px);
    --fs-fluid-46-86: clamp(46px, 7.2vw, 86px);
    --fs-fluid-48-72: clamp(48px, 6vw, 72px);
    --fs-fluid-48-90: clamp(48px, 6vw, 90px);
    --fs-fluid-55-90: clamp(55px, 6.25vw, 90px);
    --fs-fluid-58-112: clamp(58px, 7vw, 112px);
    --fs-fluid-96-140: clamp(96px, 13vw, 140px);

    /* Legacy aliases */
    --font-heading-en: 'Libre Bodoni', serif;
    --font-heading-vn: 'Libre Bodoni', serif;
    --font-body-aai: 'Roboto', sans-serif;
}

/* Base */
body,
button,
input,
textarea,
select {
    font-family: var(--font-body);
}

body {
    color: var(--color-text);
    background-color: var(--color-bg);
    font-size: var(--fs-15);
    line-height: 1.667;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

p,
li,
dt,
dd,
blockquote,
cite,
figcaption,
address {
    font-family: var(--font-body);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary-text);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.site-main {
    min-height: 60vh;
}

/* Shared utilities */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 40px;
    }
}

.section {
    padding: 80px 0;
}

@media (min-width: 768px) {
    .section {
        padding: 100px 0;
    }
}

@media (min-width: 1024px) {
    .section {
        padding: 130px 0 100px;
    }
}

/* Scroll fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Typography */
.section-label {
    font-family: var(--font-body);
    font-size: var(--fs-13);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-primary-text);
    margin-bottom: 20px;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: var(--fs-fluid-32-42);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 0;
    color: var(--color-primary-text);
}

/* Button */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--fs-18);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 8px 60px 9px;
    border: 1px solid var(--color-primary);
    color: var(--color-primary-text);
    background: transparent;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn:hover {
    background-color: var(--color-primary);
    color: var(--color-text);
}

/* Accessibility */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.aai-form-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.aai-form-message {
    margin-top: 18px;
    font-size: var(--fs-15);
    line-height: 1.55;
}

.aai-form-message--success {
    color: #ffffff;
}

.aai-form-message--error {
    color: #ffb8b8;
}

.aai-captcha {
    margin: 0 0 22px;
}

.aai-captcha__label {
    display: block;
    margin-bottom: 9px;
    font-size: var(--fs-12);
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.58);
}

.aai-captcha__row {
    display: grid;
    grid-template-columns: auto minmax(120px, 1fr);
    gap: 16px;
    align-items: center;
}

.aai-captcha__question {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-left: 2px solid var(--color-primary);
    font-family: var(--font-body);
    font-size: var(--fs-16);
    color: var(--color-primary-text);
    background: rgba(125, 0, 0, 0.16);
}

.aai-captcha input {
    width: 100%;
    min-height: 42px;
    padding: 10px 0;
    font-family: var(--font-body);
    font-size: var(--fs-16);
    color: var(--color-text);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    outline: 0;
}

.aai-captcha input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.aai-captcha input:focus {
    border-bottom-color: var(--color-primary);
}

@media (max-width: 480px) {
    .aai-captcha__row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Floating chat */
.aai-floating-chat {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 950;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.82);
    border: 1px solid rgba(194, 0, 0, 0.72);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.aai-floating-chat::before {
    content: "";
    position: absolute;
    inset: -7px;
    border: 1px solid rgba(194, 0, 0, 0.42);
    border-radius: inherit;
}

.aai-floating-chat:hover,
.aai-floating-chat:focus-visible {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.72);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
    transform: translateY(-2px);
}

.aai-floating-chat:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

.aai-floating-chat__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

@media (max-width: 480px) {
    .aai-floating-chat {
        right: 16px;
        bottom: 16px;
        width: 54px;
        height: 54px;
    }

    .aai-floating-chat__icon {
        width: 38px;
        height: 38px;
    }
}

/* Site title in header */
.site-title {
    font-family: var(--font-heading);
    font-size: var(--fs-24);
    font-weight: 400;
    margin: 0;
}
