/* Tuấn Mộc typography, colour and responsive layout shared by every template. */
:root {
  --ink: #263e30;
  --muted: #607365;
  --green: #386746;
  --line: #dce6d8;
  --cream: #faf9f4;
  --paper: #fffefa;
  --tm-sage: #6f966e;
  --tm-soft-green: #eaf2e4;
}

html { scroll-padding-top: 96px; }
body, button, input, textarea, select { font-family: Montserrat, Arial, sans-serif; }
body { color: var(--ink); font-size: 16px; line-height: 1.7; }
button, input, textarea, select { font-size: inherit; }
h1, h2, h3 { color: var(--ink); font-weight: 700; letter-spacing: -.045em; text-wrap: balance; }
h1 { line-height: 1.1; }
h2 { line-height: 1.2; }
h3 { line-height: 1.35; }
h1 em, h2 em, h3 em { color: var(--tm-sage); font-weight: 600; }
.eyebrow, .tm-policy-kicker, .partner-kicker { color: #648767; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
:where(.button, .button-text, .partner-cta, .partner-popup-submit, .tm-account-button) { font-weight: 700; }
:where(a, button, input, textarea, select):focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* One readable type scale across the home, product, account and content pages. */
.hero h1 { font-size: clamp(48px, 4.1vw, 66px); line-height: 1.12; }
.hero-copy > p { font-size: 17px; line-height: 1.78; color: #526a58; }
.section-heading h2, .assembly-copy h2, .story-copy h2,
.benefits-intro h2, .story-detail-grid h2, .reviews-heading h2 {
  font-size: clamp(34px, 3.25vw, 48px);
  line-height: 1.2;
}
.footer-contact-heading h2 { font-size: clamp(30px, 2.7vw, 39px); }
.tm-single h1 { font-size: clamp(38px, 3.6vw, 54px); }
.tm-account-heading h1 { font-size: clamp(34px, 3.2vw, 48px); }
.tm-account-panel h2 { font-size: clamp(25px, 2.2vw, 32px); }
.tm-policy-hero h1 { font-size: clamp(46px, 4.8vw, 66px); }
.tm-policy-content h2 { font-size: clamp(27px, 2.3vw, 35px); }
.partner-invite h2 { font-size: clamp(34px, 3.2vw, 48px); }
.product-info h3, .benefit h3, .assembly-step h3 { font-size: 18px; }
.product-info p { font-size: 14px; line-height: 1.7; }
.benefit p, .assembly-step p, .location-card p, .tm-account-panel > p,
.tm-policy-content, .story-detail-grid p, .story-detail-grid li { font-size: 15px; line-height: 1.75; }
.footer-contact-heading p, .site-footer p { font-size: 14px; line-height: 1.7; }
.tm-product-lead, .tm-policy-hero p { font-size: 17px; line-height: 1.75; }
.review-form-wrap input[type="text"], .review-form-wrap input[type="email"],
.review-form-wrap textarea, .tm-checkout input, .tm-checkout textarea { font-size: 15px; }

/* iOS Safari zooms the whole page when a focused text control is below 16px. */
@media (max-width: 760px) {
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="button"]):not([type="submit"]),
  textarea,
  select { font-size: 16px !important; }
}

/* Wider monitors get proportionally wider content without oversized text. */
@media (min-width: 1600px) {
  .container { width: min(1480px, calc(100% - 112px)); }
  .hero-grid { min-height: 700px; }
  .hero-copy { max-width: 660px; }
  .hero-copy > p { max-width: 560px; }
  .product-grid { gap: 25px; }
  .section-space { padding-block: 100px; }
}

/* A compact desktop keeps the live copy clear of the product photograph. */
@media (min-width: 901px) and (max-width: 1199px) {
  .hero-grid { min-height: 610px; }
  .hero-copy { max-width: 440px; }
  .hero h1 { font-size: clamp(41px, 4.2vw, 50px); }
  .hero-copy > p { max-width: 405px; font-size: 16px; }
  .hero-art { width: 66vw; }
  .hero-lifestyle {
    object-position: 61% center;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.15) 12%, #000 35%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.15) 12%, #000 35%);
  }
}

/* Tablet navigation and page columns should have room to breathe. */
@media (max-width: 980px) {
  .header-row { gap: 16px; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 14px max(24px, calc((100vw - 840px)/2)) 19px;
    border-bottom: 1px solid var(--line);
    background: #fbfcf7;
    box-shadow: 0 14px 28px rgba(37, 62, 44, .12);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .menu-toggle { display: flex; width: 42px; height: 42px; flex: none; }
  .assembly-grid, .story-grid, .story-detail-grid { grid-template-columns: minmax(0,1fr); gap: 38px; }
  .story-picture { width: min(100%, 650px); }
  .footer-contact { grid-template-columns: minmax(0,1fr); gap: 28px; }
}

@media (min-width: 761px) and (max-width: 900px) {
  .hero-grid { display: block; min-height: 0; padding: 68px 0 0; }
  .hero-copy { max-width: 650px; }
  .hero h1 { font-size: clamp(45px, 6vw, 55px); }
  .hero-copy > p { max-width: 610px; }
  .hero-proof { margin-top: 28px; }
  .hero-art {
    position: relative; inset: auto;
    width: 100vw; height: min(65vw, 560px);
    margin: 34px 0 0 calc((100vw - 100%) / -2);
    -webkit-mask-image: none; mask-image: none;
  }
  .hero-art picture { display: block; width: 100%; height: 100%; }
  .hero-lifestyle {
    position: static; display: block; width: 100%; height: 100%;
    object-fit: cover; object-position: center 48%;
    -webkit-mask-image: none; mask-image: none;
  }
  .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tm-single-media { max-width: 560px; }
}

@media (max-width: 900px) {
  .tm-single-grid { grid-template-columns: minmax(0,1fr); gap: 26px; }
  .tm-single-media { position: static; width: min(100%, 640px); margin-inline: auto; }
  .tm-product-panel { padding-top: 0; }
  .tm-single h1 { font-size: clamp(34px, 5.4vw, 46px); }
  .tm-files-body { grid-template-columns: minmax(0,1fr); }
  .tm-download-stat {
    grid-row: 1; flex-direction: row; align-items: baseline; gap: 14px;
    border-left: 0; border-bottom: 1px solid #c8dac1; padding: 0 0 15px;
  }
  .tm-download-stat strong { margin: 0; font-size: 54px; }
}

@media (max-width: 850px) {
  .tm-account-layout { display: block; }
  .tm-account-nav {
    position: static; display: flex; gap: 4px; overflow-x: auto;
    margin-bottom: 20px; padding: 7px; white-space: nowrap; scrollbar-width: none;
  }
  .tm-account-nav::-webkit-scrollbar { display: none; }
  .tm-account-nav a, .tm-account-nav button { padding: 10px 12px; }
  .tm-account-nav .tm-account-logout { margin: 0; border: 0; }
  .tm-account-duo { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 78px; }
  .container { width: calc(100% - 36px); }
  .main-nav { padding-inline: 18px; }
  .hero h1 { font-size: clamp(39px, 9.4vw, 56px); }
  .hero-copy > p { font-size: 16px; line-height: 1.7; }
  .section-heading h2, .assembly-copy h2, .story-copy h2,
  .benefits-intro h2, .story-detail-grid h2, .reviews-heading h2 {
    font-size: clamp(31px, 7.8vw, 42px);
  }
  .tm-account-heading h1 { font-size: clamp(27px, 6.8vw, 38px); }
  .tm-policy-hero h1 { font-size: clamp(38px, 9vw, 52px); }
  .tm-policy-content { font-size: 15px; }
  .tm-policy-content h2 { font-size: clamp(25px, 6.2vw, 32px); }
  .partner-invite h2 { font-size: clamp(31px, 7.8vw, 42px); }
  .location-grid { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 480px) {
  .header-row { gap: 8px; }
  .header-actions { gap: 6px; }
  .hero-proof { display: none; }
  .hero h1 { font-size: clamp(37px, 9.4vw, 46px); }
  .hero-copy > p { font-size: 15.5px; }
  .tm-price-row { flex-wrap: wrap; gap: 4px 12px; }
  .tm-single-price { white-space: nowrap; font-size: 27px; }
  .reviews-heading h2 { font-size: 31px; }
  .tm-interaction-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tm-order-thanks { padding-inline: 24px; }
}
