/* ============================================================================
   DQX Translation Project — site styles
   TypePet-inspired design, teal/dark palette
   ========================================================================== */

/* ----- Design tokens ----------------------------------------------------- */
:root {
  --cap:          #14b8a6;
  --cap-deep:     #0f766e;
  --cap-soft:     #5eead4;
  --cap-pale:     #ccfbf1;
  --ink:          #1a2332;
  --ink-soft:     #4a6375;
  --ink-faint:    #7a9ab0;
  --bg:           #f8fffe;
  --bg-alt:       #f0fdfa;
  --surface:      #ffffff;
  --line:         #b2f5ea;
  --line-strong:  #81e6d9;

  --warn-bg:      #fffbeb;
  --warn-border:  #f59e0b;
  --warn-title:   #92400e;
  --info-bg:      #f0fdfa;
  --info-border:  #14b8a6;
  --info-title:   #0f766e;
  --success-bg:   #f0fdf4;
  --success-border: #22c55e;
  --success-title:  #166534;
  --note-bg:      #f8fafc;
  --note-border:  #94a3b8;
  --note-title:   #64748b;

  --font-display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body:    "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", monospace;

  --radius:       16px;
  --radius-lg:    24px;
  --radius-sm:    10px;
  --shadow-sm:    0 2px 6px rgba(10, 50, 70, .07);
  --shadow:       0 12px 30px -12px rgba(10, 80, 70, .22);
  --shadow-lg:    0 30px 70px -28px rgba(10, 80, 70, .40);
  --maxw:         1100px;
  --gutter:       clamp(20px, 5vw, 56px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 8% -8%, rgba(94, 234, 212, .20), transparent 40%),
    radial-gradient(circle at 95% -4%, rgba(20, 184, 166, .13), transparent 38%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--cap-deep); text-decoration: none; }
a:hover { color: var(--cap); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 .4em;
  font-weight: 800;
}
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.5em; }
li { margin-bottom: .3em; }

code {
  font-family: var(--font-mono);
  font-size: .875em;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: .15em .42em;
  border-radius: 6px;
  color: var(--cap-deep);
}
pre {
  background: var(--ink);
  color: #e2e8f0;
  padding: 1.2em 1.5em;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .875em;
  line-height: 1.65;
  margin: 0 0 1.2em;
}
pre code { background: none; border: none; padding: 0; color: inherit; }

::selection { background: var(--cap-soft); color: var(--ink); }
:focus-visible { outline: 3px solid var(--cap); outline-offset: 2px; border-radius: 6px; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ----- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: .82em 1.5em;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .14s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: linear-gradient(180deg, #2dd4bf, var(--cap));
  color: #fff;
  border-color: var(--cap-deep);
  box-shadow: 0 10px 22px -10px rgba(15, 118, 110, .60), inset 0 -3px 0 rgba(8, 80, 74, .28);
}
.btn--primary:hover {
  color: #fff;
  box-shadow: 0 16px 30px -12px rgba(15, 118, 110, .72), inset 0 -3px 0 rgba(8, 80, 74, .28);
}
.btn--ghost { background: rgba(255, 255, 255, .75); }
.btn--ghost:hover { color: var(--ink); }
.btn--lg { font-size: 1.12rem; padding: .95em 1.8em; }
.btn--sm { font-size: .875rem; padding: .6em 1.1em; }
.btn svg, .btn img { width: 1.15em; height: 1.15em; }

/* ----- Header / nav ------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  background: rgba(248, 255, 254, .88);
  border-bottom: 1.5px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.is-stuck {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 68px;
  position: relative;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.22rem;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.nav__logo span { color: var(--cap-deep); }
.nav__logo:hover span { color: var(--cap); }
.nav__links {
  display: flex;
  align-items: center;
  gap: .15rem;
  margin-left: auto;
}
.nav__links a {
  color: var(--ink-soft);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: .95rem;
  padding: .48em .92em;
  border-radius: 999px;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.nav__links a:hover { color: var(--ink); background: rgba(20, 184, 166, .10); }
.nav__links a.is-active { color: var(--cap-deep); background: rgba(20, 184, 166, .13); }
.nav__actions { display: flex; align-items: center; gap: .5rem; }
.nav__toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}
.nav__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
  pointer-events: none;
}
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav__links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    padding: .8rem var(--gutter) 1rem;
    background: var(--bg);
    border-bottom: 1.5px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-130%);
    transition: transform .28s ease;
    margin-left: 0;
  }
  .nav.is-open .nav__links { transform: translateY(0); }
  .nav__links a { padding: .68em .9em; }
  .nav__actions .btn--ghost { display: none; }
  .nav__toggle { display: inline-flex; }
}

/* ----- Hero (homepage) --------------------------------------------------- */
.hero {
  padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--cap-deep);
  background: rgba(20, 184, 166, .10);
  border: 1.5px solid rgba(20, 184, 166, .30);
  padding: .5em 1em;
  border-radius: 999px;
  margin-bottom: 1.2rem;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--cap);
  border-radius: 2px;
  flex-shrink: 0;
}
.hero__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: -.025em;
  margin-bottom: .6rem;
  line-height: 1.05;
}
.hero__title .accent {
  background: linear-gradient(135deg, var(--cap), var(--cap-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__subtitle {
  font-size: clamp(1.05rem, 2.2vw, 1.22rem);
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 auto 2rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.hero__banner {
  margin: 0 auto;
  max-width: 720px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1.5px solid var(--line);
}
.hero__banner img { width: 100%; }

/* ----- Page hero (sub-pages) --------------------------------------------- */
.page-hero {
  padding: clamp(2rem, 4.5vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-display);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--cap-deep);
  background: rgba(20, 184, 166, .10);
  border: 1.5px solid rgba(20, 184, 166, .28);
  padding: .45em .95em;
  border-radius: 999px;
  margin-bottom: .9rem;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.breadcrumb:hover { background: rgba(20, 184, 166, .18); color: var(--cap-deep); }
.breadcrumb::before { content: "←"; font-size: .85em; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin-bottom: .4rem; }
.page-hero p { color: var(--ink-soft); font-size: 1.05rem; max-width: 58ch; margin: 0; }

/* ----- Jump nav ---------------------------------------------------------- */
.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 1.2rem 0;
  border-bottom: 1.5px solid var(--line);
  margin-bottom: 2.5rem;
}
.jump-nav a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .875rem;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  padding: .38em .9em;
  border-radius: 999px;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.jump-nav a:hover {
  color: var(--cap-deep);
  background: rgba(20, 184, 166, .08);
  border-color: var(--cap-soft);
}

/* ----- Section label (plain display-font alternative to eyebrow pill) ---- */
.section-label {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -.01em;
  text-transform: none;
  color: var(--cap);
  margin-bottom: .5rem;
  text-align: center;
}

/* ----- Feature cards ----------------------------------------------------- */
.features {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(3rem, 6vw, 5rem);
}
.section-header { margin-bottom: 2.5rem; text-align: center; }
.section-header h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin-bottom: .4rem; }
.section-header p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.1rem;
}
.card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--cap-soft);
}
.card__icon { font-size: 1.75rem; margin-bottom: .75rem; }
.card h3 { font-size: 1.02rem; margin-bottom: .4rem; }
.card p { color: var(--ink-soft); font-size: .91rem; margin: 0; line-height: 1.6; }

/* ----- Quick link cards -------------------------------------------------- */
.quick-links { padding: 0 0 clamp(3rem, 6vw, 5rem); }
.link-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.link-card {
  display: block;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--ink);
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.link-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--cap-soft);
  color: var(--ink);
}
.link-card__icon { font-size: 1.5rem; margin-bottom: .6rem; }
.link-card h3 { font-size: 1rem; margin-bottom: .3rem; color: var(--cap-deep); }
.link-card p { color: var(--ink-soft); font-size: .88rem; margin: 0 0 .8rem; line-height: 1.55; }
.link-card__arrow { color: var(--cap); font-size: 1.1rem; }

/* ----- Content / guide pages --------------------------------------------- */
.content-wrapper { padding: 0 0 clamp(3rem, 6vw, 5rem); }
.content { max-width: 780px; }
.content h2 {
  font-size: clamp(1.25rem, 2.8vw, 1.65rem);
  margin: 2.8rem 0 .8rem;
  scroll-margin-top: 88px;
}
.content h2:first-child { margin-top: 0; }
.content h3 { font-size: 1.08rem; margin: 1.8rem 0 .5rem; color: var(--cap-deep); }
.content a { color: var(--cap-deep); font-weight: 700; }
.content a:hover { color: var(--cap); }
.content img {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  margin: 1rem auto;
  border: 1.5px solid var(--line);
  cursor: zoom-in;
}
.img-md { max-width: 500px; }
.img-sm { max-width: 450px; }
.img-xs { max-width: 260px; }

/* ----- Callout boxes ----------------------------------------------------- */
.callout {
  border-left: 4px solid;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin: 1.4rem 0;
}
.callout--warning { background: var(--warn-bg); border-color: var(--warn-border); }
.callout--info    { background: var(--info-bg);  border-color: var(--info-border); }
.callout--success { background: var(--success-bg); border-color: var(--success-border); }
.callout--note    { background: var(--note-bg);  border-color: var(--note-border); }

.callout__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .45rem;
  display: flex;
  align-items: center;
  gap: .35em;
}
.callout--warning .callout__title { color: var(--warn-title); }
.callout--info    .callout__title { color: var(--info-title); }
.callout--success .callout__title { color: var(--success-title); }
.callout--note    .callout__title { color: var(--note-title); }

.callout p { margin: 0; font-size: .95rem; }
.callout p + p { margin-top: .55em; }
.callout ul { margin: .4em 0 0; font-size: .95rem; }
.callout li { margin-bottom: .25em; }

/* ----- Accordion (FAQ) --------------------------------------------------- */
.accordion-item {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: .65rem;
  overflow: hidden;
}
.accordion-trigger {
  width: 100%;
  background: var(--surface);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.3rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .97rem;
  color: var(--ink);
  text-align: left;
  transition: background .15s, color .15s;
}
.accordion-trigger:hover { background: var(--bg-alt); }
.accordion-trigger.is-open { color: var(--cap-deep); background: rgba(20, 184, 166, .05); }
.accordion-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .22s ease, border-color .2s;
  font-size: .7rem;
  color: var(--ink-soft);
  font-style: normal;
}
.accordion-trigger.is-open .accordion-icon {
  transform: rotate(180deg);
  border-color: var(--cap);
  color: var(--cap);
}
.accordion-body {
  display: none;
  padding: 1.1rem 1.3rem;
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.7;
}
.accordion-body.is-open { display: block; }
.accordion-body p:last-child { margin: 0; }
.accordion-body a { color: var(--cap-deep); font-weight: 700; }
.accordion-body a:hover { color: var(--cap); }
.accordion-body ul { margin-top: .4em; }

.faq-group { margin: 2.8rem 0 1rem; }
.faq-group h2 {
  font-size: 1.25rem;
  padding-bottom: .65rem;
  border-bottom: 1.5px solid var(--line);
  margin-bottom: 1rem;
  scroll-margin-top: 88px;
}

/* ----- Troubleshooting --------------------------------------------------- */
.troubleshoot-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow-sm);
}
.troubleshoot-card h3 {
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: .7rem;
  padding-bottom: .5rem;
  border-bottom: 1.5px solid var(--line);
}
.troubleshoot-card p:last-child { margin: 0; }
.troubleshoot-card a { color: var(--cap-deep); font-weight: 700; }
.troubleshoot-card a:hover { color: var(--cap); }

/* ----- API chip list ----------------------------------------------------- */
.api-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 1.2rem; }
.api-chip {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .82rem;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  padding: .35em .85em;
  border-radius: 999px;
}
.api-chip--paid { color: var(--cap-deep); border-color: var(--cap-soft); background: rgba(20, 184, 166, .06); }
.api-chip--free { color: #166534; border-color: #86efac; background: #f0fdf4; }

/* ----- Divider ----------------------------------------------------------- */
.divider {
  border: none;
  border-top: 1.5px solid var(--line);
  margin: 0;
}

/* ----- Footer ------------------------------------------------------------ */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, .72);
  padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 3rem;
  margin-bottom: 2.5rem;
}
.footer__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: .6rem;
}
.footer__logo span { color: var(--cap-soft); }
.footer__desc { font-size: .88rem; line-height: 1.65; color: rgba(255, 255, 255, .55); max-width: 28ch; }
.footer__col h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--cap-soft);
  margin-bottom: .9rem;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { margin-bottom: .55rem; }
.footer__col a {
  color: rgba(255, 255, 255, .60);
  font-size: .9rem;
  transition: color .15s;
}
.footer__col a:hover { color: var(--cap-soft); }
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 1.5rem;
  text-align: center;
}
.footer__copy { font-size: .82rem; color: rgba(255, 255, 255, .38); }
.footer__social { display: flex; gap: .9rem; }
.footer__social a { color: rgba(255, 255, 255, .45); font-size: .88rem; transition: color .15s; }
.footer__social a:hover { color: var(--cap-soft); }

/* ----- Lightbox ---------------------------------------------------------- */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .82);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  cursor: zoom-out;
}
.lightbox-overlay.is-open { display: flex; }
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 40px 80px rgba(0, 0, 0, .6);
  border: none;
  cursor: default;
}
.lightbox-close {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, .15);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background .15s;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .28); }

/* ----- Reveal animation -------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .45s ease, transform .45s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ----- Responsive -------------------------------------------------------- */
@media (max-width: 768px) {
  .footer__top { grid-template-columns: 1fr; gap: 2rem; }
  .footer__desc { max-width: none; }
  .card-grid { grid-template-columns: 1fr; }
  .link-cards { grid-template-columns: 1fr; }
  .content { max-width: 100%; }
  .hero { text-align: center; }
  .img-md, .img-sm, .img-xs { max-width: 100%; }
}
@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: center; }
  .btn--lg { width: 100%; max-width: 280px; }
}
