/* Remaini Studio, light pages. Same cobalt, mist and night as the homepage,
   no canvas and no scripts. Read mode for articles, persuade mode for offers. */

:root {
  --cobalt: #2346B8; --cobalt-ink: #1C3A9C; --night: #0D1736; --mist: #E9ECE6; --stone: #8E8C84;
  --paper: #F3F4EF; --raised: #FBFBF8; --ink: #1B2748; --ink-2: #4F5562; --ink-3: #5E6059;
  --line: rgba(27, 39, 72, .14); --line-strong: rgba(27, 39, 72, .28);
  --sans: 'Jost', 'Century Gothic', 'Avenir Next', system-ui, sans-serif;
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t: 180ms;
  /* spacing system, one set for every light page.
     Gutters: side padding on every .wrap, the header and the footer, so text
     never meets the screen edge. 24px on phones (the homepage's phone gutter),
     64px from about 1280px wide. --max is the outer width, gutters included. */
  --gutter: clamp(24px, 5vw, 64px);
  --pad: var(--gutter);
  --max: 1160px;
  --measure: 68ch;
  /* fixed steps for gaps inside components */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  /* fluid vertical rhythm between the parts of a page */
  --crumbs-top: clamp(20px, 3vw, 32px);
  --head-top: clamp(16px, 2vw, 24px);
  --head-top-solo: clamp(48px, 7vw, 88px);
  --head-bottom: clamp(32px, 4vw, 48px);
  --section-y: clamp(40px, 5vw, 64px);
  --block-y: clamp(32px, 4vw, 48px);
  --main-end: clamp(64px, 8vw, 96px);
  --heading-gap: var(--s-5);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--stone) var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; caret-color: var(--cobalt); }
::selection { background: var(--cobalt); color: var(--mist); }
img, svg { display: block; max-width: 100%; }
a { color: var(--cobalt-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: rgba(35, 70, 184, .45); transition: text-decoration-color var(--t) var(--ease-out), color var(--t) var(--ease-out); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: 12px; z-index: 50; padding: 10px 16px; background: var(--night); color: var(--mist); border-radius: 8px; transform: translateY(-160%); transition: transform var(--t) var(--ease-out); text-decoration: none; }
.skip:focus { transform: none; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
/* components that sit on a .wrap set only padding-block, never the padding
   shorthand, so the gutter above cannot be zeroed by a later rule */
.narrow { max-width: calc(var(--measure) + 2 * var(--gutter)); }

/* type */
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.5rem, 5.2vw, 4.25rem); line-height: 1.04; letter-spacing: -0.01em; color: var(--cobalt); text-wrap: balance; max-width: 22ch; }
h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.875rem, 3vw, 2.5rem); line-height: 1.12; color: var(--cobalt); text-wrap: balance; }
h3 { font-weight: 500; font-size: 20px; line-height: 1.35; color: var(--ink); }
p, li { text-wrap: pretty; }
h1, h2, h3, p, li, dd, figcaption { overflow-wrap: break-word; }
.muted { color: var(--ink-3); }
.small { font-size: 15px; line-height: 1.55; color: var(--ink-3); }
.num { font-variant-numeric: lining-nums tabular-nums; }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top .wrap { display: flex; align-items: center; gap: var(--s-6); height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--cobalt); text-decoration: none; }
.logo-word { font-weight: 300; font-size: 22px; letter-spacing: 0.06em; line-height: 1; }
.nav { display: flex; align-items: center; gap: 28px; margin-left: auto; font-size: 16px; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; transition: border-color var(--t) var(--ease-out), color var(--t) var(--ease-out); }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: currentColor; }
.menu { display: none; margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; height: 40px; padding: 0 16px; display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 20px; font-size: 15px; color: var(--ink); }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { border-color: var(--ink); }
.menu nav { position: absolute; right: 0; top: 48px; z-index: 20; min-width: 220px; padding: 8px; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(13, 23, 54, .08); display: grid; }
.menu nav a { padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.menu nav a:hover { background: var(--mist); }
@media (max-width: 860px) { .nav { display: none; } .menu { display: block; } .top .btn-outline { display: none; } }
@media (max-width: 719px) { .top .wrap { height: 64px; } .menu nav { top: 46px; } }

/* buttons */
.btn, .btn-outline { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 24px; font: 500 16px/1 var(--sans); text-decoration: none; cursor: pointer; transition: background-color var(--t) var(--ease-out), color var(--t) var(--ease-out), border-color var(--t) var(--ease-out); }
.btn { height: 48px; padding: 0 24px; border: 0; background: var(--cobalt); color: var(--mist); }
.btn:hover { background: var(--night); }
.btn:active, .btn-outline:active { transform: scale(.98); }
.btn-outline { height: 44px; padding: 0 20px; border: 1px solid var(--cobalt); color: var(--cobalt); background: transparent; }
.btn-outline:hover { background: var(--cobalt); color: var(--mist); }
.top .btn-outline { height: 40px; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }

/* page head */
.crumbs { font-size: 14px; color: var(--ink-3); padding-top: var(--crumbs-top); }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs li + li::before { content: '/'; margin-right: 8px; color: var(--stone); }
.crumbs a { color: var(--ink-3); text-decoration-color: transparent; }
.crumbs a:hover { color: var(--ink); text-decoration-color: currentColor; }
.page-head { padding-block: var(--head-top) var(--head-bottom); }
/* pages without a breadcrumb trail (contact/sent) start lower under the header */
.top + main > .page-head:first-child { padding-top: var(--head-top-solo); }
.page-head h1 + .answer, .page-head .byline + .answer { margin-top: var(--s-5); }
.page-head h1 + .small, .page-head .answer + .small { margin-top: var(--s-4); }
.answer { font-size: clamp(19px, 1.6vw, 21px); line-height: 1.6; color: var(--ink); max-width: var(--measure); }
.page-head .actions { margin-top: var(--s-6); }

/* sections */
main { padding-bottom: var(--main-end); }
.section { padding-block: var(--section-y); border-top: 1px solid var(--line); }
.section > h2, .section > .wrap > h2 { margin-bottom: var(--heading-gap); }
.flow > * + * { margin-top: 1em; }
.flow { max-width: var(--measure); }
.flow ul, .flow ol { padding-left: 1.2em; }
.flow li + li { margin-top: .4em; }
/* numbered steps on /process/: each step is a heading and a paragraph */
ol.flow > li + li { margin-top: var(--s-5); }
.flow li > h3 + p { margin-top: var(--s-1); }
.flow ul { list-style: none; padding-left: 0; }
.flow ul > li { position: relative; padding-left: 24px; }
.flow ul > li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 9px; height: 8px; border: 1px solid var(--cobalt); border-radius: 50%; }
.flow ol { list-style: decimal; }
.flow ol > li::marker { color: var(--cobalt); font-variant-numeric: tabular-nums; }

/* rows: services and the link lists */
.rows { list-style: none; padding: 0; border-top: 1px solid var(--line); max-width: 880px; }
.rows > li { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: var(--s-2) 40px; padding-block: var(--s-5); border-bottom: 1px solid var(--line); }
.rows h3 a { color: var(--cobalt); text-decoration-color: transparent; }
.rows h3 a:hover { text-decoration-color: currentColor; }
@media (max-width: 720px) { .rows > li { grid-template-columns: 1fr; } }

/* tables */
/* every table sits in .table-wrap (articles get one at render time): on small
   screens the table scrolls sideways inside it and the page never widens.
   Cells keep a readable minimum width, so wide tables scroll instead of squashing. */
.table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; margin-top: var(--s-2); }
.table-wrap td { min-width: 8rem; }
.table-wrap:focus-visible { outline-offset: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 17px; font-variant-numeric: lining-nums tabular-nums; }
caption { text-align: left; padding-bottom: 12px; color: var(--ink-3); font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: var(--s-4) 20px var(--s-4) 0; border-bottom: 1px solid var(--line); }
th:last-child, td:last-child { padding-right: 0; }
thead th { font-weight: 500; font-size: 15px; color: var(--ink-3); border-bottom-color: var(--line-strong); }
tbody th { font-weight: 500; color: var(--ink); white-space: nowrap; }
td.price, th.price { white-space: nowrap; }
tbody th a { color: var(--cobalt); }

/* package details on /pricing/ */
.pkg { padding-block: var(--block-y); border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: var(--s-4) var(--s-7); scroll-margin-top: var(--s-5); }
.pkg h3 { font-family: var(--serif); font-size: 32px; line-height: 1.1; color: var(--cobalt); }
.pkg .price { font-family: var(--serif); font-weight: 500; font-size: 44px; line-height: 1; color: var(--ink); margin-top: 12px; font-variant-numeric: lining-nums tabular-nums; }
.pkg .price small { font-family: var(--sans); font-size: 16px; color: var(--ink-3); margin-left: 6px; font-weight: 400; }
.pkg .meta { margin-top: 12px; color: var(--ink-3); }
.pkg .btn, .pkg .btn-outline { margin-top: 24px; }
@media (max-width: 760px) { .pkg { grid-template-columns: 1fr; } }

/* the offer block and the end block */
.offer { margin-block: var(--block-y); padding: var(--s-5) clamp(20px, 3vw, 28px); border: 1px solid var(--line-strong); border-radius: 12px; background: var(--raised); max-width: var(--measure); display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: baseline; }
.offer .name { font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1.15; color: var(--cobalt); }
.offer .price { font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1.15; color: var(--ink); white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.offer p { grid-column: 1 / -1; }
.offer a { grid-column: 1 / -1; justify-self: start; }
.end { margin-top: var(--s-8); padding-top: var(--block-y); border-top: 1px solid var(--line); max-width: var(--measure); }
.end h2 { font-size: clamp(1.75rem, 2.6vw, 2.25rem); margin-bottom: 12px; }
.end .actions { margin-top: var(--s-5); }

/* articles */
.byline { margin-top: 20px; font-size: 15px; color: var(--ink-3); }
.byline a { color: var(--ink); }
.prose { max-width: var(--measure); font-size: 18px; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose > p:first-child { font-size: clamp(19px, 1.6vw, 21px); line-height: 1.6; color: var(--ink); }
.prose h2 { margin-top: 2.2em; margin-bottom: -.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 24px; }
.prose ul > li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 9px; height: 8px; border: 1px solid var(--cobalt); border-radius: 50%; }
.prose ol { padding-left: 1.3em; }
.prose ol > li::marker { color: var(--cobalt); font-variant-numeric: tabular-nums; }
.prose li + li { margin-top: .4em; }
.prose blockquote { padding-left: 20px; border-left: 1px solid var(--line-strong); color: var(--ink-2); }
.prose code { font-size: .9em; background: var(--mist); padding: .1em .35em; border-radius: 4px; }
.prose pre { overflow-x: auto; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; font-size: 15px; }
.prose pre code { background: none; padding: 0; }
.prose .table-wrap { margin-top: 1.4em; }
.prose figure figcaption { margin-top: var(--s-2); font-size: 15px; color: var(--ink-3); }
.prose img { border-radius: 12px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.qa { max-width: var(--measure); }
.qa h3 { margin-top: var(--s-6); }
.qa h3:first-of-type { margin-top: 0; }
.qa p { margin-top: var(--s-2); }
.sources { max-width: var(--measure); font-size: 16px; }
.sources ol { padding-left: 1.3em; }
.sources li + li { margin-top: .5em; }
.related ul { list-style: none; padding: 0; border-top: 1px solid var(--line); max-width: var(--measure); }
.related li { padding-block: 14px; border-bottom: 1px solid var(--line); }
.related a { text-decoration-color: transparent; font-size: 18px; }
.related a:hover { text-decoration-color: currentColor; }

/* journal index and question index */
.group { padding-block: var(--block-y); border-top: 1px solid var(--line); }
.group h2 { margin-bottom: var(--s-4); scroll-margin-top: var(--s-5); }
.links { list-style: none; padding: 0; max-width: var(--measure); }
.links li { padding-block: var(--s-3); }
.links a { font-size: 19px; text-decoration-color: transparent; }
.links a:hover { text-decoration-color: currentColor; }
.links p { margin-top: var(--s-1); font-size: 16px; color: var(--ink-3); }

/* about */
.portrait { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; margin-bottom: 24px; background: var(--mist); }

/* selected work: /work/ and the block on /about/. Motion stays small: a short
   fade and rise on /work/, and a border and arrow shift on hover. */
.work-grid { list-style: none; padding: 0; display: grid; gap: 40px 32px; }
.work-large { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.work-compact { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; }
.work-card a { display: grid; gap: 16px; color: inherit; text-decoration: none; }
.work-shot { display: block; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: var(--mist); transition: border-color var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out); }
.work-shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; object-position: top; }
.work-meta { display: grid; gap: 2px; }
.work-name { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.15; color: var(--cobalt); }
.work-compact .work-name { font-family: var(--sans); font-size: 17px; line-height: 1.35; color: var(--ink); }
.work-domain { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--ink-3); }
.work-arrow { transition: transform var(--t) var(--ease-out); }
.work-card a:hover .work-shot, .work-card a:focus-visible .work-shot { border-color: var(--line-strong); box-shadow: 0 8px 24px rgba(13, 23, 54, .08); }
.work-card a:hover .work-arrow, .work-card a:focus-visible .work-arrow { transform: translate(2px, -2px); }
.work-card a:hover .work-domain { color: var(--ink); }
.work-large .work-card { animation: work-in 600ms var(--ease-out) both; animation-delay: calc(var(--i) * 60ms); }
@keyframes work-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.work-intro { max-width: var(--measure); color: var(--ink-3); margin: calc(-1 * var(--s-2)) 0 var(--s-6); }
.work-more { margin-top: var(--s-6); }
@media (max-width: 1000px) { .work-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .work-large { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .work-compact { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .work-large .work-card { animation: none; } }

/* forms */
.form { display: grid; gap: 20px; max-width: 560px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 15px; font-weight: 500; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--raised); transition: border-color var(--t) var(--ease-out); }
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-2); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 1px; border-color: var(--cobalt); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; font-size: 15px; color: var(--ink-2); }
.form-status[data-state="error"] { color: #8A2A1F; }
.form button[disabled] { opacity: .6; cursor: progress; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 48px 64px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* footer: the one night moment on a light page */
.foot { background: var(--night); color: #D5DAE6; padding-block: clamp(56px, 7vw, 80px) clamp(32px, 4vw, 40px); position: relative; overflow: hidden; }
.foot a { color: #E9ECE6; text-decoration-color: rgba(233, 236, 230, .35); }
.foot a:hover { text-decoration-color: currentColor; }
.foot :focus-visible { outline-color: #E9ECE6; }
.foot-mark { position: absolute; right: -6vw; bottom: -10vw; width: min(52vw, 640px); height: auto; color: rgba(233, 236, 230, .09); pointer-events: none; }
.foot .signoff { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.1; color: #E9ECE6; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); margin-top: clamp(40px, 5vw, 56px); position: relative; }
.foot-cols h2 { font-family: var(--sans); font-size: 15px; font-weight: 500; color: #A9B1C9; margin-bottom: 12px; line-height: 1.4; }
.foot-cols ul { list-style: none; padding: 0; display: grid; gap: 8px; font-size: 16px; }
.foot-base { margin-top: clamp(40px, 5vw, 56px); padding-top: var(--s-5); border-top: 1px solid rgba(233, 236, 230, .16); display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; font-size: 15px; color: #A9B1C9; position: relative; }
.foot-base .logo { color: #E9ECE6; }
@media (max-width: 760px) { .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* error pages */
.error-page { padding-block: var(--head-top-solo) var(--s-8); }
.error-page .links { margin-top: var(--s-6); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
@media print { .top, .foot, .end, .offer, .skip { display: none; } body { background: #fff; } }
.pkg .price small.pre { margin: 0 6px 0 0; }
.error-page .answer { margin-top: var(--s-5); }
.error-page .error-more { margin-top: var(--s-4); }
.pkg strong { font-weight: 500; color: var(--ink); }
