/* First Tier Painting: shared styles for /404, /redirect, /terms-of-use and /privacy-policy */
:root {
  --ink: #121E30;
  --elm: #1A3360;
  --quinsig: #254D8C;
  --tier: #3363AC;
  --tier-hover: #2A5698;
  --shore: #8FAAD6;
  --mist: #C9D7EC;
  --frost: #EAF0F8;
  --paper: #F5F7FB;
  --white: #FFFFFF;
  --muted: #47546B;
  --line: #D3DCEA;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --f: "Lexend", ui-sans-serif, system-ui, sans-serif;
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .16 0 0 0 -.06'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 20px; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  font-family: var(--f);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  scrollbar-color: var(--shore) var(--frost);
}
img, svg { display: block; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
h1, h2, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--tier); color: var(--white); }
:focus-visible { outline: 2px solid var(--tier); outline-offset: 3px; }
.page-dark :focus-visible, .legal-hero :focus-visible, .pg-footer :focus-visible { outline-color: var(--shore); }

.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 10; padding: 10px 16px; background: var(--ink); color: var(--white); }
.skip:focus { top: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 2px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .25s, box-shadow .25s, transform .4s var(--ease);
}
.btn-sm { min-height: 44px; padding: 9px 18px; font-size: .9375rem; }
.btn-tier { background: var(--tier); color: var(--white); }
.btn-tier:hover { background: var(--tier-hover); transform: translateY(-2px); }
.btn-outline { color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); }
.btn-outline:hover { box-shadow: inset 0 0 0 1.5px var(--white); transform: translateY(-2px); }

.page-dark { color: var(--white); background: var(--ink) var(--grain-dark); }

/* Legal pages: header and footer */
.pg-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px var(--gutter); background: var(--white); box-shadow: 0 1px 0 var(--line); }
.pg-header img { width: auto; height: 52px; }
.pg-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 22px var(--gutter); font-size: .875rem; color: var(--mist); background: var(--ink) var(--grain-dark); }
.pg-footer ul { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.pg-footer a { display: inline-block; padding-block: 8px; text-decoration: none; }
.pg-footer a:hover, .pg-footer a[aria-current="page"] { color: var(--white); text-decoration: underline; }

/* Legal pages: content */
.legal-hero { padding: clamp(40px, 7vw, 80px) var(--gutter); color: var(--white); background: var(--ink) var(--grain-dark); }
.legal-hero > div, .legal-grid { width: 100%; max-width: 1120px; margin-inline: auto; }
.legal-hero h1 { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem); font-weight: 800; line-height: 1.02; letter-spacing: -.03em; text-wrap: balance; }
.legal-hero p { margin-top: 14px; color: var(--mist); }
.legal-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; padding: clamp(36px, 6vw, 72px) var(--gutter) clamp(56px, 8vw, 96px); }
.toc { position: sticky; top: 24px; font-size: .9375rem; }
.toc h2 { margin-bottom: 10px; font-size: 1rem; font-weight: 700; }
.toc ol { display: grid; gap: 2px; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: flex; gap: 10px; padding-block: 6px; color: var(--muted); text-decoration: none; }
.toc a::before { content: counter(t); min-width: 1.4em; font-weight: 600; color: var(--tier); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--ink); }
.legal { min-width: 0; max-width: 72ch; }
.legal > p:first-child { font-size: 1.125rem; }
.legal section { margin-top: clamp(32px, 4vw, 44px); scroll-margin-top: 20px; }
.legal h2 { margin-bottom: 12px; font-size: clamp(1.3rem, 1.15rem + .5vw, 1.6rem); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }
.legal p, .legal ul { color: var(--muted); }
.legal p + p, .legal p + ul, .legal ul + p { margin-top: 12px; }
.legal ul { display: grid; gap: 8px; padding-left: 1.2em; list-style: square; }
.legal li::marker { color: var(--tier); }
.legal strong { font-weight: 600; color: var(--ink); }
.legal a { color: var(--tier); font-weight: 500; overflow-wrap: anywhere; }
.legal a:hover { color: var(--tier-hover); }
.contact-box { margin-top: 12px; padding: 18px 20px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.contact-box p { margin: 0; }

/* /redirect: digital business card */
.card-page { position: relative; grid-template-rows: 1fr; place-items: center; padding: clamp(20px, 5vh, 56px) 16px; overflow: clip; isolation: isolate; }
.card-page::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -8%;
  bottom: -10%;
  width: clamp(320px, 52vw, 720px);
  aspect-ratio: 1385 / 1376;
  background: url("/assets/logo/icon-white.webp") center / contain no-repeat;
  opacity: .05;
  rotate: -10deg;
  pointer-events: none;
}
.biz-card { width: 100%; max-width: 440px; overflow: hidden; color: var(--ink); background: var(--white); box-shadow: 0 40px 70px -32px rgba(0, 0, 0, .75); animation: card-in .9s var(--ease) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(22px) rotate(-1.2deg); } }
.biz-strip { display: grid; grid-template-columns: repeat(7, 1fr); height: 12px; }
.biz-strip i { background: var(--c); }
.biz-head { display: grid; justify-items: center; gap: 12px; padding: 26px 24px 20px; text-align: center; }
.biz-head img { width: 100%; height: auto; max-width: 250px; }
.biz-head h1 { font-size: 1.0625rem; font-weight: 500; line-height: 1.45; color: var(--muted); text-wrap: balance; }
.biz-links { border-top: 1px solid var(--line); }
.biz-links li { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.biz-link { display: flex; flex: 1; align-items: center; gap: 14px; min-width: 0; min-height: 68px; padding: 10px 18px; text-decoration: none; transition: background-color .2s; }
.biz-link:hover { background: var(--paper); }
.biz-ic { display: grid; flex: none; place-items: center; width: 44px; height: 44px; color: var(--fg, var(--white)); background: var(--c); }
.biz-ic .ic { width: 22px; height: 22px; }
.biz-text { display: grid; min-width: 0; line-height: 1.3; }
.biz-text b { font-size: .8125rem; font-weight: 500; color: var(--muted); }
.biz-text span { font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.biz-go { margin-left: auto; color: var(--tier); transition: transform .4s var(--ease); }
.biz-link:hover .biz-go { transform: translateX(3px); }
.biz-text-btn { display: flex; flex: none; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 72px; font-size: .8125rem; font-weight: 600; text-decoration: none; color: var(--white); background: var(--tier); transition: background-color .2s; }
.biz-text-btn:hover { background: var(--tier-hover); }
.biz-text-btn .ic { width: 20px; height: 20px; }
.biz-cta { display: grid; padding: 16px 18px; background: var(--paper); }
.biz-cta .btn { width: 100%; }
.biz-foot { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 18px; font-size: .875rem; color: var(--mist); background: var(--ink); }
.biz-foot i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 3px var(--mist); }

/* /404 */
.err-header { padding: 20px var(--gutter); }
.err-header img { width: auto; height: 48px; }
.err-main { position: relative; display: grid; place-items: center; padding: 24px var(--gutter) 48px; overflow: clip; isolation: isolate; }
.err-main::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -6%;
  bottom: -14%;
  width: clamp(300px, 46vw, 640px);
  aspect-ratio: 1385 / 1376;
  background: url("/assets/logo/icon-white.webp") center / contain no-repeat;
  opacity: .05;
  rotate: -10deg;
}
.err-card { display: grid; justify-items: center; gap: 18px; max-width: 820px; text-align: center; }
.err-code { font-size: clamp(5.5rem, 3rem + 10vw, 10rem); font-weight: 800; line-height: .85; letter-spacing: -.06em; color: var(--frost); }
.err-code span { color: var(--shore); }
.err-card h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); font-weight: 800; line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; }
.err-card p { max-width: 46ch; color: var(--mist); text-wrap: pretty; }
.err-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.err-foot { padding: 18px; text-align: center; font-size: .875rem; color: var(--mist); border-top: 1px solid rgba(201, 215, 236, .14); }

@media (max-width: 860px) {
  .legal-grid { grid-template-columns: 1fr; }
  .toc { position: static; padding: 18px 20px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
  .legal { max-width: none; }
}
@media (max-width: 480px) {
  .pg-header img { height: 44px; }
  .err-actions .btn { width: 100%; }
  .biz-head { padding: 22px 18px 16px; }
  .biz-link { padding-inline: 14px; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
