/* ABC Translation New Zealand
   Palette: pounamu green (NZ greenstone), ink, wax-seal red, mist, paper. */
:root {
  --ink: #14232f;
  --ink-soft: #3d4d58;
  --pounamu: #0b5d52;
  --pounamu-deep: #073f38;
  --seal: #a3262d;
  --mist: #e7efed;
  --mist-2: #d4e2de;
  --paper: #ffffff;
  --rule: #c7d6d2;
  --focus: #d99a00;
  --serif: "Spectral", "Noto Serif SC", "Songti SC", "STSong", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 72rem;
  --gap: clamp(1.25rem, 3vw, 2rem);
  --section: clamp(3rem, 7vw, 5.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}
:lang(zh-Hans) body, body:lang(zh-Hans) { line-height: 1.8; letter-spacing: .01em; }
img, svg { max-width: 100%; }
a { color: var(--pounamu); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--pounamu-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.18; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.35rem); letter-spacing: -.012em; max-width: 22ch; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.05rem); letter-spacing: -.006em; }
h3 { font-size: 1.22rem; }
:lang(zh-Hans) h1 { max-width: 18em; letter-spacing: .02em; line-height: 1.3; }
p { margin: 0 0 1em; }
ul, ol { padding: 0; margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gap); }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--paper); padding: .5rem 1rem; z-index: 50; }
.skip:focus { left: .5rem; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 1rem/1.2 var(--sans);
  padding: .9rem 1.4rem;
  border-radius: 4px;
  border: 2px solid var(--pounamu);
  background: var(--pounamu);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--pounamu-deep); border-color: var(--pounamu-deep); color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--pounamu); }
.btn-ghost:hover { background: var(--paper); color: var(--pounamu-deep); }
.btn-small { padding: .55rem 1rem; font-size: .95rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--pounamu); text-decoration: none; }
.brand:hover { text-decoration: none; }
.logo-mark { width: 2.5rem; height: 2.5rem; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--ink); }
.brand-branch { font-size: .82rem; color: var(--ink-soft); letter-spacing: .02em; }
.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav ul { list-style: none; display: flex; gap: 1.3rem; }
.site-nav ul a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.site-nav ul a:hover, .site-nav ul a[aria-current="page"] { border-bottom-color: var(--pounamu); color: var(--ink); }
.lang-switch { font-weight: 600; font-size: .95rem; text-decoration: none; padding: .35rem .6rem; border: 1px solid var(--rule); border-radius: 4px; color: var(--ink); }
.lang-switch:hover { border-color: var(--pounamu); }
.nav-toggle { display: none; font: 600 .95rem var(--sans); background: none; border: 1px solid var(--rule); border-radius: 4px; padding: .5rem .85rem; color: var(--ink); cursor: pointer; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gap) 1.25rem;
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: .8rem 0; border-bottom: 1px solid var(--mist-2); }
  .lang-switch, .site-nav .btn { margin-top: .9rem; text-align: center; justify-content: center; }
}

/* ---------- breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; font-size: .88rem; color: var(--ink-soft); }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--rule); }
.crumbs a { color: var(--ink-soft); }

/* ---------- hero (home) */
.hero, .page-hero {
  background-color: var(--mist);
  background-image: url("../img/guilloche.svg");
  background-repeat: no-repeat;
  background-position: right -12rem center;
  background-size: 46rem auto;
}
.crumbs + .page-hero { margin-top: 0; }
.crumbs { background: var(--mist); max-width: none; padding: 0; }
.crumbs ol { max-width: var(--wrap); margin: 0 auto; padding: .9rem var(--gap) 0; }
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 38em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }

/* the certified document */
.hero-doc { position: relative; min-height: 25rem; }
.sheet {
  position: absolute; background: var(--paper);
  border: 1px solid var(--mist-2);
  box-shadow: 0 1px 0 rgba(20,35,47,.04), 0 18px 40px -22px rgba(7,63,56,.45);
  padding: 1.6rem 1.5rem; display: flex; flex-direction: column; gap: .7rem;
}
.sheet-back { width: 68%; height: 78%; left: 0; top: 4%; transform: rotate(-5deg); background: #f8faf9; }
.sheet-front { width: 76%; height: 88%; right: 0; top: 8%; transform: rotate(2.5deg); }
.sheet-src { font-family: var(--serif); font-size: 1.35rem; color: var(--ink-soft); letter-spacing: .12em; }
.sheet-kicker { font-size: .78rem; color: var(--ink-soft); letter-spacing: .04em; }
.sheet-title { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; margin-bottom: .4rem; }
.line { display: block; height: .5rem; border-radius: 1px; background: var(--mist-2); }
.w40 { width: 40%; } .w50 { width: 50%; } .w60 { width: 60%; } .w65 { width: 65%; } .w70 { width: 70%; }
.w75 { width: 75%; } .w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; }
.sign { color: var(--pounamu-deep); width: 7.5rem; margin-top: auto; }
.seal {
  position: absolute; width: 10.5rem; height: 10.5rem; right: -1.6rem; bottom: -1.4rem;
  color: var(--seal); transform: rotate(-14deg); opacity: .9; mix-blend-mode: multiply;
  animation: stamp .55s cubic-bezier(.2,.9,.3,1.2) .45s both;
}
@keyframes stamp {
  0% { opacity: 0; transform: rotate(-24deg) scale(1.6); }
  70% { opacity: .95; transform: rotate(-13deg) scale(.97); }
  100% { opacity: .9; transform: rotate(-14deg) scale(1); }
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-doc { min-height: 19rem; max-width: 26rem; width: 100%; margin: 0 auto; }
  .seal { width: 8rem; height: 8rem; right: -.5rem; }
  .hero, .page-hero { background-position: right -20rem top -4rem; }
}

/* ---------- inner page hero */
.page-hero { padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(2.5rem, 5vw, 3.75rem); border-bottom: 1px solid var(--rule); }
.page-hero .lead { margin-bottom: 0; }
.region-link { margin-top: 1rem; font-size: .95rem; color: var(--ink-soft); }
.native-display { text-align: left; unicode-bidi: isolate; font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--pounamu); margin: 1rem 0 0; line-height: 1.2; }

/* ---------- sections */
.services, .regions, .faq, .langs, .doclist, .near, .values, .cols, .prose, .contact-direct, .loc-grid { margin-top: var(--section); }
.section-lead { color: var(--ink-soft); max-width: 42em; margin-bottom: 2rem; }

.svc-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 2.2rem 2.5rem; }
.svc { border-top: 2px solid var(--ink); padding-top: 1.1rem; }
.svc .ico { width: 2rem; height: 2rem; color: var(--pounamu); margin-bottom: .6rem; }
.svc h3 { margin-bottom: .4rem; }
.svc h3 a { color: var(--ink); text-decoration: none; }
.svc h3 a:hover { color: var(--pounamu); text-decoration: underline; }
.svc p { color: var(--ink-soft); margin: 0; font-size: 1rem; }

/* how it works: a real sequence, so it is numbered */
.how { margin-top: var(--section); background: var(--pounamu-deep); color: #e8f1ef; padding: var(--section) 0; }
.how h2 { color: #fff; }
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; margin-top: 1.5rem; }
.steps li { counter-increment: step; position: relative; padding-top: 3.4rem; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  font-family: var(--serif); font-size: 2.6rem; line-height: 1; color: #9fd0c5;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 1.3rem; left: 2.4rem; right: -1rem; height: 1px; background: rgba(159,208,197,.35); }
.steps h3 { color: #fff; font-size: 1.15rem; }
.steps p { margin: 0; font-size: .98rem; color: #cfe2de; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } .steps li::after { display: none; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* languages */
.lang-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.lang-chips a {
  display: inline-flex; flex-direction: column; gap: .05rem;
  padding: .6rem .95rem .55rem; border: 1px solid var(--rule); border-radius: 4px;
  text-decoration: none; color: var(--ink); background: var(--paper); min-width: 7.5rem;
}
.lang-chips a:hover { border-color: var(--pounamu); background: var(--mist); }
.lang-chips .native { font-family: var(--serif); font-size: 1.2rem; line-height: 1.3; }
.lang-chips .lname { font-size: .82rem; color: var(--ink-soft); }
.more { margin-top: 1.25rem; font-weight: 600; }

/* regions (home) */
.region-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1.6rem 2rem; }
.region-list h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.region-list h3 a { color: var(--ink); }
.region-list p { display: flex; flex-wrap: wrap; gap: .2rem .8rem; font-size: .95rem; margin: 0; }

/* locations index */
.loc-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 2rem 2.2rem; }
.loc-region { border-top: 1px solid var(--rule); padding-top: 1rem; }
.loc-region h2 { font-size: 1.3rem; }
.loc-region h2 a { color: var(--ink); }
.loc-region ul { list-style: none; display: grid; gap: .3rem; }

/* two-column content */
.cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.col-main p, .prose p { max-width: 40em; }
.prose h2 { margin-top: 2rem; font-size: 1.4rem; }
.panel { background: var(--mist); border-left: 3px solid var(--pounamu); padding: 1.4rem 1.5rem; }
.panel h2 { font-size: 1.25rem; }
.ticks { list-style: none; display: grid; gap: .6rem; }
.ticks li { position: relative; padding-left: 1.6rem; }
.ticks li::before { content: ""; position: absolute; left: .15rem; top: .55em; width: .75rem; height: .4rem; border-left: 2px solid var(--pounamu); border-bottom: 2px solid var(--pounamu); transform: rotate(-45deg); }
.ticks.plain li { padding-left: 0; }
.ticks.plain li::before { display: none; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

.two-col { columns: 2 18rem; column-gap: 3rem; list-style: none; }
.two-col li { break-inside: avoid; padding: .6rem 0; border-bottom: 1px solid var(--mist-2); }

.inline-links { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.inline-links a { font-weight: 500; }

/* values */
.value-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 2rem; }
.value-list li { border-top: 2px solid var(--ink); padding-top: 1rem; }
.value-list p { color: var(--ink-soft); margin: 0; }

/* faq */
.faq-list { border-top: 1px solid var(--rule); max-width: 50rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .3rem; top: .85rem; font: 400 1.6rem/1 var(--sans); color: var(--pounamu); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 1.1rem; color: var(--ink-soft); max-width: 44em; }
.faq details > div p { margin: 0; }

/* quote form */
.quote { margin-top: var(--section); background: var(--mist); padding: var(--section) 0; border-top: 1px solid var(--rule); }
.quote-inner { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.form-intro, .quote-direct { color: var(--ink-soft); }
.quote-form {
  background: var(--paper); padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--rule); border-top: 4px solid var(--pounamu);
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem;
}
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .95rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1px solid #9fb4af; border-radius: 4px; padding: .7rem .8rem; width: 100%;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--pounamu); outline: 3px solid rgba(11,93,82,.2); outline-offset: 0; }
.field input[type="file"] { font-size: .95rem; padding: .6rem; border: 1px dashed #9fb4af; border-radius: 4px; background: #fbfdfc; }
.field [aria-invalid="true"] { border-color: var(--seal); }
.hint { font-size: .86rem; color: var(--ink-soft); margin: 0; }
.check { flex-direction: row; align-items: flex-start; gap: .6rem; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .25rem; flex: none; accent-color: var(--pounamu); }
.check label { font-weight: 400; font-size: .92rem; color: var(--ink-soft); }
.form-status { margin: .75rem 0 0; font-weight: 500; }
.form-status.error { color: var(--seal); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 860px) { .quote-inner { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .quote-form { grid-template-columns: 1fr; } }

/* contact page */
.contact-direct dl { display: flex; flex-wrap: wrap; gap: 1rem 3rem; margin: 0 0 1rem; }
.contact-direct dt { font-size: .9rem; color: var(--ink-soft); }
.contact-direct dd { margin: 0; font-family: var(--serif); font-size: 1.35rem; }
.page-hero + .quote { margin-top: 0; border-top: 0; background: var(--paper); }

/* language suggestion banner */
.lang-hint { background: var(--pounamu-deep); color: #fff; font-size: .95rem; }
.lang-hint .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .55rem; padding-bottom: .55rem; }
.lang-hint a { color: #fff; font-weight: 600; }
.lang-hint button { background: none; border: 0; color: #cfe2de; font: inherit; cursor: pointer; padding: .25rem .5rem; }

/* footer */
.site-footer { background: var(--ink); color: #c5d0d6; margin-top: var(--section); padding: 3.5rem 0 1.5rem; font-size: .95rem; }
.site-footer a { color: #e6edf0; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2rem; }
.footer-grid h2 { font-family: var(--sans); font-size: .95rem; font-weight: 600; color: #fff; margin-bottom: .8rem; }
.footer-grid ul { list-style: none; display: grid; gap: .45rem; }
.brand-footer { color: #9fd0c5; margin-bottom: 1rem; }
.brand-footer .brand-name { color: #fff; }
.brand-footer .brand-branch { color: #9fb0b8; }
.footer-about p { max-width: 24rem; }
.footer-regions { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin-top: 2.5rem; padding-top: 1.5rem; font-size: .88rem; position: relative; }
.footer-regions::before { content: ""; position: absolute; top: 0; left: var(--gap); right: var(--gap); border-top: 1px solid #2c3d4a; }
.footer-regions a { color: #9fb0b8; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; font-size: .85rem; color: #8b9ba4; }
.footer-base p { margin: 0; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

main:has(> .quote:last-child) + .site-footer { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .seal { animation: none; }
}
@media print {
  .site-header, .site-footer, .quote, .how { display: none; }
}
