/*
  ============================================================
  TOKENS
  ============================================================
*/

:root {
  --bg: #f5f5f2;
  --surface: #fdfdfb;
  --ink: #1a1c1f;
  --ink-soft: #464a50;
  --ink-faint: #71747a;
  --line: #e0dfda;
  --line-strong: #c5c4bd;

  --accent: #2c4a8a;
  --accent-ink: #ffffff;
  --accent-soft: #edf0f5;
  --status: #2f8a55;
  --danger: #b3261e;
  --grid: rgb(44 74 138 / 0.045);

  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --shell: 1160px;
  --gutter: 24px;
  --header-h: 60px;
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121315;
    --surface: #1a1c1f;
    --ink: #e9e8e4;
    --ink-soft: #b6b6b1;
    --ink-faint: #8a8a86;
    --line: #2a2c30;
    --line-strong: #3e4046;

    --accent: #9db2e6;
    --accent-ink: #0f1a33;
    --accent-soft: #1a1f2a;
    --status: #5cc488;
    --danger: #ff8a7a;
    --grid: rgb(157 178 230 / 0.045);
  }
}


/*
  ============================================================
  BASE
  ============================================================
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.shell {
  width: min(100% - var(--gutter) * 2, var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--accent-ink);
  background: var(--accent);
}

.skip-link:focus {
  top: 12px;
}


/*
  ============================================================
  HEADER
  ============================================================
*/

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-role {
  color: var(--ink-faint);
  font-size: 14px;
}

.nav {
  display: flex;
  gap: 26px;
  font-size: 15px;
}

.nav a,
.lang a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 150ms ease;
}

.nav a:hover,
.lang a:hover {
  color: var(--ink);
}

.lang {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.lang a {
  padding: 3px 10px;
  border-radius: 4px;
}

.lang a[aria-current="page"] {
  color: var(--bg);
  background: var(--ink);
}


/*
  ============================================================
  BUTTONS
  ============================================================
*/

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.button-primary {
  color: var(--accent-ink);
  background: var(--accent);
}

.button-primary:hover {
  background: color-mix(in srgb, var(--accent) 85%, var(--ink));
}

.button-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}

.button-ghost:hover {
  border-color: var(--ink);
}

.button-large {
  min-height: 54px;
  padding: 0 26px;
  font-size: 16px;
}


/*
  ============================================================
  HERO
  ============================================================
*/

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  grid-template-areas:
    "intro   offer"
    "actions offer";
  column-gap: 64px;
  row-gap: 32px;
  padding-block: 56px 72px;
  position: relative;
  isolation: isolate;
}

/* Faint design-doc grid behind the first screen */
.hero::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 90%);
}

.hero-intro {
  grid-area: intro;
  align-self: end;
}

.offer {
  grid-area: offer;
  align-self: center;
}

.hero-actions {
  grid-area: actions;
  align-self: start;
}

.status {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--ink-soft);
  font-size: 14px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  margin-top: 0.55em;
  border-radius: 2px;
  background: var(--status);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--status) 22%, transparent);
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.1vw, 52px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 em {
  display: block;
  font-style: normal;
  color: var(--accent);
}

.lead {
  max-width: 36em;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 18px;
  text-wrap: pretty;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.facts dt {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
}

.facts dd {
  color: var(--ink-faint);
  font-size: 13.5px;
}


/* Services card */

.offer {
  padding: 24px 28px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(26 28 31 / 0.04), 0 16px 36px -28px rgb(26 28 31 / 0.3);
  counter-reset: offer;
}

.offer-title {
  margin-bottom: 8px;
  color: var(--ink-faint);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.offer-list li {
  position: relative;
  padding-block: 14px;
  padding-left: 40px;
  border-top: 1px solid var(--line);
  counter-increment: offer;
}

.offer-list li::before {
  content: counter(offer, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 16.5px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
}

.offer-list li:first-child {
  border-top: 0;
}

.offer-list h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.offer-list p {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}


/*
  ============================================================
  SECTIONS — label in the margin, content on the right
  ============================================================
*/

.section {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  padding-block: 56px;
  border-top: 1px solid var(--line);
}

.section-label h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section-label p {
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 15px;
}


/* Projects */

.project {
  display: grid;
  grid-template-columns: 96px minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 8px 32px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}

.project:first-child {
  padding-top: 4px;
  border-top: 0;
}

.project-years {
  padding-top: 4px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.project h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
}

.project h3 a {
  text-decoration: none;
}

.project h3 a span {
  color: var(--ink-faint);
  font-size: 0.7em;
  transition: color 150ms ease;
}

.project h3 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.project h3 a:hover span {
  color: var(--accent);
}

.project-role {
  margin-top: 4px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
}

.project-genre {
  color: var(--ink-faint);
  font-size: 14px;
}

.project-text {
  padding-top: 4px;
  color: var(--ink-soft);
  font-size: 16px;
}


/*
  ============================================================
  CONTACT / FOOTER
  ============================================================
*/

.contact {
  padding-block: 8px 56px;
}

.contact-inner {
  padding: 38px 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--accent-soft);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 32px 56px;
}

.contact h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.contact p {
  max-width: 34em;
  margin-top: 10px;
  color: var(--ink-soft);
}

.contact .contact-meta {
  margin-top: 14px;
  color: var(--ink-faint);
  font-size: 13.5px;
}

/* Contact form (Web3Forms) */

.contact-form {
  display: grid;
  gap: 14px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-size: 16px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.field textarea::placeholder {
  color: var(--ink-faint);
}

.hp {
  position: absolute;
  left: -9999px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
}

.form-actions .button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.text-link {
  color: var(--ink-soft);
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}

.text-link:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.form-status:empty {
  display: none;
}

.form-status {
  font-size: 15px;
  font-weight: 500;
}

.form-status.is-success {
  color: var(--status);
}

.form-status.is-error {
  color: var(--danger);
}

.contact .form-note {
  margin-top: 0;
  color: var(--ink-faint);
  font-size: 13px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 48px;
  padding-block: 28px 36px;
  color: var(--ink-faint);
  font-size: 13px;
}

.disclaimer {
  max-width: 560px;
}


/*
  ============================================================
  RESPONSIVE
  ============================================================
*/

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "offer"
      "actions";
    padding-block: 40px 56px;
  }

  .section {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-block: 44px;
  }

  .contact-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 16px;
    --header-h: 56px;
  }

  body {
    font-size: 16px;
  }

  .nav,
  .brand-role {
    display: none;
  }

  .lead {
    font-size: 17px;
  }

  .offer {
    padding: 20px 20px 6px;
  }

  .project {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .project-years {
    padding-top: 0;
  }

  .project-text {
    padding-top: 8px;
  }

  .contact-inner {
    padding: 26px 22px;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .button {
    white-space: normal;
  }
}
