/* fonts */
@font-face{font-family:'Libre Caslon Display';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/caslon-display-400.woff2?v=2.0.2') format('woff2');unicode-range:U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+2010-2027, U+2030, U+2039-203A, U+20AC, U+2122, U+2190-2193;}
@font-face{font-family:'Libre Caslon Text';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/caslon-text-400.woff2?v=2.0.2') format('woff2');unicode-range:U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+2010-2027, U+2030, U+2039-203A, U+20AC, U+2122, U+2190-2193;}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:300;font-display:swap;src:url('fonts/hanken-300.woff2?v=2.0.2') format('woff2');unicode-range:U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+2010-2027, U+2030, U+2039-203A, U+20AC, U+2122, U+2190-2193;}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/hanken-400.woff2?v=2.0.2') format('woff2');unicode-range:U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+2010-2027, U+2030, U+2039-203A, U+20AC, U+2122, U+2190-2193;}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/hanken-500.woff2?v=2.0.2') format('woff2');unicode-range:U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+2010-2027, U+2030, U+2039-203A, U+20AC, U+2122, U+2190-2193;}
@font-face{font-family:'Noto Naskh Arabic';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/naskh-400.woff2?v=2.0.2') format('woff2');unicode-range:U+0020-0040, U+005B-0060, U+007B-007E, U+00A0, U+00AB, U+00B7, U+00BB, U+0600-06FF, U+200C-200F, U+2013-2014, U+2018-2019, U+201C-201D, U+2026, U+FD3E-FD3F;}
@font-face{font-family:'IBM Plex Sans Arabic';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/plex-arabic-400.woff2?v=2.0.2') format('woff2');unicode-range:U+0020-0040, U+005B-0060, U+007B-007E, U+00A0, U+00AB, U+00B7, U+00BB, U+0600-06FF, U+200C-200F, U+2013-2014, U+2018-2019, U+201C-201D, U+2026, U+FD3E-FD3F;}
@font-face{font-family:'Shippori Mincho';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/shippori-mincho-400.woff2?v=2.0.2') format('woff2');}
@font-face{font-family:'Noto Sans JP';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/noto-sans-jp-400.woff2?v=2.0.2') format('woff2');}
@font-face{font-family:'SPA Lang';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/lang-ar.woff2?v=2.0.2') format('woff2');unicode-range:U+0627, U+0628, U+0629, U+0631, U+0639, U+0644, U+064A;}
@font-face{font-family:'SPA Lang';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/lang-ja.woff2?v=2.0.2') format('woff2');unicode-range:U+65E5, U+672C, U+8A9E;}

/* S Private Affairs — site stylesheet. Font faces are prepended by build.py. */

:root {
  --paper: #F3EFE7;
  --paper-2: #E8E2D6;
  --ink: #161616;
  --ink-2: #34312D;
  --grey: #67625A;
  --rule: #D9D3C7;
  --rule-strong: #161616;
  --green: #1E3329;
  --on-green: #C6CEC8;
  --rule-green: #41544A;

  --f-display: 'Libre Caslon Display', 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --f-serif: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --f-sans: 'Hanken Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-latin-serif: 'Libre Caslon Text', Georgia, serif;
  --f-latin-sans: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;

  --w-body: 300;
  --lh-body: 1.72;
  --lh-h1: 1.04;
  --lh-h2: 1.1;
  --track-label: 0.2em;
  --case-label: uppercase;
  --size-label: 0.78rem;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1320px;
  --col-gap: clamp(16px, 2.2vw, 32px);
  --section: clamp(84px, 11vw, 168px);
}

:lang(ar) {
  --f-display: 'Noto Naskh Arabic', 'Libre Caslon Display', serif;
  --f-serif: 'Noto Naskh Arabic', 'Libre Caslon Text', serif;
  --f-sans: 'IBM Plex Sans Arabic', 'Hanken Grotesk', sans-serif;
  --w-body: 400;
  --lh-body: 1.95;
  --lh-h1: 1.45;
  --lh-h2: 1.5;
  --track-label: 0;
  --case-label: none;
  --size-label: 1rem;
}

:lang(ja) {
  --f-display: 'Shippori Mincho', 'Libre Caslon Display', serif;
  --f-serif: 'Shippori Mincho', 'Libre Caslon Text', serif;
  --f-sans: 'Noto Sans JP', 'Hanken Grotesk', sans-serif;
  --w-body: 400;
  --lh-body: 2;
  --lh-h1: 1.42;
  --lh-h2: 1.48;
  --track-label: 0.14em;
  --case-label: none;
  --size-label: 0.82rem;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-weight: var(--w-body);
  font-size: clamp(16px, 0.2vw + 15.2px, 17.5px);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
  overflow-wrap: break-word;
}
:lang(de) p, :lang(de) li { hyphens: auto; -webkit-hyphens: auto; }
:lang(ja) body { line-break: strict; letter-spacing: 0.03em; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-weight: 400; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 1.5px solid currentColor; outline-offset: 4px; }

.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 10; padding: 10px 16px; background: var(--ink); color: var(--paper); text-decoration: none; }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 40px; }

/* ---------- type ---------- */
.h1 {
  font-family: var(--f-display);
  font-size: clamp(2.45rem, 5.4vw + 0.4rem, 5.6rem);
  line-height: var(--lh-h1);
  letter-spacing: -0.006em;
}
:lang(ar) .h1 { font-size: clamp(2.2rem, 4.2vw + 0.5rem, 4.4rem); letter-spacing: 0; }
:lang(ja) .h1 { font-size: clamp(2rem, 3.7vw + 0.6rem, 4rem); letter-spacing: 0.08em; }

.h2 {
  font-family: var(--f-display);
  font-size: clamp(2rem, 2.6vw + 1rem, 3.5rem);
  line-height: var(--lh-h2);
  text-wrap: balance;
}
:lang(ar) .h2 { font-size: clamp(1.85rem, 2.2vw + 0.9rem, 3rem); }
:lang(ja) .h2 { font-size: clamp(1.6rem, 1.9vw + 0.9rem, 2.6rem); letter-spacing: 0.06em; }
:lang(ja) .h1, :lang(ja) .h2, :lang(ja) .service-title, :lang(ja) .ledger p, :lang(ja) .triad p, :lang(ja) .enquiry-fees { font-feature-settings: "palt"; }

.label {
  display: block;
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: var(--size-label);
  line-height: 1.5;
  letter-spacing: var(--track-label);
  text-transform: var(--case-label);
  color: var(--grey);
}
.lead { font-size: 1.16em; line-height: 1.6; color: var(--ink); }
:lang(ar) .lead, :lang(ja) .lead { line-height: 1.85; }
.muted { color: var(--grey); }
.serif { font-family: var(--f-serif); }
.latin { font-family: var(--f-latin-sans); }
.h1 .latin, .h2 .latin, .serif .latin { font-family: var(--f-latin-serif); }
.flow > * + * { margin-top: 1.1em; }

.u { text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 0.3em; transition: text-decoration-color .25s; }
.u:hover, .u[aria-current="true"] { text-decoration-color: currentColor; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 30px;
  border: 1px solid var(--ink); border-radius: 0;
  background: transparent; color: var(--ink);
  font-family: var(--f-sans); font-weight: 500; font-size: var(--size-label);
  letter-spacing: var(--track-label); text-transform: var(--case-label);
  line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .25s, color .25s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn[hidden] { display: none; }
.btn-small { min-height: 44px; padding: 0 22px; }

/* ---------- header ---------- */
.langbar { display: flex; justify-content: flex-end; gap: clamp(16px, 2vw, 26px); padding-block: 14px 0; font-size: 0.74rem; font-weight: 500; letter-spacing: 0.14em; line-height: 1.6; }
.langbar a { text-decoration: none; color: var(--grey); padding-block: 4px; }
.langbar a:hover, .langbar a[aria-current="true"] { color: var(--ink); }
.langbar a[aria-current="true"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.45em; }
.langbar a[lang="ar"], .langbar a[lang="ja"] { font-family: 'SPA Lang', var(--f-latin-sans); letter-spacing: 0; font-size: 0.86rem; font-weight: 400; }
.langbar a[lang="en"], .langbar a[lang="de"] { font-family: var(--f-latin-sans); }

.masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 18px 26px; border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); }
.seal { width: 46px; height: 46px; flex: none; color: inherit; }
.wordmark { display: flex; flex-direction: column; gap: 3px; font-family: var(--f-latin-serif); }
.wordmark b { font-weight: 400; font-size: clamp(1rem, 0.6vw + 0.82rem, 1.32rem); letter-spacing: 0.22em; line-height: 1.25; white-space: nowrap; }
.wordmark small { font-family: var(--f-sans); font-weight: 500; font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--grey); line-height: 1.4; white-space: nowrap; }
:lang(ar) .wordmark small { letter-spacing: 0; text-transform: none; font-size: 0.8rem; }
:lang(ja) .wordmark small { letter-spacing: 0.12em; font-size: 0.72rem; }
.nav { display: none; gap: clamp(22px, 2.6vw, 40px); }
.nav a { text-decoration: none; color: var(--ink); }
.nav a:hover { color: var(--grey); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(56px, 9vw, 132px); }
.hero-grid { row-gap: 36px; padding-bottom: clamp(48px, 7vw, 104px); }
.hero:not(:has(.photo-hero)) + .approach .inner { border-top: 1px solid var(--rule); }
.hero-side .lead { font-size: 1.12em; }
.hero-side .muted + .muted { margin-top: 1em; }
.hero-side .btn { margin-top: 34px; }
.hero-note { margin-top: 14px; font-size: 0.86em; color: var(--grey); }

.photo { margin: 0; background: var(--paper-2); }
.photo img { width: 100%; height: auto; }
.photo-hero { width: 100%; }
.photo-placeholder { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; color: var(--grey); }
.photo-hero .photo-placeholder { aspect-ratio: 4 / 5; }

/* ---------- sections ---------- */
.section { padding-bottom: var(--section); scroll-margin-top: 0; }
.section .inner { padding-top: var(--section); }
.section.ruled .inner { border-top: 1px solid var(--rule); }
.section-head .label, .section-body > .label { margin-bottom: 22px; }
.section-body > .h2 { margin-bottom: 36px; }
.section-head .h2 + .flow { margin-top: 36px; }
.ol-reset, .services-list { margin: 0; padding: 0; list-style: none; }

.ledger { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: clamp(56px, 7vw, 96px); }
.ledger p { padding-block: 18px; border-top: 1px solid var(--rule); font-family: var(--f-serif); font-size: clamp(1.3rem, 0.8vw + 1rem, 1.7rem); line-height: 1.35; color: var(--grey); }
.ledger p:last-child { color: var(--ink); border-top-color: var(--rule-strong); }

/* services */
.services-list { border-bottom: 1px solid var(--rule); }
.service { padding-block: clamp(34px, 4vw, 52px); border-top: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
.service-head { display: flex; align-items: baseline; gap: 18px; }
.service-no { font-family: var(--f-latin-serif); font-size: 1.05rem; color: var(--grey); min-width: 1.6em; font-variant-numeric: lining-nums; }
.service-title { font-family: var(--f-serif); font-size: clamp(1.35rem, 0.8vw + 1.05rem, 1.75rem); line-height: 1.3; }
.service-lead { color: var(--ink); font-size: 1.04em; max-width: 36em; }
.service-text { max-width: 36em; color: var(--ink-2); }
.scope { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 4px; column-gap: 28px; color: var(--ink-2); font-size: 0.95em; }
.scope li { position: relative; padding-inline-start: 18px; }
.scope li::before { content: ''; position: absolute; inset-inline-start: 0; top: 0.86em; width: 8px; height: 1px; background: var(--grey); }
:lang(ar) .scope li::before { top: 1em; }
:lang(ja) .scope li::before { top: 1em; }
.service-after { color: var(--grey); font-size: 0.95em; max-width: 36em; }

/* reach */
.triad { margin-top: 40px; }
.triad p { padding-block: 16px; border-top: 1px solid var(--rule); font-family: var(--f-serif); font-size: clamp(1.25rem, 0.7vw + 1rem, 1.6rem); line-height: 1.35; }
.triad p:last-child { border-bottom: 1px solid var(--rule); }

/* founder */
.signature { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--rule-strong); display: inline-flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: min(100%, 280px); }
.contact-img { flex: none; align-self: flex-start; height: auto; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; pointer-events: none; }
.img-name { width: auto; height: 34px; }
.img-phone, .img-email { width: auto; height: 22px; }

/* confidentiality */
.confidential { background: var(--green); color: var(--paper); }
.confidential .label { color: var(--on-green); }
.conf-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--col-gap); margin-top: clamp(48px, 6vw, 84px); }
.conf-cols p { padding-block: 20px 26px; border-top: 1px solid var(--rule-green); color: var(--on-green); }

/* enquiry */
.enquiry-fees { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--rule); font-family: var(--f-serif); font-size: clamp(1.15rem, 0.5vw + 1rem, 1.4rem); line-height: 1.45; max-width: 26em; }
:lang(ar) .enquiry-fees, :lang(ja) .enquiry-fees { line-height: 1.8; }
.contact-list { border-top: 1px solid var(--rule-strong); }
.contact-row { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 14px; padding-block: 24px; border-bottom: 1px solid var(--rule); }
.contact-row .label { margin-bottom: 2px; }
.contact-row .btn { justify-self: start; }
.contact-founder { padding-block: 26px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.contact-item { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.enquiry-avail { margin-top: 18px; max-width: 32em; }
.contact-note { margin-top: 28px; font-size: 0.86em; color: var(--grey); }

/* footer */
.site-footer { border-top: 1px solid var(--rule); padding-block: 44px 36px; font-size: 0.86rem; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.footer-brand { display: inline-flex; align-items: center; gap: 14px; }
.footer-brand .seal { width: 34px; height: 34px; }
.footer-brand .wordmark b { font-size: 0.92rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--grey); }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-copy { margin-top: 26px; color: var(--grey); font-size: 0.8rem; }
.footer-copy .latin { font-family: var(--f-latin-sans); }

/* legal pages */
.legal-main { padding-block: clamp(56px, 8vw, 112px) var(--section); }
.legal-body { max-width: 44em; }
.legal-body h1 { margin-bottom: 36px; }
.legal-body h2 { margin-top: 40px; margin-bottom: 10px; font-family: var(--f-sans); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--grey); line-height: 1.5; }
.legal-body p + p, .legal-body ul + p, .legal-body p + ul { margin-top: 0.9em; }
.legal-body ul { padding-inline-start: 1.2em; list-style: disc; }
.legal-body li + li { margin-top: 0.3em; }
.legal-note { padding: 14px 18px; background: var(--paper-2); font-size: 0.92em; margin-bottom: 8px; }
.legal-pending { margin-top: 0.9em; color: var(--grey); font-style: italic; }
:lang(ja) .legal-pending, :lang(ar) .legal-pending { font-style: normal; }
.legal-updated { margin-top: 48px !important; color: var(--grey); font-size: 0.88em; }
.legal-contact { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.legal-contact p { display: flex; flex-direction: column; gap: 6px; }
.legal-contact .btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.placeholder { background: #F1DFA6; padding: 0 4px; }
.legal-body a.u { text-decoration-color: currentColor; }
.legal-contact .label { font-size: 0.72rem; }

/* 404 */
.not-found { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 22px; padding: 48px var(--gutter); }
.not-found .seal { width: 64px; height: 64px; }

/* ---------- layout breakpoints ---------- */
@media (min-width: 640px) {
  .scope { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-row { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 24px; }
  .contact-row .btn { justify-self: end; }
}

@media (min-width: 900px) {
  .nav { display: flex; }
}

@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 0; }
  .photo-hero .photo-placeholder { aspect-ratio: 21 / 9; }

  .hero-grid { align-items: end; }
  .hero-grid .h1 { grid-column: 1 / span 8; }
  .hero-side { grid-column: 9 / span 4; padding-bottom: 0.4em; }

  .approach .section-head { grid-column: 1 / span 5; }
  .approach .section-body { grid-column: 7 / span 6; }
  .ledger { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .ledger p { border-top-color: var(--rule-strong); }

  .services .section-head { grid-column: 1 / span 5; align-self: start; position: sticky; top: 40px; }
  .services .section-head .h2 { font-size: clamp(2rem, 1.9vw + 1rem, 3rem); }
  .services .services-list { grid-column: 7 / span 6; }

  .reach { align-items: center; }
  .reach .photo { grid-column: 1 / span 5; }
  .reach .section-body { grid-column: 7 / span 6; }

  .founder .section-head, .reach-text .section-head { grid-column: 1 / span 5; }
  .founder .section-body, .reach-text .section-body { grid-column: 7 / span 6; }
  .reach-text .triad { margin-top: 44px; }

  .confidential .section-head { grid-column: 1 / span 8; }
  .conf-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .enquiry .section-head { grid-column: 1 / span 6; }
  .enquiry .contact-block { grid-column: 8 / span 5; align-self: end; }
}

@media (max-width: 959.98px) {
  .services .section-head { margin-bottom: 48px; }
  .reach .photo { margin-bottom: 8px; }
  .enquiry .contact-block { margin-top: 56px; }
}

@media (max-width: 480px) {
  .seal { width: 40px; height: 40px; }
  .brand { gap: 12px; }
  .wordmark b { letter-spacing: 0.18em; }
  .wordmark small { letter-spacing: 0.2em; font-size: 0.6rem; }
  .btn { width: 100%; }
  .contact-row .btn { width: auto; }
}

@media print {
  .langbar, .nav, .btn { display: none !important; }
  .confidential { background: none; color: var(--ink); }
  .confidential .label, .conf-cols p { color: var(--ink); }
}
