/* ==========================================================================
   adinand.com — studio site
   Self-hosted type, no third-party requests, no inline styles (see _headers CSP).
   ========================================================================== */

/* ---------- Type: self-hosted, latin subsets from Google Fonts (OFL) ------- */

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-latin-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens -------------------------------------------------------- */

:root {
  --paper: #F6F3EC;
  --paper-2: #FFFDF8;
  --ink: #16181F;
  --ink-2: #4E5364;
  --line: #E4DFD3;
  --accent: #2B3A8C;
  --accent-ink: #ffffff;

  --nav-h: 64px;
  --radius-card: 20px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-icon: 0 6px 18px rgba(22, 24, 31, .10);

  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --band-pad: clamp(64px, 10vw, 128px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1116;
    --paper-2: #171A21;
    --ink: #ECE9E1;
    --ink-2: #A3A7B4;
    --line: #262A34;
    --accent: #9DB0FF;
    --accent-ink: #0F1116;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-icon: 0 6px 18px rgba(0, 0, 0, .45);
  }
}

/* ---------- Reset / base -------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

@media (min-width: 760px) {
  body { font-size: 17px; }
}

h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }

a { color: inherit; }

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

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .9rem;
  font-weight: 500;
  border-radius: 0 0 10px 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- Shared type styles -------------------------------------------- */

.eyebrow {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.section__title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-top: 14px;
}

.section__sub {
  margin-top: 12px;
  color: var(--ink-2);
  max-width: 46ch;
}

.prose {
  color: var(--ink-2);
  max-width: 62ch;
}
.prose + .prose { margin-top: 1.1em; }
.section__title + .prose { margin-top: clamp(18px, 2vw, 24px); }
.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: text-decoration-color 200ms ease;
}
.prose a:hover { text-decoration-color: var(--accent); }

/* external link with a drawn arrow */
.xlink {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: color 200ms ease, text-decoration-color 200ms ease;
}
.xlink:hover { color: var(--accent); text-decoration-color: currentColor; }
.xlink__arrow {
  width: .72em;
  height: .72em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(.02em);
  transition: transform 200ms ease;
}
.xlink:hover .xlink__arrow { transform: translate(1px, calc(.02em - 1px)); }

/* ---------- Buttons ------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .98rem;
  font-weight: 500;
  letter-spacing: .005em;
  text-decoration: none;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, transform 200ms ease;
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(0, 0, 0, .06);
}
.btn--primary:hover {
  background: color-mix(in srgb, var(--accent) 94%, #000);
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover {
  border-color: var(--ink-2);
  transform: translateY(-1px);
}

/* ---------- Nav ----------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: border-color 250ms ease;
}
/* with JS, the hairline only appears once you have scrolled */
.js .nav { border-bottom-color: transparent; }
.js .nav.is-scrolled { border-bottom-color: var(--line); }

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
}
.nav__links a {
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 200ms ease;
}
.nav__links a:hover { color: var(--ink); }

@media (max-width: 519px) {
  .nav__links a { font-size: .85rem; }
  .wordmark { font-size: 1.35rem; }
}

/* ---------- Hero ---------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  padding-block: clamp(56px, 9vw, 96px) clamp(40px, 6vw, 72px);
  overflow: hidden;
}

.hero__texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, var(--ink) 1px, transparent 0);
  background-size: 24px 24px;
  opacity: .06;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 88%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 88%);
}

.hero__inner { position: relative; }

.hero__title {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6.5vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-top: 18px;
}
.hero__title em {
  /* kept whole so the accent phrase never breaks across lines */
  display: inline-block;
  font-style: italic;
  color: var(--accent);
}

.lede {
  margin-top: clamp(20px, 2.6vw, 28px);
  max-width: 56ch;
  font-size: clamp(1.02rem, 1.25vw, 1.15rem);
  line-height: 1.62;
  color: var(--ink-2);
}

.hero__actions {
  margin-top: clamp(26px, 3vw, 36px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* icon strip — four columns on phones (captions always on),
   a row with hover/focus captions from tablet up */
.iconstrip {
  margin-top: clamp(44px, 6vw, 76px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  max-width: 560px;
}
.iconstrip__item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.iconstrip__shot {
  display: block;
  transition: transform 220ms ease;
}
.iconstrip__shot img {
  width: 56px;
  height: 56px;
  border-radius: 22%;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-icon);
}
.iconstrip__item a:hover .iconstrip__shot,
.iconstrip__item a:focus-visible .iconstrip__shot { transform: translateY(-3px); }

.iconstrip__label {
  text-align: center;
  text-wrap: balance;
  font-size: .72rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: .02em;
  color: var(--ink-2);
  transition: opacity 220ms ease;
}

@media (min-width: 760px) {
  .iconstrip {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(18px, 3vw, 34px);
    max-width: none;
  }
  .iconstrip__item { position: relative; }
  .iconstrip__item a { gap: 0; }
  .iconstrip__label {
    position: absolute;
    top: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
  }
  .iconstrip__item a:hover .iconstrip__label,
  .iconstrip__item a:focus-visible .iconstrip__label { opacity: 1; }
}

/* ---------- Bands --------------------------------------------------------- */

.band {
  padding-block: var(--band-pad);
  border-top: 1px solid var(--line);
}
.band--tint {
  background: color-mix(in srgb, var(--paper-2) 62%, var(--paper));
}

/* ---------- App cards ----------------------------------------------------- */

.cards {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 2.4vw, 28px);
}
@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.card {
  --glow: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 32px);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.card:hover {
  border-color: var(--ink-2);
  transform: translateY(-2px);
}
.card--email { --glow: #2B3A8C; }
.card--docfind { --glow: #1F5FD6; }
.card--subsense { --glow: #1683E0; }
.card--sorter { --glow: #3B8AE6; }

.card__head {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 22px);
}

.card__iconwrap {
  position: relative;
  flex: none;
  width: 88px;
  height: 88px;
}
.card__iconwrap::before {
  content: "";
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 55%, var(--glow) 0%, transparent 68%);
  opacity: .18;
  filter: blur(14px);
}
.card__icon {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 22%;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-icon);
}

.card__id { min-width: 0; }

.card__name {
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.card__tagline {
  margin-top: 5px;
  font-size: .97rem;
  font-weight: 600;
  color: var(--ink);
}

.card__desc {
  margin-top: clamp(18px, 2vw, 22px);
  color: var(--ink-2);
}

.card__note {
  margin-top: 14px;
  padding-left: 13px;
  border-left: 2px solid var(--line);
  font-size: .84rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.chips {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 3px 11px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--ink-2);
}

.badges {
  margin-top: auto;
  padding-top: clamp(22px, 2.6vw, 28px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.badge {
  display: block;
  border-radius: 8px;
  transition: opacity 200ms ease;
}
.badge:hover { opacity: .85; }
.badge img { height: 44px; width: auto; }

.card__links {
  margin-top: clamp(20px, 2.4vw, 24px);
  padding-top: clamp(18px, 2vw, 20px);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

/* ---------- Principles ---------------------------------------------------- */

.principles {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 3.2vw, 40px);
}
@media (min-width: 600px) {
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .principles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.principle {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.principle__num {
  display: block;
  font-family: var(--serif);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--ink-2);
  letter-spacing: -0.01em;
}
.principle__title {
  margin-top: 16px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.principle__body {
  margin-top: 10px;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ink-2);
}

/* ---------- Studio (about + contact) -------------------------------------- */

.studio {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(44px, 6vw, 64px);
}
@media (min-width: 900px) {
  .studio { grid-template-columns: 7fr 5fr; gap: clamp(48px, 6vw, 88px); }
}

.elsewhere {
  margin-top: clamp(28px, 3vw, 36px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.elsewhere__title {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.elsewhere__list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.studio__side { min-width: 0; }
.section__title--side { margin-top: 0; }
@media (min-width: 900px) {
  /* line the Contact heading up with "About the studio", which carries an eyebrow */
  .section__title--side { margin-top: 33px; }
}
.studio__side .prose { margin-top: 18px; }

.addresses {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.addresses__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.addresses dt {
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink-2);
}
.addresses dd {
  font-size: .9rem;
}
.addresses a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: text-decoration-color 200ms ease;
}
.addresses a:hover { text-decoration-color: var(--accent); }

/* ---------- Footer -------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(32px, 4vw, 48px);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: .82rem;
  line-height: 1.55;
  color: var(--ink-2);
}
.footer__inner a {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
  transition: color 200ms ease;
}
.footer__inner a:hover { color: var(--ink); }
.footer__inner p:last-child { margin-top: 5px; }

/* ---------- 404 ----------------------------------------------------------- */

.notfound {
  min-height: calc(100vh - var(--nav-h) - 220px);
  display: flex;
  align-items: center;
  padding-block: clamp(72px, 12vw, 140px);
}
.notfound__title {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6.5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.notfound .prose { margin-top: 18px; }
.notfound .btn { margin-top: 30px; }

/* ---------- Motion -------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover, .card:hover, .iconstrip__item a:hover .iconstrip__shot { transform: none; }
}
