/* =========================================================
   SMARTRISE — Brand Tokens (Workshop Paper)
   Nguồn chân lý duy nhất cho màu, font, spacing, radius, shadow.
   Mọi style phải reference các biến dưới đây — KHÔNG hard-code.
   ========================================================= */

/* ===== 1. Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* ====== 2. COLORS — Workshop Paper (6 màu chủ đạo) ====== */
  --brand-ink: #0E0E0C;              /* Chữ chính, nền dark section */
  --brand-ink-soft: #1A1A17;         /* Chữ phụ */
  --brand-paper: #F4F1EA;            /* Nền mặc định — kem sáng */
  --brand-paper-bright: #FAF7F0;     /* Nền card */
  --brand-cream: #EDE7D8;            /* Nền phụ, hover */
  --brand-red: #D83A2E;              /* Accent chính — CTA, nhấn mạnh */
  --brand-red-dark: #A82920;         /* Hover CTA */
  --brand-ochre: #C9953A;            /* Accent phụ — tag, checkmark */
  --brand-forest: #2A4A35;           /* Trạng thái thành công */
  --brand-stone: #6B6B63;            /* Text xám, label, meta */
  --brand-hairline: rgba(14, 14, 12, 0.12);
  --brand-hairline-strong: rgba(14, 14, 12, 0.3);

  /* ====== 3. TYPOGRAPHY — 3 font, 3 nhiệm vụ ====== */
  --brand-font-display: 'Fraunces', Georgia, serif;        /* Heading/hero */
  --brand-font-body: 'Inter', system-ui, -apple-system, sans-serif;  /* Body/UI */
  --brand-font-mono: 'JetBrains Mono', ui-monospace, monospace;      /* Label/kicker */

  /* Type scale */
  --fs-hero: clamp(52px, 10vw, 168px);
  --fs-h1: clamp(40px, 6vw, 72px);
  --fs-h2: clamp(32px, 4.2vw, 64px);
  --fs-h3: clamp(24px, 3vw, 36px);
  --fs-body: 17px;
  --fs-small: 14px;
  --fs-xs: 11px;

  /* Letter-spacing */
  --ls-display: -0.045em;
  --ls-heading: -0.035em;
  --ls-body: 0;
  --ls-mono: 0.15em;

  /* ====== 4. SPACING ====== */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 120px;

  /* ====== 5. RADIUS — Sharp editorial ====== */
  --radius-sharp: 0;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-pill: 999px;

  /* ====== 6. SHADOW — Giữ tối giản ====== */
  --shadow-sm: 0 1px 2px rgba(14, 14, 12, 0.06);
  --shadow-md: 0 4px 12px rgba(14, 14, 12, 0.08);
  --shadow-lg: 0 12px 32px rgba(14, 14, 12, 0.12);

  /* ====== 7. BRAND VOICE (documentation) ======
     Tone: editorial, chuyên nghiệp, tạp chí chiến lược
     Giọng: dùng số liệu cụ thể, italic đỏ để nhấn keyword
     Slogan gợi ý: "Xưởng thang máy gia đình đứng về phía đại lý"
     Cam kết: không bán lẻ · 15-25 ngày lắp đặt · xưởng thật
  */

  /* ====== 8. LEGACY MAPPING — tương thích style.css có sẵn ======
     Template gốc (AxisBuilt) dùng các biến dưới, map sang brand tokens
     để KHÔNG phải sửa toàn bộ style.css (giữ animation/hiệu ứng nguyên vẹn).
  */
  --primary-color: var(--brand-ink);
  --secondary-color: var(--brand-stone);
  --white-color: var(--brand-paper-bright);
  --black-color: var(--brand-ink);
  --border-color: var(--brand-hairline-strong);
  --accent-color: var(--brand-red);          /* Gold → Red */
  --red-color: var(--brand-red);
  --gray-color: var(--brand-paper);
  --gray-color2: var(--brand-cream);
  --stroke-color: var(--brand-hairline-strong);
  --primary-font: var(--brand-font-display); /* Titillium Web (heading) → Fraunces */
  --secondary-font: var(--brand-font-body);  /* Space Grotesk (body) → Inter */
}

/* ===== 9. Base overrides — đảm bảo body dùng font brand ===== */
html {
  font-family: var(--brand-font-body);
}

body {
  font-family: var(--brand-font-body);
  background-color: var(--brand-paper);
  color: var(--brand-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Headings ưu tiên font display */
h1, h2, h3, .cs_fs_72, .cs_fs_64, .cs_fs_50, .cs_fs_48, .cs_fs_40, .cs_fs_36 {
  font-family: var(--brand-font-display);
  letter-spacing: var(--ls-heading);
}

/* Mono utility class */
.brand-mono,
.cs_mono {
  font-family: var(--brand-font-mono);
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
}

/* Italic đỏ — đặc trưng brand voice */
.brand-em,
em.brand-highlight {
  font-style: italic;
  color: var(--brand-red);
  font-weight: 500;
}

/* ============================================================
   10. SMARTRISE Fixes — logo sizing, dark headers, footer ring
   ============================================================ */

/* Header logo — constrain to header height */
.cs_site_header .cs_site_brand img {
  height: 44px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}
@media (max-width: 991px) {
  .cs_site_header .cs_site_brand img {
    height: 36px;
    max-width: 140px;
  }
}

/* Page banner / dark section header — logo invert to white */
.cs_page_header_style_1 .cs_site_brand img,
.cs_site_header.cs_sticky_active.cs_dark_mode .cs_site_brand img,
.cs_footer_style_1.cs_primary_bg .cs_site_brand img,
.cs_footer_style_1.cs_primary_bg .cs_footer_logo > img,
.cs_primary_bg .cs_site_brand img {
  filter: brightness(0) invert(1);
}

/* Footer big logo — constrain size so doesn't dominate */
.cs_footer_style_1 .cs_footer_logo > img {
  width: auto;
  max-width: 420px;
  max-height: 160px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
@media (max-width: 767px) {
  .cs_footer_style_1 .cs_footer_logo > img {
    max-width: 260px;
    max-height: 100px;
  }
}

/* Footer dark variant — white logo via filter */
.cs_footer_style_1.cs_primary_bg .cs_footer_logo > img {
  filter: brightness(0) invert(1);
}

/* Fix — red ring arrow icon overlapping the spinning logo
   Ẩn vòng đỏ nhỏ trong circle, giữ logo xoay vòng bên ngoài */
.cs_footer_style_1 .cs_logo_text_wrapper .cs_arrow_icon,
.cs_hero_style_1 .cs_logo_text_wrapper .cs_arrow_icon {
  display: none !important;
}

/* Make spinning logo inside circle smaller & padded properly */
.cs_logo_text_wrapper {
  background: transparent !important;
  border: 1.5px dashed var(--brand-hairline-strong);
}
.cs_logo_text_wrapper .cs_text_logo img {
  padding: 18%;
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
}
.cs_footer_style_1.cs_primary_bg .cs_logo_text_wrapper {
  border-color: rgba(244, 241, 234, 0.25);
}
.cs_footer_style_1.cs_primary_bg .cs_logo_text_wrapper .cs_text_logo img {
  filter: brightness(0) invert(1);
}

/* Preloader white logo */
.cs_preloader img {
  filter: brightness(0) invert(1);
}

/* ============================================================
   12. Performance — Scroll smoothness fixes
   ============================================================ */

/* Bg-fixed gây jank nặng → tắt GLOBAL (cả desktop lẫn mobile).
   `background-attachment: fixed` khiến browser phải repaint ảnh nền mỗi frame khi scroll. */
.cs_bg_fixed,
[class*="cs_bg_fixed"] {
  background-attachment: scroll !important;
}

/* GPU accelerate các element có animation */
.cs_hero_style_1,
.cs_hero_style_2,
.cs_hero_style_3,
.cs_hero_style_4,
.cs_hero_style_5,
.cs_hero_style_6,
.cs_video_block_1,
.cs_sliding_text,
.cs_shadow_text,
.timeline-list,
.smartrise-timeline,
.cs_portfolio_slider_style_1,
.swiper {
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Contain image decode cost */
img {
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}
img[src*="logo"] {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

/* ============================================================
   11. Smartrise Contact Form — upgraded UX
   ============================================================ */
.smartrise-contact-form .form-eyebrow {
  font-family: var(--brand-font-mono);
  font-size: 11px;
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  color: var(--brand-red);
  margin: 0 0 12px;
}
.smartrise-contact-form .form-lede {
  color: var(--brand-ink-soft);
  margin-bottom: 28px;
  font-size: 15px;
  line-height: 1.6;
  max-width: 480px;
}
.smartrise-form {
  display: grid;
  gap: 18px;
}
.smartrise-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 767px) {
  .smartrise-form .form-row { grid-template-columns: 1fr; }
}
.smartrise-form .form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.smartrise-form .form-field-full { grid-column: 1 / -1; }
.smartrise-form .form-label {
  font-family: var(--brand-font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-stone);
  font-weight: 600;
}
.smartrise-form .form-label em {
  color: var(--brand-red);
  font-style: normal;
  margin-left: 2px;
}
.smartrise-form input[type="text"],
.smartrise-form input[type="email"],
.smartrise-form input[type="tel"],
.smartrise-form select,
.smartrise-form textarea {
  font-family: var(--brand-font-body);
  font-size: 15px;
  color: var(--brand-ink);
  background: var(--brand-paper-bright);
  border: 1px solid var(--brand-hairline-strong);
  border-radius: 4px;
  padding: 12px 14px;
  width: 100%;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  line-height: 1.4;
}
.smartrise-form input:focus,
.smartrise-form select:focus,
.smartrise-form textarea:focus {
  outline: none;
  border-color: var(--brand-red);
  background: var(--brand-paper);
  box-shadow: 0 0 0 3px rgba(216, 58, 46, 0.08);
}
.smartrise-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'><path fill='none' stroke='%236B6B63' stroke-width='1.5' d='M1 1l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.smartrise-form textarea { resize: vertical; min-height: 110px; }
.smartrise-form .form-privacy .form-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--brand-ink-soft);
  line-height: 1.5;
  cursor: pointer;
}
.smartrise-form .form-privacy input[type="checkbox"] {
  margin-top: 3px;
  width: 16px; height: 16px;
  accent-color: var(--brand-red);
}
.smartrise-form .smartrise-submit {
  margin-top: 8px;
  justify-self: start;
  padding: 14px 22px;
}

