/* ============================================================
   JOINERY.IO GLOBAL PLATFORM — DESIGN SYSTEM v2
   Font: Fraunces (display) + Plus Jakarta Sans (body/UI)
   Palette: Deep ink / Steel blue accent / Warm white
   ============================================================ */

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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

:root {
  /* Core palette */
  --ink:        #0E0F14;
  --ink-2:      #161820;
  --ink-3:      #1E2028;
  --ink-4:      #262830;
  --steel:      #2C2F3E;
  --mid:        #5C607A;
  --muted:      #8B8FA8;
  --dim:        #B0B4CC;
  --paper:      #E8E9F0;
  --white:      #F4F5FA;
  --pure:       #FFFFFF;

  /* Brand accent — electric indigo */
  --accent:     #4F6EF7;
  --accent-2:   #3A55E0;
  --accent-3:   #6B85F9;
  --accent-glow: rgba(79,110,247,0.15);
  --accent-pale: rgba(79,110,247,0.08);

  /* Regional colours */
  --au:   #E8703A;
  --nz:   #00B4C8;
  --uk:   #3A9E72;
  --us:   #7B6FE0;
  --ca:   #C8302A;

  /* Semantic */
  --good:  #2D9E72;
  --warn:  #C8902A;
  --bad:   #C83030;

  /* Rules */
  --rule:        rgba(255,255,255,0.06);
  --rule-2:      rgba(255,255,255,0.10);
  --rule-3:      rgba(255,255,255,0.16);

  /* Typography */
  --display: 'Fraunces', Georgia, serif;
  --body:    'Plus Jakarta Sans', system-ui, sans-serif;
  --mono:    'JetBrains Mono', monospace;

  /* Spacing */
  --r:   4px;
  --r-2: 8px;
  --r-3: 12px;
  --r-4: 16px;

  /* Transitions */
  --t: 0.18s ease;
}

body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* ── TYPOGRAPHY SCALE ── */
h1,h2,h3,h4,h5,h6 { font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; color: var(--white); }
h1 { font-size: clamp(38px, 6vw, 72px); }
h2 { font-size: clamp(26px, 4vw, 44px); }
h3 { font-size: clamp(20px, 2.5vw, 28px); }
h4 { font-size: 18px; }
h5 { font-size: 15px; font-family: var(--body); font-weight: 600; letter-spacing: -0.01em; }
p  { color: var(--muted); line-height: 1.75; }
a  { color: inherit; text-decoration: none; }
strong { color: var(--white); font-weight: 600; }
em { font-style: italic; }

.display-xl { font-family: var(--display); font-size: clamp(52px, 8vw, 96px); font-weight: 800; letter-spacing: -0.04em; line-height: 0.95; color: var(--white); }
.display-accent { color: var(--accent-3); font-style: italic; }
.label { font-family: var(--body); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.mono-sm { font-family: var(--mono); font-size: 11px; color: var(--mid); letter-spacing: 0.04em; }

/* ── LAYOUT ── */
.wrap        { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.wrap-narrow { max-width: 780px;  margin: 0 auto; padding: 0 40px; }
.wrap-wide   { max-width: 1440px; margin: 0 auto; padding: 0 40px; }
.section     { padding: 80px 0; }
.section-sm  { padding: 48px 0; }
.section-lg  { padding: 120px 0; }
hr.rule      { border: none; border-top: 1px solid var(--rule); }

/* ── NAV ── */
nav.global-nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(14,15,20,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--rule);
  padding: 0 40px;
  height: 58px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo-mark {
  width: 30px; height: 30px; background: var(--accent); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.nav-logo-text { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.03em; color: var(--white); }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--muted); padding: 6px 12px; border-radius: var(--r-2); transition: all var(--t); white-space: nowrap; }
.nav-links a:hover { color: var(--white); background: var(--rule); }
.nav-links a.active { color: var(--white); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-region { font-size: 12px; font-weight: 500; color: var(--muted); padding: 5px 10px; border: 1px solid var(--rule-2); border-radius: var(--r-2); cursor: pointer; transition: all var(--t); background: transparent; font-family: var(--body); display: flex; align-items: center; gap: 5px; }
.nav-region:hover { border-color: var(--rule-3); color: var(--white); }
.btn-nav { font-size: 13px; font-weight: 600; color: var(--white); background: var(--accent); padding: 7px 18px; border-radius: var(--r-2); border: none; cursor: pointer; font-family: var(--body); transition: background var(--t); text-decoration: none; display: inline-flex; align-items: center; }
.btn-nav:hover { background: var(--accent-2); }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-mobile { display: none; position: fixed; top: 58px; left: 0; right: 0; bottom: 0; background: var(--ink-2); z-index: 199; padding: 24px 20px; flex-direction: column; overflow-y: auto; }
.nav-mobile.open { display: flex; }
.nav-mobile a { display: block; padding: 13px 0; font-size: 15px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--rule); transition: color var(--t); }
.nav-mobile a:hover { color: var(--white); }
.nav-mobile .nm-cta { background: var(--accent); color: var(--white); text-align: center; padding: 14px; border-radius: var(--r-3); border: none; margin-top: 20px; font-weight: 600; font-size: 15px; }

/* ── FOOTER ── */
footer.global-footer { background: var(--ink-2); border-top: 1px solid var(--rule); padding: 64px 40px 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto 48px; }
.footer-brand-desc { font-size: 13px; color: var(--mid); line-height: 1.7; margin-top: 12px; max-width: 220px; }
.footer-col h5 { font-family: var(--body); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col ul a { font-size: 13px; color: var(--mid); transition: color var(--t); }
.footer-col ul a:hover { color: var(--paper); }
.footer-bottom { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--mid); flex-wrap: wrap; gap: 10px; }
.footer-markets { display: flex; gap: 14px; }
.footer-market { font-size: 12px; color: var(--mid); transition: color var(--t); }
.footer-market:hover { color: var(--paper); }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--body); font-weight: 600; border-radius: var(--r-3); cursor: pointer; transition: all var(--t); text-decoration: none; border: none; white-space: nowrap; }
.btn-primary { background: var(--accent); color: var(--white); padding: 13px 28px; font-size: 14px; }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--paper); padding: 12px 24px; font-size: 14px; border: 1px solid var(--rule-3); }
.btn-ghost:hover { background: var(--rule); border-color: var(--rule-3); }
.btn-white { background: var(--white); color: var(--ink); padding: 13px 28px; font-size: 14px; }
.btn-white:hover { background: var(--pure); }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn svg { flex-shrink: 0; }

/* ── BADGES / TAGS ── */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; padding: 4px 12px; border-radius: 20px; }
.badge-accent { background: var(--accent-pale); color: var(--accent-3); border: 1px solid rgba(79,110,247,0.2); }
.badge-global { background: var(--accent-pale); color: var(--accent-3); }
.badge-au { background: rgba(232,112,58,0.12); color: var(--au); }
.badge-nz { background: rgba(0,180,200,0.1); color: var(--nz); }
.badge-uk { background: rgba(58,158,114,0.12); color: var(--uk); }
.badge-us { background: rgba(123,111,224,0.12); color: var(--us); }
.badge-new { background: rgba(45,158,114,0.12); color: var(--good); }
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.7; }

/* ── PAGE HERO ── */
.page-hero { padding: 72px 0 60px; border-bottom: 1px solid var(--rule); }
.page-hero-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.page-hero-eyebrow-line { width: 24px; height: 2px; background: var(--accent); border-radius: 1px; }
.page-hero h1 { margin-bottom: 18px; }
.page-hero .hero-sub { font-size: 17px; color: var(--muted); line-height: 1.7; max-width: 580px; margin-bottom: 32px; }
.page-hero-meta { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-meta-item { font-size: 13px; color: var(--mid); display: flex; align-items: center; gap: 6px; }
.hero-meta-dot { width: 4px; height: 4px; background: var(--mid); border-radius: 50%; }

/* ── CARDS ── */
.card { background: var(--ink-3); border: 1px solid var(--rule-2); border-radius: var(--r-4); padding: 24px; }
.card-hover { transition: border-color var(--t), transform var(--t), background var(--t); }
.card-hover:hover { border-color: var(--rule-3); background: var(--ink-4); transform: translateY(-2px); }
.card-accent { border-color: rgba(79,110,247,0.3); }
.card-link { text-decoration: none; display: block; }

/* ── GRID SYSTEMS ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* ── DIVIDERS / SECTION LABELS ── */
.section-label { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; }
.section-label-line { flex: 1; height: 1px; background: var(--rule); }
.section-label-text { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mid); white-space: nowrap; }

/* ── TOOL PANEL ── */
.tool-panel { background: var(--ink-3); border: 1px solid var(--rule-2); border-radius: var(--r-4); overflow: hidden; }
.tool-panel-bar { background: var(--ink-2); border-bottom: 1px solid var(--rule); padding: 12px 18px; display: flex; align-items: center; gap: 10px; }
.tool-panel-dots { display: flex; gap: 5px; }
.tpd { width: 10px; height: 10px; border-radius: 50%; }
.tpd-r { background: #FF5F57; } .tpd-y { background: #FFBD2E; } .tpd-g { background: #28C840; }
.tool-panel-title { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.tool-panel-body { padding: 28px; }
.tool-panel-results { padding: 24px 28px; background: var(--ink-2); border-top: 1px solid var(--rule); }

/* ── FORM ELEMENTS ── */
.field-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; margin-top: 18px; }
.field-label:first-of-type { margin-top: 0; }
input[type=text], input[type=number], input[type=email], select, textarea {
  width: 100%; background: var(--ink-2); border: 1px solid var(--rule-2);
  border-radius: var(--r-3); padding: 10px 14px; font-size: 14px;
  color: var(--paper); font-family: var(--body); outline: none; transition: border-color var(--t);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238B8FA8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.add-row-btn { width: 100%; background: transparent; border: 1px dashed var(--rule-3); border-radius: var(--r-3); padding: 9px; font-size: 13px; color: var(--muted); cursor: pointer; font-family: var(--body); transition: all var(--t); margin-top: 8px; }
.add-row-btn:hover { border-color: var(--accent); color: var(--accent-3); background: var(--accent-pale); }
.remove-btn { background: none; border: none; color: var(--mid); cursor: pointer; font-size: 20px; line-height: 1; padding: 2px 4px; transition: color var(--t); }
.remove-btn:hover { color: var(--bad); }
.line-row { display: grid; grid-template-columns: 2fr 90px 90px 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.line-row input { margin-top: 0; }
.submit-btn { width: 100%; background: var(--accent); color: var(--white); border: none; border-radius: var(--r-3); padding: 13px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: var(--body); margin-top: 20px; transition: background var(--t); }
.submit-btn:hover { background: var(--accent-2); }

/* ── RESULTS ── */
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.metric { background: var(--ink-3); border: 1px solid var(--rule); border-radius: var(--r-3); padding: 14px 16px; }
.metric-label { font-size: 10px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--mid); margin-bottom: 6px; }
.metric-value { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--white); }
.metric-value.good { color: var(--good); }
.metric-value.warn { color: var(--warn); }
.metric-value.bad  { color: var(--bad); }
.progress-wrap { height: 6px; background: var(--rule-2); border-radius: 3px; overflow: hidden; margin: 4px 0; }
.progress-bar  { height: 100%; border-radius: 3px; transition: width 0.4s; }

/* ── CALLOUT ── */
.callout { background: var(--accent-pale); border-left: 2px solid var(--accent); border-radius: 0 var(--r-3) var(--r-3) 0; padding: 16px 20px; margin: 24px 0; font-size: 14px; color: var(--dim); line-height: 1.7; }

/* ── PROSE ── */
.prose h2 { font-size: 26px; margin: 40px 0 14px; color: var(--white); }
.prose h3 { font-size: 19px; font-family: var(--body); font-weight: 700; margin: 28px 0 10px; color: var(--white); letter-spacing: -0.01em; }
.prose p  { font-size: 15px; color: var(--muted); line-height: 1.8; margin-bottom: 18px; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 18px; }
.prose li { font-size: 15px; color: var(--muted); line-height: 1.7; margin-bottom: 7px; }
.prose strong { color: var(--white); font-weight: 600; }
.prose .callout { margin: 28px 0; }
.prose a { color: var(--accent-3); text-decoration: underline; text-underline-offset: 3px; }

/* ── FAQ ── */
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-q { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--white); gap: 16px; transition: color var(--t); }
.faq-q:hover { color: var(--accent-3); }
.faq-icon { font-size: 20px; color: var(--mid); transition: transform 0.2s; flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--accent-3); }
.faq-a { font-size: 14px; color: var(--muted); line-height: 1.75; padding-bottom: 18px; display: none; }
.faq-item.open .faq-a { display: block; }

/* ── CTA BAND ── */
.cta-band { background: linear-gradient(135deg, var(--ink-3) 0%, var(--ink-2) 100%); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 80px 40px; text-align: center; }
.cta-band h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 14px; }
.cta-band p  { font-size: 16px; color: var(--muted); margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto; }
.cta-band-dark { background: var(--accent); border: none; }
.cta-band-dark h2 { color: var(--white); }
.cta-band-dark p { color: rgba(255,255,255,0.75); }

/* ── DATA TABLE ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; padding: 11px 16px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mid); background: var(--ink-3); border-bottom: 1px solid var(--rule-2); }
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--rule); color: var(--muted); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--ink-3); color: var(--paper); }
.data-table .td-strong { color: var(--white); font-weight: 600; }

/* ── TESTIMONIALS ── */
.testimonial { background: var(--ink-3); border: 1px solid var(--rule-2); border-radius: var(--r-4); padding: 28px; }
.testimonial-quote { font-family: var(--display); font-size: 15px; font-style: italic; color: var(--dim); line-height: 1.75; margin-bottom: 20px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-pale); border: 1px solid rgba(79,110,247,0.3); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--accent-3); flex-shrink: 0; }
.testimonial-name { font-size: 13px; font-weight: 600; color: var(--white); }
.testimonial-biz  { font-size: 12px; color: var(--mid); }

/* ── STATS ROW ── */
.stats-row { display: flex; gap: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stat-item { flex: 1; padding: 28px 0; text-align: center; border-right: 1px solid var(--rule); }
.stat-item:last-child { border-right: none; }
.stat-num { font-family: var(--display); font-size: 36px; font-weight: 800; letter-spacing: -0.03em; color: var(--white); display: block; line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 12px; color: var(--mid); }

/* ── ARTICLE CARD ── */
.article-card { background: var(--ink-3); border: 1px solid var(--rule-2); border-radius: var(--r-4); overflow: hidden; text-decoration: none; display: block; transition: all var(--t); }
.article-card:hover { border-color: var(--rule-3); transform: translateY(-3px); }
.article-card-img { height: 160px; display: flex; align-items: center; justify-content: center; }
.article-card-body { padding: 22px; }
.article-cat { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-3); margin-bottom: 9px; }
.article-title { font-family: var(--display); font-size: 19px; letter-spacing: -0.02em; color: var(--white); line-height: 1.25; margin-bottom: 10px; font-weight: 600; }
.article-excerpt { font-size: 13px; color: var(--mid); line-height: 1.6; margin-bottom: 14px; }
.article-meta-row { font-size: 12px; color: var(--mid); display: flex; align-items: center; gap: 8px; }

/* ── BREADCRUMB ── */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mid); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumb a { color: var(--mid); transition: color var(--t); }
.breadcrumb a:hover { color: var(--accent-3); }
.breadcrumb-sep { color: var(--rule-3); }

/* ── CHECKLIST ── */
.checklist-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); cursor: pointer; }
.checklist-item:last-child { border-bottom: none; }
.check-box { width: 20px; height: 20px; border: 1.5px solid var(--rule-3); border-radius: var(--r); flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all var(--t); margin-top: 1px; }
.check-box.checked { background: var(--good); border-color: var(--good); }
.check-box.checked::after { content: ''; display: block; width: 5px; height: 9px; border: 2px solid white; border-top: none; border-left: none; transform: rotate(45deg) translateY(-1px); }
.checklist-text { font-size: 14px; color: var(--paper); line-height: 1.5; }
.checklist-text.done { text-decoration: line-through; color: var(--mid); }
.checklist-hint { font-size: 11px; color: var(--mid); margin-top: 3px; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  nav.global-nav { padding: 0 20px; }
  nav.global-nav .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .wrap, .wrap-narrow, .wrap-wide { padding: 0 20px; }
  footer.global-footer { padding: 48px 20px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .page-hero { padding: 48px 0 40px; }
  .section { padding: 56px 0; }
  .cta-band { padding: 60px 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .stats-row { flex-wrap: wrap; }
  .stat-item { min-width: 50%; border-bottom: 1px solid var(--rule); }
}
@media (max-width: 600px) {
  .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
