/* ABC Translation Indonesia — design system
   Palette: paper + ink navy, one stamp red. Type: Newsreader / Public Sans. */

:root {
  --paper:      #FBFAF7;
  --paper-2:    #F2EFE8;
  --white:      #FFFFFF;
  --ink:        #16253D;
  --ink-soft:   #4A5871;
  --rule:       #D9D6CE;
  --rule-soft:  #E8E5DD;
  --stamp:      #B3282D;
  --stamp-ink:  #8E1F23;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --measure: 68ch;
  --gap: 1.5rem;
  --pad: clamp(1.1rem, 4vw, 2rem);
  --section: clamp(3.25rem, 7vw, 5.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.35rem + 2.7vw, 3rem); line-height: 1.08; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.5vw, 2.15rem); }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; font-family: var(--sans); font-weight: 700; letter-spacing: 0; }
p  { margin: 0 0 1.1em; max-width: var(--measure); }
a  { color: var(--ink); text-decoration-color: var(--rule); text-underline-offset: .18em; }
a:hover { text-decoration-color: var(--stamp); }
ul, ol { padding-left: 1.15rem; }
li { margin-bottom: .4em; }
img, svg { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--gap) 0; }
strong { font-weight: 700; }

:focus-visible { outline: 2px solid var(--stamp); outline-offset: 3px; border-radius: 1px; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 var(--pad); }
.measure { max-width: var(--measure); }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper);
  padding: .7rem 1rem; z-index: 100;
}
.skip:focus { left: .5rem; top: .5rem; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.head-in { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; }
.brand { display: flex; align-items: baseline; gap: .45rem; text-decoration: none; margin-right: auto; }
.brand b { font-family: var(--serif); font-size: 1.32rem; font-weight: 600; letter-spacing: .01em; }
.brand span { font-size: .72rem; letter-spacing: .12em; color: var(--ink-soft); text-transform: uppercase; }
.brand i { display: block; width: 7px; height: 7px; background: var(--stamp); border-radius: 50%; transform: translateY(-.35em); }

.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a { font-size: .95rem; text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--stamp); }
.lang-switch {
  font-size: .8rem; letter-spacing: .06em; color: var(--ink-soft);
  text-decoration: none; border: 1px solid var(--rule); border-radius: 2px; padding: .3rem .55rem;
}
.lang-switch:hover { border-color: var(--ink); color: var(--ink); }
.nav-toggle { display: none; }

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .45rem; background: none; border: 1px solid var(--rule);
    border-radius: 2px; padding: .45rem .7rem; font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer;
  }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule); padding: .5rem var(--pad) 1.25rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid var(--rule-soft); }
  .nav .btn { margin-top: .9rem; text-align: center; }
  .nav a[aria-current="page"] { border-bottom-color: var(--rule-soft); color: var(--stamp); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font: inherit; font-weight: 600; font-size: .97rem;
  padding: .72rem 1.25rem; border-radius: 2px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); text-decoration: none; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: transparent; color: var(--stamp); border-color: var(--stamp); }
.btn-lg { padding: .9rem 1.6rem; font-size: 1.02rem; }
.btn[disabled] { opacity: .55; cursor: progress; }

/* ---------- hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 var(--section); border-bottom: 1px solid var(--rule); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero-sub { font-size: 1.1rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
@media (max-width: 900px) { .hero-in { grid-template-columns: 1fr; } .hero-doc { order: -1; } }

/* the stamped certificate */
.hero-doc { position: relative; padding: 1.5rem 1rem 2rem; }
.sheet {
  position: relative; background: var(--white); border: 1px solid var(--rule);
  padding: 1.6rem 1.5rem 2.6rem; border-radius: 1px;
  box-shadow: 0 1px 0 var(--rule-soft);
}
.sheet::before, .sheet::after {
  content: ""; position: absolute; inset: 0; background: var(--white);
  border: 1px solid var(--rule-soft); z-index: -1; border-radius: 1px;
}
.sheet::before { transform: rotate(-1.6deg) translate(-6px, 5px); }
.sheet::after  { transform: rotate(1.2deg) translate(7px, 9px); }
.sheet-head { font-family: var(--serif); font-size: 1.05rem; border-bottom: 1px solid var(--rule); padding-bottom: .55rem; margin-bottom: .9rem; }
.sheet-line { font-size: .84rem; color: var(--ink-soft); margin-bottom: 1.1rem; max-width: none; }
.ruled { display: grid; gap: .55rem; }
.ruled i { display: block; height: 1px; background: var(--rule-soft); }
.ruled i:nth-child(3n) { width: 72%; }
.ruled i:nth-child(4n) { width: 88%; }
.stamp {
  position: absolute; right: .6rem; bottom: .2rem; width: 132px; height: 132px;
  transform: rotate(-9deg); color: var(--stamp); opacity: .92;
}
.apostille-tab {
  position: absolute; left: -.55rem; top: 2.4rem; background: var(--ink); color: var(--paper);
  font-size: .68rem; letter-spacing: .14em; padding: .3rem .6rem; border-radius: 1px;
}
@media (prefers-reduced-motion: no-preference) {
  .stamp { animation: press .45s cubic-bezier(.2,.9,.3,1) .5s both; }
  @keyframes press {
    from { transform: rotate(-16deg) scale(1.7); opacity: 0; }
    to   { transform: rotate(-9deg) scale(1); opacity: .92; }
  }
}

/* ---------- sections ---------- */
.section { padding: var(--section) 0; border-bottom: 1px solid var(--rule); }
.section-tint { background: var(--paper-2); }
.section-head { margin-bottom: clamp(1.8rem, 4vw, 2.75rem); }
.section-head p { color: var(--ink-soft); max-width: 58ch; margin-bottom: 0; }

/* trust strip */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); }
.strip > div { padding: 1.5rem 1.25rem 1.5rem 0; border-right: 1px solid var(--rule); }
.strip > div:last-child { border-right: 0; }
.strip h4 { margin-bottom: .35rem; }
.strip p { font-size: .92rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 860px) { .strip { grid-template-columns: 1fr 1fr; } .strip > div:nth-child(2n) { border-right: 0; padding-right: 0; } .strip > div:nth-child(2n+1) { padding-right: 1.25rem; } }
@media (max-width: 520px) { .strip { grid-template-columns: 1fr; } .strip > div { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--rule); } .strip > div:last-child { border-bottom: 0; } }

/* service cards with a folded corner */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.card { position: relative; background: var(--paper); padding: 1.6rem 1.5rem 1.5rem; text-decoration: none; display: block; }
.card:hover { background: var(--white); }
.card h3 { font-size: 1.22rem; margin-bottom: .45rem; }
.card p { font-size: .94rem; color: var(--ink-soft); margin: 0 0 1rem; }
.card .more { font-size: .85rem; font-weight: 600; color: var(--stamp); }
.card::after {
  content: ""; position: absolute; right: 0; top: 0; width: 18px; height: 18px;
  background: linear-gradient(225deg, var(--paper-2) 50%, transparent 50%);
  border-left: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.card:hover::after { background: linear-gradient(225deg, var(--rule-soft) 50%, transparent 50%); }
.section-tint .card { background: var(--paper-2); }
.section-tint .card:hover { background: var(--paper); }

/* numbered chain — used only where content really is a sequence */
.chain { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; counter-reset: step; max-width: 46rem; }
.chain li { counter-increment: step; display: grid; grid-template-columns: 3.4rem 1fr; gap: 1.25rem; padding: 1.35rem 0; border-top: 1px solid var(--rule); margin: 0; }
.chain li:last-child { border-bottom: 1px solid var(--rule); }
.chain li::before {
  content: counter(step); font-family: var(--serif); font-size: 1.9rem; line-height: 1;
  color: var(--stamp); border-right: 1px solid var(--rule); padding-right: 1rem; text-align: right;
}
.chain h4 { margin-bottom: .3rem; }
.chain p { margin: 0; font-size: .95rem; color: var(--ink-soft); }

/* link lists: provinces, cities, languages */
.linklist { columns: 4 190px; column-gap: 2rem; list-style: none; padding: 0; margin: 0; }
.linklist li { break-inside: avoid; margin-bottom: .45rem; font-size: .95rem; }
.linklist a { text-decoration: none; border-bottom: 1px solid transparent; }
.linklist a:hover { border-bottom-color: var(--stamp); color: var(--stamp); }
.linklist small { color: var(--ink-soft); font-size: .8rem; }
.linklist-2 { columns: 2 260px; }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { margin: 0; }
.chips a {
  display: inline-block; font-size: .9rem; text-decoration: none; padding: .35rem .7rem;
  border: 1px solid var(--rule); border-radius: 2px; background: var(--paper);
}
.chips a:hover { border-color: var(--stamp); color: var(--stamp); }

/* ---------- page layout with rail ---------- */
.page { padding: 2.25rem 0 var(--section); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 20.5rem; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; } }
.rail { position: sticky; top: 5.75rem; display: grid; gap: 1.25rem; }
@media (max-width: 1000px) { .rail { position: static; } }
.rail-box { border: 1px solid var(--rule); background: var(--white); padding: 1.35rem 1.35rem 1.5rem; border-radius: 2px; }
.rail-box h3 { font-size: 1.1rem; }
.rail-box p { font-size: .92rem; color: var(--ink-soft); }
.rail-box .btn { width: 100%; text-align: center; }
.rail-meta { font-size: .85rem; color: var(--ink-soft); border-top: 1px solid var(--rule); margin-top: 1.1rem; padding-top: .9rem; }
.rail-meta a { font-weight: 600; }
.rail-list { list-style: none; padding: 0; margin: 0; font-size: .93rem; }
.rail-list li { border-bottom: 1px solid var(--rule-soft); padding: .5rem 0; margin: 0; }
.rail-list li:last-child { border-bottom: 0; }

/* breadcrumbs */
.crumbs { font-size: .82rem; color: var(--ink-soft); margin-bottom: 1.4rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 0; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; color: var(--rule); margin-right: .45rem; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--stamp); }

/* prose blocks */
.prose h2 { margin-top: 2.4rem; }
.prose h2:first-child { margin-top: 0; }
.prose > p:first-of-type { font-size: 1.1rem; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 54ch; }
.ticks { list-style: none; padding: 0; max-width: var(--measure); }
.ticks li { position: relative; padding-left: 1.65rem; margin-bottom: .6rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: .7rem; height: 1px; background: var(--stamp);
}
.facts { border-top: 1px solid var(--rule); margin: 1.5rem 0 0; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--rule-soft); padding: .55rem 0; font-size: .92rem; }
.facts dt { color: var(--ink-soft); margin: 0; }
.facts dd { margin: 0; font-weight: 600; text-align: right; }

/* faq */
.faq { border-top: 1px solid var(--rule); max-width: 48rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; padding: 1.05rem 2rem 1.05rem 0; position: relative; list-style: none;
  font-family: var(--serif); font-size: 1.14rem; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .35rem; top: 1.5rem; width: .6rem; height: .6rem;
  border-right: 1.5px solid var(--stamp); border-bottom: 1.5px solid var(--stamp);
  transform: rotate(45deg); transition: transform .15s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.75rem; }
.faq p { font-size: .97rem; color: var(--ink-soft); padding-bottom: .6rem; }

/* cta band */
.band { background: var(--ink); color: var(--paper); padding: var(--section) 0; }
.band h2 { color: var(--paper); }
.band p { color: #C6CEDC; max-width: 52ch; }
.band a { color: var(--paper); }
.band .btn { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.band .btn:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.band-in { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2.5rem; align-items: end; }
@media (max-width: 800px) { .band-in { grid-template-columns: 1fr; align-items: start; } }

/* ---------- forms ---------- */
.form { max-width: 44rem; }
.field { margin-bottom: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; gap: 0; } }
label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .4rem; }
label .opt { font-weight: 400; color: var(--ink-soft); }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: .7rem .8rem;
  border: 1px solid var(--rule); border-radius: 2px; background: var(--white); color: var(--ink);
}
textarea { min-height: 8rem; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 1.1rem) 1.25rem, calc(100% - .75rem) 1.25rem; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.2rem; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: 2px solid var(--stamp); outline-offset: 1px; }
.hint { font-size: .83rem; color: var(--ink-soft); margin: .4rem 0 0; }
.drop {
  border: 1px dashed var(--rule); background: var(--white); border-radius: 2px;
  padding: 1.35rem; text-align: center;
}
.drop.over { border-color: var(--stamp); background: var(--paper-2); }
.drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop .btn-ghost { border-color: var(--ink); }
.filelist { list-style: none; padding: 0; margin: .8rem 0 0; font-size: .88rem; text-align: left; }
.filelist li { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--rule-soft); padding: .4rem 0; }
.filelist button { background: none; border: 0; color: var(--stamp); cursor: pointer; font: inherit; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem; font-weight: 400; }
.check input { margin-top: .3rem; width: 1.05rem; height: 1.05rem; accent-color: var(--stamp); flex: none; }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: .85rem; color: var(--ink-soft); }
.alert { border-left: 3px solid var(--stamp); background: var(--white); padding: .9rem 1rem; margin-bottom: 1.5rem; font-size: .94rem; }
.alert.ok { border-left-color: #2E7D5B; }
.err { color: var(--stamp-ink); font-size: .83rem; margin-top: .35rem; display: none; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--stamp); }

/* contact detail blocks */
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-bottom: 2.5rem; }
.details > div { background: var(--paper); padding: 1.25rem; }
.details h4 { font-size: .8rem; letter-spacing: .06em; color: var(--ink-soft); font-weight: 600; margin-bottom: .35rem; }
.details p { margin: 0; font-size: .97rem; }
.details a { font-weight: 600; }

/* ---------- footer ---------- */
.site-foot { background: var(--ink); color: #C6CEDC; padding: var(--section) 0 2.5rem; font-size: .92rem; }
.site-foot a { color: #E6EAF1; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--stamp); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.site-foot h4 { color: var(--paper); font-size: .78rem; letter-spacing: .1em; margin-bottom: .9rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: .45rem; }
.site-foot .brand b { color: var(--paper); }
.site-foot .brand span { color: #8D9AB3; }
.foot-bottom {
  border-top: 1px solid #2C3C58; margin-top: 3rem; padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; font-size: .85rem; color: #8D9AB3;
}
.foot-bottom a { color: #8D9AB3; }
.foot-links { display: flex; gap: 1.5rem; margin-left: auto; }
@media (max-width: 520px) { .foot-links { margin-left: 0; } }

/* misc */
.tag { display: inline-block; font-size: .72rem; letter-spacing: .1em; color: var(--stamp); border: 1px solid currentColor; border-radius: 2px; padding: .2rem .45rem; }
.mt-0 { margin-top: 0; }
.center-narrow { max-width: 38rem; }
.hidden { display: none !important; }
