/* DigiSoft Solutions — site styles
   Palette is taken from the logo: warm grey + orchid magenta. */

/* Self-hosted fonts (latin subset) */
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/hanken-grotesk.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-italic.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono.woff2") format("woff2"); }

:root {
  --paper: #f5f1ee;
  --paper-2: #ebe5e1;
  --ink: #16121a;
  --ink-2: #221c27;
  --line: rgba(22, 18, 26, .16);
  --line-dark: rgba(245, 241, 238, .16);
  --magenta: #a53692;
  --magenta-deep: #7f2a70;
  --magenta-soft: #dc86cb;
  --muted: #5c5d62;
  --muted-dark: #aaa6ae;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(20px, 4vw, 56px);
  --max: 1280px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--magenta); color: #fff; }
:focus-visible { outline: 2px solid var(--magenta); outline-offset: 3px; border-radius: 2px; }
.dark :focus-visible { outline-color: var(--magenta-soft); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }

/* ---------- type ---------- */
.mono {
  font: 500 .75rem/1.3 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.label { color: var(--magenta-deep); display: inline-flex; gap: .9em; align-items: center; }
.label::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.dark .label { color: var(--magenta-soft); }

.display {
  font: 400 clamp(2.9rem, 8.2vw, 8rem)/.94 var(--serif);
  letter-spacing: -.025em;
  margin: 0;
}
.display em, h2 em, .big em { font-style: italic; color: var(--magenta); }
.dark .display em, .dark h2 em, .dark .big em { color: var(--magenta-soft); }

h2 {
  font: 400 clamp(2.2rem, 5vw, 4.4rem)/1 var(--serif);
  letter-spacing: -.02em;
  margin: 0;
}
h3 { font: 600 1.15rem/1.3 var(--sans); margin: 0; }
p { margin: 0; }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.55; color: var(--muted); max-width: 40em; }
.dark .lede { color: var(--muted-dark); }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s var(--ease);
  background: rgba(245, 241, 238, .86); box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.site-header.scrolled::before, .menu-open .site-header::before { opacity: 1; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 38px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); }
.nav a { text-decoration: none; font-weight: 500; font-size: .95rem; position: relative; }
.nav a:not(.pill)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: var(--magenta); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav a:not(.pill):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.pill {
  background: var(--ink); color: var(--paper) !important; padding: 10px 18px; border-radius: 100px;
  transition: background .25s, transform .25s var(--ease);
}
.pill:hover { background: var(--magenta); }

.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 0; cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s; }
.menu-btn span:nth-child(1) { top: 16px; }
.menu-btn span:nth-child(2) { top: 26px; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 76px 0 0 0; background: var(--paper); overflow-y: auto; z-index: 60;
    flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0;
    padding: 24px var(--gutter); opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .3s, transform .3s var(--ease), visibility .3s;
  }
  .menu-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav a { font: 400 2.4rem/1 var(--serif); padding: 18px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav .pill { margin-top: 28px; font: 500 1rem var(--sans); width: auto; border: 0; padding: 14px 22px; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  padding: 150px 0 clamp(40px, 7vw, 84px); overflow: hidden; isolation: isolate;
}
.hero .wrap { position: relative; z-index: 2; }
.hero .label { margin-bottom: clamp(20px, 3vw, 36px); }
.hero .display { max-width: 11.5em; }
.hero-foot {
  margin-top: clamp(32px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end;
  padding-top: 28px; border-top: 1px solid var(--line);
}
.hero-foot .lede { max-width: 34em; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: .7em; text-decoration: none; font-weight: 500;
  padding: 15px 24px; border-radius: 100px; border: 1px solid var(--ink); transition: background .25s, color .25s, border-color .25s;
}
.btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translate(3px, -3px); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--magenta); border-color: var(--magenta); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.dark .btn-solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.dark .btn-solid:hover { background: var(--magenta-soft); border-color: var(--magenta-soft); }
.dark .btn-line { border-color: var(--line-dark); color: var(--paper); }
.dark .btn-line:hover { background: var(--paper); color: var(--ink); }

.orbit {
  position: absolute; z-index: 1; right: -17vw; top: 50%; width: min(78vw, 980px); aspect-ratio: 1;
  transform: translateY(-58%); pointer-events: none;
}
.orbit svg { width: 100%; height: 100%; overflow: visible; }
.orbit .ring-a { transform-origin: 400px 400px; animation: spin 90s linear infinite; }
.orbit .ring-b { transform-origin: 400px 400px; animation: spin 140s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .hero-foot { grid-template-columns: minmax(0, 1fr); }
  .btn { padding: 14px 20px; }
  .orbit { right: -40vw; width: 130vw; top: 36%; opacity: .7; }
}

/* ---------- sections ---------- */
.section { padding: clamp(80px, 11vw, 160px) 0; }
.dark { background: var(--ink); color: var(--paper); }
.sec-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: end; margin-bottom: clamp(40px, 6vw, 80px); }
.sec-head .label { grid-column: 1 / -1; justify-self: start; color: var(--magenta-deep); }
.dark .sec-head .label { color: var(--magenta-soft); }
.sec-head p { max-width: 34em; color: var(--muted); justify-self: end; }
.dark .sec-head p { color: var(--muted-dark); }
@media (max-width: 820px) { .sec-head { grid-template-columns: 1fr; gap: 20px; } .sec-head p { justify-self: start; } }

/* services index */
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.svc-list a {
  position: relative; display: grid; grid-template-columns: 72px minmax(0, 1.1fr) minmax(0, 1fr) 48px; gap: 24px; align-items: center;
  padding: clamp(22px, 3vw, 38px) 0; border-bottom: 1px solid var(--line); text-decoration: none; isolation: isolate;
}
.svc-list a::before {
  content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); background: var(--ink); z-index: -1;
  transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--ease);
}
.svc-list a:hover::before, .svc-list a:focus-visible::before { transform: scaleY(1); }
.svc-list .n { font: 500 .8rem var(--mono); color: var(--magenta-deep); transition: color .3s; }
.svc-list .t { font: 400 clamp(1.9rem, 3.8vw, 3.4rem)/1.05 var(--serif); letter-spacing: -.015em; transition: color .3s, transform .45s var(--ease); }
.svc-list .d { color: var(--muted); font-size: 1rem; transition: color .3s; }
.svc-list .go { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; transition: background .3s, border-color .3s, transform .45s var(--ease); }
.svc-list .go svg { width: 16px; height: 16px; }
.svc-list a:hover .t, .svc-list a:focus-visible .t { color: var(--paper); transform: translateX(14px); }
.svc-list a:hover .d, .svc-list a:focus-visible .d { color: var(--muted-dark); }
.svc-list a:hover .n, .svc-list a:focus-visible .n { color: var(--magenta-soft); }
.svc-list a:hover .go, .svc-list a:focus-visible .go { background: var(--magenta); border-color: var(--magenta); color: #fff; transform: rotate(-45deg); }
@media (max-width: 820px) {
  .svc-list a { grid-template-columns: 40px 1fr 40px; gap: 14px; }
  .svc-list .d { grid-column: 2 / 3; grid-row: 2; }
  .svc-list .go { grid-row: 1 / 3; grid-column: 3; }
  .svc-list a::before { display: none; }
  .svc-list a:hover .t { color: inherit; transform: none; }
  .svc-list a:hover .d { color: var(--muted); }
}

/* statement */
.statement .big { font: 400 clamp(2rem, 5vw, 4.6rem)/1.08 var(--serif); letter-spacing: -.02em; max-width: 19em; }
.statement .by { margin-top: 36px; color: var(--muted-dark); }

/* approach */
.approach { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 100px); }
.approach .stick { position: sticky; top: 120px; align-self: start; }
.approach .stick p { margin-top: 24px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; padding: 32px 0 36px; border-top: 1px solid var(--line-dark); display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.steps li:last-child { border-bottom: 1px solid var(--line-dark); }
.steps li::before { content: counter(s, decimal-leading-zero); font: 400 2.6rem/1 var(--serif); color: var(--magenta-soft); font-style: italic; }
.steps h3 { font: 400 clamp(1.7rem, 3vw, 2.4rem)/1.1 var(--serif); margin-bottom: 10px; }
.steps p { color: var(--muted-dark); max-width: 32em; }
@media (max-width: 820px) { .approach { grid-template-columns: 1fr; } .approach .stick { position: static; } .steps li { grid-template-columns: 64px 1fr; } }

/* tech */
.tech { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.tech span { font: 400 clamp(1.4rem, 3vw, 2.6rem)/1.2 var(--serif); padding: 6px 20px 8px; border: 1px solid var(--line); border-radius: 100px; transition: background .3s, color .3s, border-color .3s; }
.tech span:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tech span:nth-child(3n+2) { font-style: italic; }

/* contact */
.contact { text-align: left; position: relative; overflow: hidden; }
.contact .mail {
  display: inline-block; font: 400 clamp(1.5rem, 4.2vw, 3.4rem)/1.1 var(--serif); letter-spacing: -.015em; text-decoration: none;
  margin-top: 28px; padding-bottom: .08em; background: linear-gradient(var(--magenta-soft), var(--magenta-soft)) 0 100% / 0 2px no-repeat; transition: background-size .6s var(--ease), color .3s;
  word-break: break-word;
}
.contact .mail:hover { background-size: 100% 2px; color: var(--magenta-soft); }
.contact-grid { margin-top: clamp(40px, 6vw, 80px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding-top: 32px; border-top: 1px solid var(--line-dark); }
.contact-grid .mono { color: var(--muted-dark); display: block; margin-bottom: 10px; }
.contact-grid address { font-style: normal; }
.copy-btn { background: none; border: 1px solid var(--line-dark); color: var(--paper); font: 500 .85rem var(--sans); padding: 8px 16px; border-radius: 100px; cursor: pointer; transition: background .25s, color .25s; }
.copy-btn:hover { background: var(--paper); color: var(--ink); }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; gap: 24px; } }

/* footer */
.site-footer { background: var(--ink); color: var(--muted-dark); padding: 0 0 36px; font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; padding-top: 28px; border-top: 1px solid var(--line-dark); }
.site-footer img { height: 30px; width: auto; filter: brightness(0) invert(1); opacity: .9; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--paper); }

/* ---------- service pages ---------- */
.page-hero { padding: 170px 0 clamp(56px, 8vw, 110px); position: relative; overflow: hidden; }
.crumbs { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); margin-bottom: 40px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--magenta-deep); }
.page-hero .display { font-size: clamp(2.8rem, 7.4vw, 7rem); max-width: 12em; }
.page-hero .lede { margin-top: clamp(28px, 4vw, 48px); }
.page-hero .num { position: absolute; right: var(--gutter); bottom: -.14em; font: italic 400 clamp(10rem, 28vw, 24rem)/1 var(--serif); color: var(--magenta); opacity: .1; pointer-events: none; user-select: none; }

.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 7vw, 120px); align-items: start; }
.covers { list-style: none; padding: 0; margin: 40px 0 0; border-top: 1px solid var(--line); }
.covers li { padding: 26px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 56px 1fr; gap: 8px; }
.covers li::before { content: "→"; font: 400 1.5rem/1.2 var(--serif); color: var(--magenta); }
.covers h3 { margin-bottom: 6px; }
.covers p { color: var(--muted); }
.aside { position: sticky; top: 110px; background: var(--ink); color: var(--paper); padding: clamp(28px, 3vw, 40px); border-radius: 4px; }
.aside h2 { font-size: clamp(1.8rem, 2.6vw, 2.4rem); margin-bottom: 14px; }
.aside p { color: var(--muted-dark); margin-bottom: 24px; font-size: .98rem; }
.aside a.mail { font: 400 1.35rem var(--serif); color: var(--magenta-soft); text-decoration: none; word-break: break-all; border-bottom: 1px solid currentColor; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .aside { position: static; } }

.more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); margin-top: 48px; }
.more a { background: var(--ink); padding: 32px; text-decoration: none; display: flex; flex-direction: column; gap: 40px; transition: background .3s; min-height: 200px; justify-content: space-between; }
.more a:hover { background: var(--ink-2); }
.more .t { font: 400 clamp(1.5rem, 2.4vw, 2.1rem)/1.1 var(--serif); }
.more .mono { color: var(--magenta-soft); }
@media (max-width: 820px) { .more { grid-template-columns: 1fr; } .more a { min-height: 0; gap: 20px; } }

/* 404 */
.nf { min-height: 100svh; display: flex; align-items: center; padding: 120px 0 60px; }

/* ---------- motion ---------- */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .rv.in { opacity: 1; transform: none; }
.hero .display .ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.js .hero .display .ln > span { display: block; transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; animation-delay: calc(.1s + var(--i) * .12s); }
@keyframes rise { to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .js .hero .display .ln > span { transform: none; animation: none; }
  .orbit .ring-a, .orbit .ring-b { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- about / faq / prose / cookie ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 7vw, 120px); align-items: start; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 28px 56px 28px 0; position: relative;
  font: 400 clamp(1.4rem, 2.6vw, 2.1rem)/1.2 var(--serif); letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; translate: 0 -50%; font: 300 2rem/1 var(--sans); color: var(--magenta);
  transition: rotate .3s var(--ease);
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding: 0 56px 30px 0; color: var(--muted); max-width: 44em; }

.prose { max-width: 760px; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin: 48px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--muted); margin-bottom: 14px; }
.prose p strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--magenta-deep); }

.contact-grid { grid-template-columns: repeat(4, 1fr); }
.contact-grid a { text-decoration: none; border-bottom: 1px solid var(--line-dark); }
.contact-grid a:hover { color: var(--magenta-soft); border-color: var(--magenta-soft); }
@media (max-width: 960px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .contact-grid { grid-template-columns: 1fr; } }

.site-footer .foot-meta { gap: 22px; }
.site-footer .foot-base { border-top: 0; padding-top: 18px; font-size: .82rem; }
.site-footer .foot-base nav { display: flex; gap: 22px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.linklike:hover { color: var(--paper); }

.cookie {
  position: fixed; z-index: 80; left: 20px; bottom: 20px; width: min(440px, calc(100vw - 40px));
  background: var(--ink); color: var(--paper); padding: 22px 24px; border-radius: 6px;
  box-shadow: 0 18px 50px rgba(22, 18, 26, .35); font-size: .92rem; line-height: 1.5;
  animation: rise-in .5s var(--ease);
}
.cookie[hidden] { display: none; }
.cookie p { color: var(--muted-dark); margin-bottom: 16px; }
.cookie strong { color: var(--paper); }
.cookie a { color: var(--magenta-soft); }
.cookie-actions { display: flex; gap: 10px; }
.cookie .btn { padding: 10px 20px; font-size: .9rem; border-color: var(--paper); font-family: var(--sans); cursor: pointer; }
.cookie .btn-solid { background: var(--paper); color: var(--ink); }
.cookie .btn-solid:hover { background: var(--magenta-soft); border-color: var(--magenta-soft); }
.cookie .btn-line { background: none; color: var(--paper); border-color: var(--line-dark); }
.cookie .btn-line:hover { background: var(--paper); color: var(--ink); }
@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } }

a[href^="tel:"] { white-space: nowrap; }
.wrap.prose { margin-left: max(var(--gutter), calc((100vw - var(--max)) / 2)); margin-right: auto; }
