:root {
  color-scheme: light;

  --bg: #fbfaf7;
  --bg-alt: #f1efe8;
  --ink: #100f0d;
  --ink-soft: #58554c;
  --ink-faint: #918d80;
  --line: #ddd9cd;
  --line-strong: #100f0d;
  --accent: #ff5a1f;

  --container: 1220px;
  --edge: 32px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--edge);
}

.serif {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 440;
}

.tnum {
  font-variant-numeric: tabular-nums;
}

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line-strong);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand .mark {
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.nav-links a:hover {
  border-color: var(--ink);
}

/* ---------- Text links ---------- */

.tlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

.tlink .arrow {
  transition: transform 0.15s ease;
}

.tlink:hover .arrow {
  transform: translate(3px, -3px);
}

.tlink-muted {
  color: var(--ink-faint);
  border-color: var(--line);
}

/* ---------- Masthead / hero ---------- */

.masthead {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero {
  padding: 14px 0 100px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 18px 0 34px;
  max-width: 15ch;
}

.hero-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}

.hero .lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0;
}

.hero-actions {
  display: flex;
  gap: 32px;
  flex-shrink: 0;
}

/* ---------- Sections ---------- */

section {
  padding: 84px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 46px;
  flex-wrap: wrap;
}

.section-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 10px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0;
  font-weight: 700;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0;
  max-width: 34ch;
}

/* ---------- Work index list ---------- */

.work-list {
  border-top: 1px solid var(--line-strong);
}

.work-row {
  display: grid;
  grid-template-columns: 56px 1fr auto auto 24px;
  align-items: center;
  gap: 28px;
  padding: 30px 8px;
  border-bottom: 1px solid var(--line-strong);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}

a.work-row {
  cursor: pointer;
}

a.work-row:hover {
  background: var(--ink);
  color: var(--bg);
}

a.work-row:hover .work-tags,
a.work-row:hover .work-status.is-live {
  color: var(--bg);
}

a.work-row:hover .arrow {
  transform: translate(4px, -4px);
}

.work-num {
  font-size: 0.85rem;
  color: var(--ink-faint);
  font-weight: 600;
}

a.work-row:hover .work-num {
  color: inherit;
  opacity: 0.6;
}

.work-name {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.work-desc {
  color: var(--ink-soft);
  font-size: 0.96rem;
  margin: 0;
  max-width: 52ch;
}

a.work-row:hover .work-desc {
  color: inherit;
  opacity: 0.75;
}

.work-tags {
  font-size: 0.8rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.work-status {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.work-status.is-live {
  color: var(--accent);
}

.work-status.is-dev {
  color: var(--ink-faint);
}

.work-row .arrow {
  font-size: 1.3rem;
  transition: transform 0.15s ease;
  justify-self: end;
}

.work-row.is-disabled {
  opacity: 0.55;
}

.work-row.is-disabled:hover {
  background: none;
  color: var(--ink);
}

@media (max-width: 760px) {
  .work-row {
    grid-template-columns: 32px 1fr;
    row-gap: 10px;
  }
  .work-row .work-status,
  .work-row .arrow {
    grid-column: 2;
    justify-self: start;
  }
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 70px;
}

.statement {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.32;
  margin: 0 0 28px;
  max-width: 30ch;
}

.about-copy p.support {
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 58ch;
  margin: 0;
}

.fact-list {
  border-top: 1px solid var(--line-strong);
}

.fact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.fact .fact-num {
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.fact .fact-label {
  color: var(--ink-soft);
  font-size: 0.94rem;
  text-align: right;
}

@media (max-width: 760px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
}

/* ---------- Contact ---------- */

.contact-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  flex-wrap: wrap;
}

.contact h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.03em;
  margin: 0;
  font-weight: 700;
  max-width: 12ch;
}

.contact-meta {
  max-width: 34ch;
}

.contact-meta p {
  color: var(--ink-soft);
  margin: 0;
}

.contact-form {
  margin-top: 56px;
  max-width: 560px;
}

.contact-form .field {
  margin-bottom: 30px;
}

.contact-form label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  padding: 8px 0 12px;
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  outline: none;
  resize: vertical;
  transition: border-color 0.15s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--ink-faint);
}

.field-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.form-foot {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 8px;
}

.form-submit {
  background: none;
  border: none;
  border-bottom: 1px solid var(--ink);
  cursor: pointer;
  font-family: inherit;
}

.form-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.form-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

.form-status.is-success {
  color: var(--accent);
}

.form-status.is-error {
  color: #c0392b;
}

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

footer.site-footer {
  border-top: 1px solid var(--line-strong);
  padding: 26px 0;
}

footer.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}

footer.site-footer a {
  text-decoration: none;
  color: var(--ink-faint);
  margin-left: 22px;
}

footer.site-footer a:hover {
  color: var(--ink);
}

/* ---------- Case study page ---------- */

.cs-header {
  padding: 20px 0 60px;
}

.cs-header h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  letter-spacing: -0.035em;
  line-height: 0.98;
  font-weight: 700;
  margin: 18px 0 26px;
}

.cs-header .dek {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0;
}

.cs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  padding-top: 60px;
  border-top: 1px solid var(--line-strong);
}

.cs-meta {
  position: sticky;
  top: 90px;
  align-self: start;
}

.cs-meta .meta-block {
  margin-bottom: 30px;
}

.cs-meta .meta-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 6px;
}

.cs-meta .meta-value {
  font-size: 0.98rem;
  font-weight: 600;
}

.cs-body {
  max-width: 680px;
}

.cs-body h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 20px;
}

.cs-body > section {
  border-top: none;
  padding: 0 0 64px;
}

.cs-body p {
  color: var(--ink-soft);
  font-size: 1.03rem;
  margin: 0 0 18px;
}

.cs-body strong {
  color: var(--ink);
}

.pull {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  line-height: 1.4;
  margin: 34px 0;
  padding-left: 24px;
  border-left: 2px solid var(--accent);
  max-width: 46ch;
}

.def-list {
  border-top: 1px solid var(--line-strong);
  margin-top: 6px;
}

.def-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.def-row dt {
  font-weight: 700;
  font-size: 0.98rem;
}

.def-row dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

@media (max-width: 640px) {
  .def-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.stack-line {
  font-size: 1.02rem;
  color: var(--ink-soft);
  line-height: 1.9;
}

.stack-line b {
  color: var(--ink);
  font-weight: 600;
}

.cs-cta {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
  padding-top: 8px;
}

@media (max-width: 860px) {
  .cs-layout {
    grid-template-columns: 1fr;
  }
  .cs-meta {
    position: static;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 780px) {
  :root {
    --edge: 20px;
  }

  .nav-links {
    display: none;
  }

  section {
    padding: 56px 0;
  }

  .hero {
    padding-bottom: 64px;
  }

  .hero-row {
    align-items: flex-start;
  }
}
