/*
Theme Name: AJH Cosmeceuticals
Theme URI: https://www.ajhco.com.sg
Author: AJH Private Limited
Author URI: https://www.ajhco.com.sg
Description: AJH Cosmeceuticals — medical device, skincare and nutraceutical distribution in Singapore and Asia since 1998. Clinical paper palette with the three logo hues (amber, azure, leaf) as pillar colours. Type: Bricolage Grotesque, Public Sans, IBM Plex Mono.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ajh
*/

/* =====================================================
   AJH Cosmeceuticals — design system
   Palette: clinical paper, green-ink, and the three
   logo hues (amber A, azure J, leaf H) used as pillar
   colours: skincare / device / nutraceutical.
   Type: Bricolage Grotesque (display), Public Sans
   (body), IBM Plex Mono (trade data: codes, licences).
   ===================================================== */

:root {
  --paper: #FBFAF6;
  --paper-alt: #F3F1E9;
  --ink: #141B17;
  --ink-soft: #4C534D;
  --line: #E2DFD4;
  --amber: #E8940A;
  --azure: #1E8FD5;
  --leaf: #2E9648;
  --teal: #2E8B98;
  --amber-tint: #FBEED8;
  --azure-tint: #E1F0FA;
  --leaf-tint: #E3F2E7;
  --teal-tint: #E0EFF1;
  --display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --body: "Public Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --shell: 1180px;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.25; }

p { color: var(--ink-soft); }
h1 + p, h2 + p { margin-top: 0.9rem; }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--azure); outline-offset: 3px; border-radius: 2px; }

.mono { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

/* tri-circle glyph used in eyebrows */
.tri {
  width: 30px; height: 12px; flex: 0 0 auto;
  background:
    radial-gradient(circle 6px at 6px 6px,  var(--amber) 5.5px, transparent 6px),
    radial-gradient(circle 6px at 15px 6px, var(--azure) 5.5px, transparent 6px),
    radial-gradient(circle 6px at 24px 6px, var(--leaf)  5.5px, transparent 6px);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.78rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { box-shadow: 0 8px 20px rgba(20, 27, 23, 0.25); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251, 250, 246, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex; align-items: center; gap: 2rem;
  padding-top: 14px; padding-bottom: 14px;
}

.logo { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.logo-mark { width: 58px; height: auto; display: block; }
.logo-letter {
  font-family: var(--display);
  font-size: 15px; font-weight: 800; fill: #fff;
}
.logo-word {
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.01em; white-space: nowrap;
}
.logo-word em { font-style: normal; font-weight: 500; color: var(--ink-soft); }

.site-nav { display: flex; gap: 1.6rem; margin-left: auto; }
.site-nav a {
  text-decoration: none; font-size: 0.95rem; font-weight: 500;
  color: var(--ink-soft); padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--amber); }

.header-cta { padding: 0.55rem 1.25rem; font-size: 0.92rem; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 42px; height: 42px; margin-left: auto;
  flex-direction: column; justify-content: center; align-items: center; gap: 7px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); transition: transform 0.2s ease; }

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 8vh, 6rem) 0 clamp(3rem, 7vh, 5rem); }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem; align-items: center;
}
.hero-copy .eyebrow { color: var(--ink); }
.lede { font-size: 1.15rem; max-width: 34em; }
.hero-actions { display: flex; gap: 0.9rem; margin-top: 2rem; flex-wrap: wrap; }

.hero-diagram { min-width: 0; }
.hero-diagram svg { width: 100%; height: auto; display: block; }
.hero-diagram figcaption {
  text-align: center; color: var(--ink-soft); margin-top: 0.6rem;
  letter-spacing: 0.08em; text-transform: uppercase;
}

.node-ring { fill: var(--paper); stroke-width: 2.5; }
.node-ring.amber { stroke: var(--amber); fill: var(--amber-tint); }
.node-ring.azure { stroke: var(--azure); fill: var(--azure-tint); }
.node-ring.leaf  { stroke: var(--leaf);  fill: var(--leaf-tint); }
.node-label { font-family: var(--display); font-size: 13px; font-weight: 600; fill: var(--ink); }
.node-sub   { font-family: var(--display); font-size: 12px; fill: var(--ink-soft); }
.hub-label  { font-family: var(--display); font-size: 19px; font-weight: 800; fill: #fff; letter-spacing: 0.06em; }
.hub-sub    { font-family: var(--mono); font-size: 11px; fill: var(--ink-soft); letter-spacing: 0.08em; }
.chan-label { font-family: var(--body); font-size: 13.5px; font-weight: 500; fill: var(--ink); }

/* animated route flow */
.route { stroke-dasharray: 5 7; animation: flow 2.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -48; } }

/* ---------- credentials strip ---------- */
.cred-strip {
  background: var(--ink); color: var(--paper);
  padding: 2.4rem 0;
}
.cred-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
}
.cred { display: flex; flex-direction: column; gap: 0.35rem; }
.cred-num {
  font-size: 2rem; font-weight: 500; letter-spacing: 0;
  color: var(--amber);
}
.cred:nth-child(2) .cred-num { color: var(--azure); }
.cred:nth-child(3) .cred-num { color: var(--leaf); }
.cred:nth-child(4) .cred-num { color: var(--amber); }
.cred-label { font-size: 0.88rem; color: rgba(251, 250, 246, 0.75); line-height: 1.45; }

/* ---------- sections ---------- */
.section { padding: clamp(3.5rem, 9vh, 6.5rem) 0; }
.section-alt { background: var(--paper-alt); }
.section-head { max-width: 40em; margin-bottom: 3rem; }
.section-lede { font-size: 1.1rem; }

/* ---------- portfolio ---------- */
.brand-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.brand-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.brand-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(20, 27, 23, 0.09); }

.brand-badge {
  width: 92px; height: 92px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-family: var(--display); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.12em; line-height: 1.35;
  color: #fff; margin-bottom: 0.4rem;
}
.brand-badge sup { font-size: 0.5rem; }
.amber-bg { background: var(--amber); }
.azure-bg { background: var(--azure); }
.leaf-bg  { background: var(--leaf); }
.teal-bg  { background: var(--teal); }

.chip {
  align-self: flex-start;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0.22rem 0.7rem; border-radius: 999px; font-size: 0.68rem;
}
.amber-chip { background: var(--amber-tint); color: #8A5800; }
.azure-chip { background: var(--azure-tint); color: #10557E; }
.leaf-chip  { background: var(--leaf-tint);  color: #1C5B2D; }
.teal-chip  { background: var(--teal-tint);  color: #1A5560; }

.brand-card p { font-size: 0.98rem; }
.brand-channels { color: var(--ink-soft); margin-top: auto; padding-top: 0.5rem; }

.brand-card-cta {
  background: transparent;
  border: 1.5px dashed var(--ink-soft);
  justify-content: center; text-align: left; gap: 1rem;
}
.brand-card-cta .btn { align-self: flex-start; }

/* ---------- Rejuran spotlight ---------- */
.spotlight {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.spotlight-main {
  display: grid; grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
}
.spotlight-copy { padding: 2.4rem 2.4rem 2.4rem 2.4rem; display: flex; flex-direction: column; gap: 0.9rem; align-items: flex-start; }
.spotlight-logo { width: 220px; max-width: 100%; height: auto; }
.spotlight-copy h3 { font-size: 1.5rem; }
.spotlight-copy p { font-size: 0.98rem; }
.spotlight-hero { min-width: 0; align-self: stretch; }
.spotlight-hero img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  min-height: 320px;
}
.spotlight-strip {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--line);
}
.spotlight-strip figure {
  padding: 1.2rem; text-align: center;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.8rem; align-items: center; justify-content: space-between;
}
.spotlight-strip figure:last-child { border-right: none; }
.spotlight-strip img {
  width: 100%; max-width: 240px; height: 190px; object-fit: contain; display: block;
}
.spotlight-strip figcaption { color: var(--ink-soft); letter-spacing: 0.08em; text-transform: uppercase; }
.strip-pad { background: var(--azure-tint); }

/* photo panels on brand cards */
.card-photo {
  aspect-ratio: 16 / 10;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.card-photo img {
  max-width: 92%; max-height: 92%;
  width: auto; height: auto;
  object-fit: contain;
}

/* expandable product map inside a brand card */
.card-details { margin-top: 0.6rem; }
.card-details summary {
  cursor: pointer; color: var(--ink); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  list-style-position: inside;
}
.card-details summary:hover { color: var(--teal); }
.card-details img {
  width: 100%; height: auto; display: block;
  margin-top: 0.7rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff;
}

/* ---------- distribution ---------- */
.channel-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
}
.channel-col {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 2rem;
}
.channel-title { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.1rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.amber-dot { background: var(--amber); }
.azure-dot { background: var(--azure); }

.channel-list { list-style: none; }
.channel-list li {
  padding: 0.7rem 0; color: var(--ink-soft); font-size: 0.98rem;
  border-bottom: 1px solid var(--line);
}
.channel-list li:last-child { border-bottom: none; }
.channel-list strong { color: var(--ink); font-weight: 600; }

.channel-note {
  margin-top: 2rem; padding: 1.1rem 1.4rem;
  background: var(--leaf-tint); border-left: 4px solid var(--leaf);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem; color: var(--ink);
}

/* ---------- markets ---------- */
.market-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 1rem;
}
.market {
  position: relative;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.3rem 1.1rem;
  display: flex; flex-direction: column; gap: 0.3rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.market:hover { border-color: var(--ink); transform: translateY(-3px); }
.market-code { font-size: 1.5rem; font-weight: 500; color: var(--ink); }
.market-name { font-size: 0.86rem; color: var(--ink-soft); }
.market-tag {
  position: absolute; top: 0.8rem; right: 0.8rem;
  font-size: 0.62rem; letter-spacing: 0.12em;
  background: var(--ink); color: var(--paper);
  padding: 0.15rem 0.5rem; border-radius: 999px;
}

/* ---------- about ---------- */
.about-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3.5rem; align-items: center;
}
.about-grid p + p { margin-top: 1rem; }

.pull-quote {
  border-left: 4px solid var(--amber);
  padding: 1.2rem 0 1.2rem 1.8rem;
}
.pull-quote p {
  font-family: var(--display); font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 600; line-height: 1.3; color: var(--ink);
}
.pull-quote cite { display: block; margin-top: 1rem; color: var(--ink-soft); font-style: normal; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: var(--paper); padding: clamp(3rem, 8vh, 5rem) 0; }
.cta-band-inner { text-align: center; max-width: 42em; }
.cta-band h2 { color: var(--paper); }
.cta-band p { color: rgba(251, 250, 246, 0.75); margin: 1rem 0 1.8rem; }

/* ---------- contact ---------- */
.contact-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3.5rem; align-items: start;
}
.contact-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.4rem; }
.contact-list dt {
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-soft); margin-bottom: 0.25rem;
}
.contact-list dd { color: var(--ink); }
.contact-list a { color: var(--ink); text-decoration-color: var(--amber); text-underline-offset: 3px; }

.contact-form {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 2.2rem;
  display: flex; flex-direction: column; gap: 1.1rem;
}
.contact-form h3 { margin-bottom: 0.3rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field .optional { font-weight: 400; color: var(--ink-soft); }
.field input, .field textarea {
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--paper);
  transition: border-color 0.15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--azure);
}
.field textarea { resize: vertical; }
.contact-form .btn { align-self: flex-start; }
.form-note { font-size: 0.9rem; min-height: 1.3em; }
.form-note.ok { color: var(--leaf); }
.form-note.err { color: #B4331A; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0;
}
.footer-inner {
  display: flex; justify-content: space-between; gap: 3rem; flex-wrap: wrap;
}
.footer-brand { max-width: 22em; }
.footer-brand p { margin-top: 0.9rem; font-size: 0.95rem; }
.footer-meta { display: flex; flex-direction: column; gap: 0.5rem; text-align: right; }
.footer-meta p { color: var(--ink-soft); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .route { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .brand-card, .market { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .brand-grid { grid-template-columns: repeat(2, 1fr); }
  .market-grid { grid-template-columns: repeat(4, 1fr); }
  .cred-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .spotlight-main { grid-template-columns: 1fr; }
  .spotlight-hero img { min-height: 0; }
  .about-grid, .contact-grid, .channel-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-meta { text-align: left; }

  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; gap: 0; padding: 0.5rem 24px 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 560px) {
  .brand-grid { grid-template-columns: 1fr; }
  .spotlight-strip { grid-template-columns: 1fr; }
  .spotlight-strip figure { border-right: none; border-bottom: 1px solid var(--line); }
  .spotlight-strip figure:last-child { border-bottom: none; }
  .market-grid { grid-template-columns: repeat(2, 1fr); }
  .cred-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .logo-word em { display: none; }
}
