/*
Theme Name: Hà Tiên Network Theme
Theme URI: https://hatiengroup.com
Author: Hà Tiên Corp
Description: Block theme Hà Tiên 2026 theo Homepage Concept: thiết kế kỹ thuật, nội dung có bằng chứng và hợp đồng bố cục dành cho AI.
Version: 0.6.0
Text Domain: hatien
Requires at least: 6.5
Requires PHP: 8.1
*/

:root {
    --ht-gold: #d6aa6d;
    --ht-gold-hover: #e4bd87;
    --ht-background: #0b161c;
    --ht-background-secondary: #10232c;
    --ht-background-soft: #0f2028;
    --ht-card: #132832;
    --ht-card-hover: #17323e;
    --ht-text: #ffffff;
    --ht-text-secondary: #c2c9cc;
    --ht-text-muted: #8f9ba1;
    --ht-border: rgba(214, 170, 109, 0.28);
    --ht-border-light: rgba(255, 255, 255, 0.10);
    --ht-success: #69b98b;
    --ht-warning: #d6aa6d;
    --ht-error: #d66d6d;
    --ht-radius-sm: 6px;
    --ht-radius-md: 12px;
    --ht-radius-lg: 20px;
    --ht-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    --ht-shadow-soft: 0 10px 34px rgba(0, 0, 0, 0.16);
    --ht-content: 1280px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--ht-background);
    color: var(--ht-text);
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    color: var(--ht-text);
    font-weight: 300;
    letter-spacing: -0.025em;
}

p {
    margin-top: 0;
}

a {
    color: var(--ht-gold);
    text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
    color: var(--ht-gold-hover);
}

img,
iframe,
video {
    max-width: 100%;
}

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

::selection {
    background: var(--ht-gold);
    color: var(--ht-background);
}

section[id] {
    scroll-margin-top: 98px;
}

.ht-main {
    overflow: clip;
}

.ht-container {
    width: min(100% - 40px, var(--ht-content));
    margin-inline: auto;
}

/* Header */
.ht-site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--ht-border-light);
    background: rgba(11, 22, 28, 0.94);
    backdrop-filter: blur(16px);
}

.admin-bar .ht-site-header {
    top: 32px;
}

.ht-header-inner {
    min-height: 78px;
    gap: 28px;
}

.ht-brand {
    min-width: 210px;
    gap: 12px;
}

.ht-brand-logo img {
    max-height: 48px;
    width: auto;
}

.ht-brand-copy {
    gap: 0;
}

.ht-brand-title,
.ht-site-header .wp-block-site-title {
    margin: 0;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: 0.075em;
    line-height: 1.1;
    text-transform: uppercase;
}

.ht-brand-title a,
.ht-site-header .wp-block-site-title a {
    color: var(--ht-gold);
    text-decoration: none;
}

.ht-brand-tagline,
.ht-site-header .wp-block-site-tagline {
    margin: 4px 0 0;
    color: var(--ht-text-muted);
    font-size: 11px;
    line-height: 1.2;
}

.ht-header-actions {
    gap: 18px;
}

.ht-primary-nav .wp-block-navigation__container {
    gap: clamp(14px, 1.6vw, 25px);
}

.ht-site-header .wp-block-navigation-item__content {
    color: var(--ht-text);
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.ht-site-header .wp-block-navigation-item__content:hover,
.ht-site-header .current-menu-item > .wp-block-navigation-item__content {
    color: var(--ht-gold);
}

.ht-header-cta {
    flex-shrink: 0;
}

.ht-button--small .wp-block-button__link {
    min-height: 42px;
    padding: 9px 16px;
    font-size: 13px;
}

.ht-site-header .wp-block-navigation__responsive-container-open,
.ht-site-header .wp-block-navigation__responsive-container-close {
    color: var(--ht-gold);
}

/* Shared sections */
.ht-section {
    padding-block: clamp(68px, 8vw, 116px);
}

.ht-section--compact {
    padding-block: clamp(46px, 6vw, 78px);
}

.ht-section--secondary {
    background: var(--ht-background-secondary);
}

.ht-section--soft {
    background: var(--ht-background-soft);
}

.ht-section--bordered {
    border-top: 1px solid var(--ht-border-light);
    border-bottom: 1px solid var(--ht-border-light);
}

.ht-eyebrow {
    margin-bottom: 16px;
    color: var(--ht-gold);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ht-section-heading {
    max-width: 840px;
    margin-bottom: 44px;
}

.ht-section-heading--center {
    margin-inline: auto;
    text-align: center;
}

.ht-section-heading h2 {
    margin-bottom: 16px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.1;
}

.ht-section-heading p {
    color: var(--ht-text-secondary);
    font-size: 18px;
    line-height: 1.7;
}

.ht-muted {
    color: var(--ht-text-secondary);
}

.ht-label {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid var(--ht-border-light);
    border-radius: 999px;
    color: var(--ht-text-secondary);
    font-size: 12px;
    line-height: 1;
}

/* Hero */
.ht-hero {
    position: relative;
    min-height: 760px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--ht-border-light);
    background:
        radial-gradient(circle at 78% 24%, rgba(214, 170, 109, 0.18), transparent 28%),
        radial-gradient(circle at 15% 80%, rgba(69, 121, 145, 0.14), transparent 30%),
        linear-gradient(135deg, #0b161c 0%, #10232c 100%);
}

.ht-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 90%);
}

.ht-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ht-gold), transparent);
    opacity: 0.45;
}

.ht-hero-grid {
    position: relative;
    z-index: 1;
    align-items: center;
    gap: clamp(44px, 7vw, 96px);
}

.ht-hero-copy {
    max-width: 810px;
}

.ht-hero h1 {
    max-width: 900px;
    margin-bottom: 24px;
    font-size: clamp(44px, 6.1vw, 82px);
    line-height: 1.02;
}

.ht-hero-lead {
    max-width: 760px;
    margin-bottom: 30px;
    color: var(--ht-text-secondary);
    font-size: clamp(18px, 2vw, 23px);
    line-height: 1.65;
}

.ht-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.ht-hero-panel {
    padding: clamp(26px, 4vw, 40px);
    border: 1px solid var(--ht-border);
    border-radius: var(--ht-radius-lg);
    background: linear-gradient(180deg, rgba(19, 40, 50, 0.94), rgba(10, 25, 32, 0.94));
    box-shadow: var(--ht-shadow);
}

.ht-hero-panel h2 {
    margin-bottom: 22px;
    font-size: 28px;
    line-height: 1.2;
}

.ht-hero-route {
    padding: 17px 0;
    border-top: 1px solid var(--ht-border-light);
}

.ht-hero-route:last-child {
    border-bottom: 1px solid var(--ht-border-light);
}

.ht-hero-route strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ht-gold);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .08em;
}

.ht-hero-route span {
    display: block;
    color: var(--ht-text-secondary);
    font-size: 14px;
}

/* Buttons */
.ht-button .wp-block-button__link,
.wp-element-button {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
    border: 1px solid var(--ht-gold);
    border-radius: var(--ht-radius-sm);
    background: var(--ht-gold);
    color: var(--ht-background);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.ht-button .wp-block-button__link:hover,
.wp-element-button:hover {
    transform: translateY(-1px);
    border-color: var(--ht-gold-hover);
    background: var(--ht-gold-hover);
    color: var(--ht-background);
}

.ht-button--outline .wp-block-button__link {
    background: transparent;
    color: var(--ht-gold);
}

.ht-button--outline .wp-block-button__link:hover {
    background: var(--ht-gold);
    color: var(--ht-background);
}

.ht-button--ghost .wp-block-button__link {
    border-color: var(--ht-border-light);
    background: rgba(255,255,255,.03);
    color: var(--ht-text);
}

/* Routing cards */
.ht-card-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.ht-card-grid > .wp-block-column {
    min-width: 0;
    margin: 0 !important;
}

.ht-card {
    height: 100%;
    padding: 26px;
    border: 1px solid var(--ht-border-light);
    border-radius: var(--ht-radius-md);
    background: var(--ht-card);
    box-shadow: var(--ht-shadow-soft);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ht-card:hover {
    transform: translateY(-3px);
    border-color: var(--ht-border);
    background: var(--ht-card-hover);
}

.ht-card h3 {
    margin-bottom: 12px;
    font-size: 23px;
    line-height: 1.25;
}

.ht-card p {
    margin-bottom: 18px;
    color: var(--ht-text-secondary);
    font-size: 15px;
}

.ht-card a {
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

/* Content split */
.ht-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
    gap: clamp(34px, 6vw, 84px);
    align-items: start;
}

.ht-split--reverse {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1fr);
}

.ht-split--reverse > :first-child {
    order: 2;
}

.ht-split h2 {
    margin-bottom: 20px;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.12;
}

.ht-split p {
    color: var(--ht-text-secondary);
}

/* Metrics */
.ht-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid var(--ht-border-light);
    border-radius: var(--ht-radius-md);
    overflow: hidden;
    background: var(--ht-border-light);
}

.ht-metric {
    min-height: 160px;
    padding: 25px;
    background: var(--ht-background-secondary);
}

.ht-metric strong {
    display: block;
    margin-bottom: 12px;
    color: var(--ht-gold);
    font-size: clamp(32px, 4vw, 54px);
    font-weight: 300;
    line-height: 1;
}

.ht-metric span {
    color: var(--ht-text-secondary);
    font-size: 14px;
}

/* CTA band */
.ht-cta-band {
    padding: clamp(32px, 6vw, 64px);
    border: 1px solid var(--ht-border);
    border-radius: var(--ht-radius-lg);
    background:
        linear-gradient(135deg, rgba(214,170,109,.13), transparent 45%),
        var(--ht-background-secondary);
}

.ht-cta-band h2 {
    margin-bottom: 16px;
    font-size: clamp(32px, 4vw, 50px);
    line-height: 1.1;
}

.ht-cta-band p {
    max-width: 760px;
    margin-bottom: 26px;
    color: var(--ht-text-secondary);
}

/* Footer */
.ht-site-footer {
    border-top: 1px solid var(--ht-border-light);
    background: #081116;
}

.ht-footer-main {
    padding-block: 72px 52px;
}

.ht-footer-grid {
    display: grid;
    grid-template-columns: 1.3fr .8fr .8fr 1fr;
    gap: 44px;
}

.ht-footer-grid h3 {
    margin-bottom: 18px;
    color: var(--ht-gold);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ht-footer-grid p,
.ht-footer-grid li {
    color: var(--ht-text-secondary);
    font-size: 14px;
}

.ht-footer-grid ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ht-footer-grid li + li {
    margin-top: 9px;
}

.ht-footer-grid a {
    color: var(--ht-text-secondary);
    text-decoration: none;
}

.ht-footer-grid a:hover {
    color: var(--ht-gold);
}

.ht-footer-bottom {
    padding-block: 18px;
    border-top: 1px solid var(--ht-border-light);
}

.ht-footer-bottom p {
    margin: 0;
    color: var(--ht-text-muted);
    font-size: 12px;
}

/* WordPress content */
.wp-site-blocks > main {
    min-height: 55vh;
}

.wp-block-post-title {
    max-width: 960px;
}

.wp-block-post-content > * {
    margin-block-start: 0;
    margin-block-end: 1.35em;
}

.wp-block-post-content > .alignwide,
.wp-block-post-content > .alignfull {
    margin-block-end: 0;
}

.wp-block-query .wp-block-post-template {
    gap: 24px;
}

.wp-block-post-template .wp-block-post {
    padding: 24px;
    border: 1px solid var(--ht-border-light);
    border-radius: var(--ht-radius-md);
    background: var(--ht-card);
}

/* Responsive */
@media (max-width: 1100px) {
    .ht-header-actions {
        gap: 12px;
    }

    .ht-primary-nav .wp-block-navigation__container {
        gap: 12px;
    }

    .ht-site-header .wp-block-navigation-item__content {
        font-size: 12px;
    }

    .ht-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .admin-bar .ht-site-header {
        top: 46px;
    }

    .ht-header-inner {
        min-height: 68px;
    }

    .ht-header-cta {
        display: none;
    }

    .ht-brand {
        min-width: 0;
    }

    .ht-brand-logo img {
        max-height: 40px;
    }

    .ht-hero {
        min-height: auto;
        padding-block: 120px 90px;
    }

    .ht-hero-grid,
    .ht-split,
    .ht-split--reverse {
        grid-template-columns: 1fr;
    }

    .ht-split--reverse > :first-child {
        order: 0;
    }

    .ht-metrics,
    .ht-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    body {
        font-size: 16px;
    }

    .ht-container {
        width: min(100% - 28px, var(--ht-content));
    }

    .ht-section {
        padding-block: 62px;
    }

    .ht-section-heading {
        margin-bottom: 30px;
    }

    .ht-section-heading h2 {
        font-size: 34px;
    }

    .ht-hero {
        padding-block: 104px 70px;
    }

    .ht-hero h1 {
        font-size: 45px;
    }

    .ht-card-grid,
    .ht-metrics,
    .ht-footer-grid {
        grid-template-columns: 1fr;
    }

    .ht-card,
    .ht-cta-band {
        padding: 22px;
    }

    .ht-metric {
        min-height: 130px;
    }

    .wp-block-buttons > .wp-block-button {
        width: 100%;
    }

    .wp-block-buttons > .wp-block-button .wp-block-button__link {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
