/* =============================================================
   Formosa International — cleaner / corporate theme
   Type: Kumbh Sans (variable). Restrained B2B palette:
   white grounds, muted forest green, saffron used sparingly.
   ============================================================= */

:root {
  /* Brand greens */
  --green-900: #102463;
  --green-700: #0e3b83;
  --green-600: #1a55b0;
  --green-500: #2a6bd0;

  /* Accent — saffron, used sparingly */
  --accent:      #cf9130;
  --accent-dk:   #b07a1c;
  --accent-soft: rgba(207,145,48,.14);

  /* Chosen neutrals (slight green bias) */
  --ink:    #15201c;
  --muted:  #5b6a63;
  --line:   #e3eae6;
  --paper:  #f4f7f5;
  --paper-2:#eef3f0;
  --white:  #fefefe;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(10,30,70,.06);
  --shadow-lg: 0 18px 44px rgba(10,30,70,.10);
  --maxw: 1180px;
  --pad: clamp(1.1rem, 4vw, 2rem);
  --font: "Kumbh Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: clamp(1rem, 0.97rem + 0.18vw, 1.06rem);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--green-600); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section.tint { background: var(--paper); }
.eyebrow {
  font-weight: 600; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--green-700); display: inline-flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); display: inline-block; }
.section-head { max-width: 620px; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); margin-top: .7rem; }
.section-head p { color: var(--muted); margin-top: .9rem; }
.center { text-align: center; margin-inline: auto; }
.center .eyebrow { justify-content: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: inherit; font-weight: 600; font-size: .95rem; line-height: 1;
  padding: .9rem 1.5rem; border-radius: var(--radius-sm); cursor: pointer;
  border: 1.5px solid transparent; transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-900); }
.btn-outline { background: transparent; color: var(--green-700); border-color: var(--line); }
.btn-outline:hover { border-color: var(--green-600); color: var(--green-900); }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(21,32,28,.18); }
.btn-ghost:hover { border-color: var(--green-600); }
.btn-lg { padding: 1.05rem 1.9rem; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: 0 4px 16px rgba(10,30,70,.06); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 74px; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand img { height: 40px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-weight: 500; font-size: .95rem; color: var(--ink); position: relative; padding: .25rem 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 2px; width: 0;
  background: var(--accent); transition: width .25s ease;
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--green-700); }
.nav-cta { display: flex; align-items: center; gap: 1rem; }
.mobile-cta { display: none; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .4rem;
  width: 44px; height: 44px; border-radius: 8px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after  { position: absolute; top: 7px; }

/* ---------- Hero (split) ---------- */
.hero { border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center; padding-block: clamp(3rem, 7vw, 5.5rem);
}
.hero-copy .eyebrow { margin-bottom: 1.3rem; }
.hero h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.5rem); }
.hero p.lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.22rem); color: var(--muted); margin-top: 1.2rem; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.hero-trust { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); display: flex; gap: 1.6rem; flex-wrap: wrap; }
.hero-trust span { font-size: .88rem; color: var(--muted); display: inline-flex; align-items: center; gap: .5rem; }
.hero-trust .tick { color: var(--green-600); }
.hero-media { position: relative; }
.hero-slider { position: relative; aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--paper-2); }
.hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 2; display: flex; gap: .45rem; justify-content: center; }
.hero-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.55); cursor: pointer; transition: background .2s ease, width .2s ease; }
.hero-dots button:hover { background: rgba(255,255,255,.8); }
.hero-dots button.is-active { background: #fff; width: 20px; border-radius: 5px; }
@media (prefers-reduced-motion: reduce) { .hero-slide { transition: none; } }
.hero-media .chip {
  position: absolute; left: -14px; bottom: 26px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .85rem 1.1rem;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: .7rem;
}
.hero-media .chip b { font-size: 1.4rem; color: var(--green-700); display: block; line-height: 1; }
.hero-media .chip small { color: var(--muted); font-size: .78rem; }

/* ---------- Stats ---------- */
.stats { border-bottom: 1px solid var(--line); background: var(--paper); }
.stats .grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { text-align: center; padding: 2rem 1rem; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .num { font-weight: 700; font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.4rem); color: var(--green-700); font-variant-numeric: tabular-nums; }
.stat .label { font-size: .85rem; color: var(--muted); margin-top: .25rem; }

/* ---------- Product categories ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card .thumb { aspect-ratio: 3/2; overflow: hidden; background: var(--paper-2); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .thumb img { transform: scale(1.05); }
.card .body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card h3 { font-size: 1.18rem; }
.card p { color: var(--muted); font-size: .93rem; }
.card .more { margin-top: auto; font-weight: 600; font-size: .88rem; color: var(--green-700); display: inline-flex; align-items: center; gap: .4rem; }
.card .more svg { transition: transform .2s ease; }
.card:hover .more svg { transform: translateX(4px); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.about-copy h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); margin: .7rem 0 1rem; }
.about-copy p { color: var(--muted); }
.about-copy p + p { margin-top: 1rem; }
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1.4rem; margin-top: 1.6rem; }
.checklist li { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; font-size: .93rem; }
.checklist li svg { flex: none; margin-top: .15rem; color: var(--green-600); }

/* ---------- Features / why us ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feature { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 1.6rem; }
.feature .ico {
  width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--green-700); margin-bottom: 1.1rem;
}
.feature h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.feature p { color: var(--muted); font-size: .93rem; }

/* ---------- Global presence (single dark anchor) ---------- */
.presence { background: var(--green-900); color: #fff; }
.presence .section-head h2 { color: #fff; }
.presence .section-head p { color: rgba(255,255,255,.72); }
.presence .eyebrow { color: #fff; }
.presence .eyebrow::before { background: var(--accent); }
.branch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.1rem; }
.branch { border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius-sm); padding: 1.3rem; background: rgba(255,255,255,.03); }
.branch .flag { font-size: 1.5rem; }
.branch h3 { font-size: 1.05rem; margin: .5rem 0 .2rem; }
.branch p { color: rgba(255,255,255,.68); font-size: .88rem; }

/* ---------- Enquiry form ---------- */
.enquire-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.enquire-copy h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); margin: .7rem 0 1rem; }
.enquire-copy p { color: var(--muted); }
.enquire-copy .contact-list { margin-top: 1.8rem; display: grid; gap: 1rem; }
.enquire-copy .contact-list li { display: flex; gap: .8rem; align-items: flex-start; }
.enquire-copy .contact-list svg { flex: none; margin-top: .15rem; color: var(--green-600); }
.enquire-copy .contact-list a:hover { color: var(--green-700); }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.field label { font-size: .82rem; font-weight: 600; color: var(--ink); }
.field label .req { color: var(--accent); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: .95rem; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .8rem .9rem; width: 100%;
  transition: border-color .18s ease, background .18s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green-600); background: #fff;
}
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: .4rem; }
.form-success {
  display: none; margin-top: 1rem; padding: .9rem 1rem; border-radius: var(--radius-sm);
  background: rgba(14,59,131,.10); color: var(--green-900); font-weight: 500; font-size: .92rem;
}
.form-success.show { display: block; }

/* ---------- Accent CTA band ---------- */
.cta-accent {
  background: #ffbf47;
  color: #3a2703; border-radius: var(--radius); text-align: center;
  padding: clamp(2.4rem, 6vw, 3.6rem); box-shadow: var(--shadow-lg);
}
.cta-accent h2 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); color: #2e2000; }
.cta-accent p { margin: .8rem auto 1.8rem; max-width: 42em; color: #4a3308; }
.cta-accent .btn-dark { background: var(--green-900); color: #fff; }
.cta-accent .btn-dark:hover { background: #0a1838; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: rgba(255,255,255,.72); padding-top: clamp(3rem, 6vw, 4.5rem); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 2.5rem; }
.site-footer img.flogo { height: 44px; margin-bottom: 1rem; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1.1rem; }
.site-footer a:hover { color: var(--accent); }
.footer-links li, .footer-contact li { margin-bottom: .6rem; }
.footer-contact li { display: flex; gap: .6rem; align-items: flex-start; }
.footer-contact svg { flex: none; margin-top: .2rem; color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.5rem; padding-block: 1.4rem;
  display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; font-size: .84rem;
}
.social { display: flex; gap: .6rem; }
.social a { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.08); transition: background .2s, color .2s; }
.social a:hover { background: var(--accent); color: var(--green-900); }

/* ---------- Page hero (sub-pages) ---------- */
.page-hero { background: var(--green-900); color: #fff; padding-block: clamp(2.6rem, 6vw, 4rem); }
.page-hero .eyebrow { color: #fff; }
.page-hero .eyebrow::before { background: var(--accent); }
.page-hero h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); margin-top: .8rem; }
.page-hero p { color: rgba(255,255,255,.75); margin-top: .9rem; max-width: 46em; }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.6); margin-bottom: .2rem; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 .4rem; }

/* ---------- Product catalog ---------- */
.catalog { display: grid; gap: 1.2rem; }
.catalog-item { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); scroll-margin-top: 92px; }
.catalog-item:target { box-shadow: 0 0 0 2px var(--green-600); }
.catalog-head { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); background: var(--paper); }
.catalog-head img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.catalog-head .meta { flex: 1; }
.catalog-head h3 { font-size: 1.2rem; }
.catalog-head p { color: var(--muted); font-size: .9rem; margin-top: .15rem; }
.catalog-head .count { flex: none; font-size: .8rem; font-weight: 600; color: var(--green-700); background: var(--accent-soft); padding: .35rem .7rem; border-radius: 999px; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; padding: 1.2rem 1.3rem; }
.tag { font-size: .86rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line); padding: .35rem .75rem; border-radius: 8px; }

/* ---------- Quality process (a real sequence → numbered) ---------- */
.process { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.2rem; counter-reset: step; }
.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.4rem; position: relative; background: var(--white); }
.step .n { counter-increment: step; font-weight: 700; font-size: .85rem; color: var(--green-700); background: var(--accent-soft); width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; margin-bottom: .9rem; font-variant-numeric: tabular-nums; }
.step .n::before { content: counter(step, decimal-leading-zero); }
.step h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.step p { color: var(--muted); font-size: .92rem; }

.quote-band { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.8rem, 4vw, 2.8rem); }
.quote-band blockquote { font-size: clamp(1.15rem, 1rem + 1vw, 1.5rem); font-weight: 500; line-height: 1.45; color: var(--ink); max-width: 40ch; }
.quote-band .mark { color: var(--accent); font-size: 2.4rem; line-height: 0; }

/* ---------- Contact branches + map ---------- */
.branch-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.bcard { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; background: var(--white); }
.bcard .flag { font-size: 1.4rem; }
.bcard h3 { font-size: 1.1rem; margin: .5rem 0 .3rem; display: flex; align-items: center; gap: .5rem; }
.bcard h3 .tag-hq { font-size: .68rem; font-weight: 700; letter-spacing: .04em; color: var(--green-700); background: var(--accent-soft); padding: .18rem .5rem; border-radius: 999px; }
.bcard address { font-style: normal; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.bcard address a:hover { color: var(--green-700); }
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); line-height: 0; }
.map-wrap iframe { width: 100%; height: 380px; border: 0; display: block; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn:hover, .card:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .about-grid, .enquire-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 460px; order: -1; }
  .cards, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  /* backdrop-filter turns the header into a containing block for fixed children,
     which would trap the overlay inside the 74px bar — disable it on mobile */
  .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--white); }
  /* keep header controls above the overlay */
  .brand, .nav-toggle { position: relative; z-index: 55; }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn { display: none; }              /* header CTA moves into the menu */

  /* hamburger morphs into an X */
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { transition: transform .28s ease, background .1s ease, top .28s ease; }
  .nav[data-open="true"] .nav-toggle span { background: transparent; }
  .nav[data-open="true"] .nav-toggle span::before { top: 0; transform: rotate(45deg); }
  .nav[data-open="true"] .nav-toggle span::after  { top: 0; transform: rotate(-45deg); }

  /* full-screen overlay menu */
  .nav-links {
    position: fixed; inset: 0; z-index: 48;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); padding: calc(74px + 1.2rem) var(--pad) 2rem;
    transform: translateY(-100%); transition: transform .34s cubic-bezier(.4,0,.2,1);
    overflow-y: auto; overscroll-behavior: contain;
  }
  .nav[data-open="true"] .nav-links { transform: translateY(0); }
  .nav-links a::after { display: none; }
  .nav-links a:not(.btn) {
    display: block; padding: 1.15rem .25rem; font-size: 1.25rem; font-weight: 500;
    border-bottom: 1px solid var(--line);
  }
  .nav-links a:not(.btn):active { color: var(--green-600); }
  .nav-links a:not(.btn)[aria-current="page"] { color: var(--green-700); font-weight: 700; }
  .mobile-cta { display: block; margin-top: 1.6rem; }
  .mobile-cta .btn { width: 100%; color: #fff; }

  .stats .grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .cards, .feature-grid, .checklist, .footer-grid, .field-row { grid-template-columns: 1fr; }
  .hero .actions { flex-direction: column; align-items: stretch; }
}
