@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f1ea;
  --paper: #fbf8f2;
  --ink: #1f1a16;
  --muted: #6f6559;
  --line: #d8ccba;
  --accent: #9e5f2e;
  --accent-soft: #efe4d6;
  --bg-grad-top: #fffaf2;
  --bg-grad-start: #f2ece2;
  --bg-grad-end: #f6f2eb;
  --header-bg: rgba(249, 244, 235, 0.86);
  --header-line: rgba(148, 122, 90, 0.25);
  --grain: rgba(35, 25, 14, 0.12);
  --radius: 16px;
  --shadow: 0 16px 46px rgba(24, 17, 10, 0.09);
}

html[data-theme='dark'] {
  --bg: #14110f;
  --paper: #1f1a16;
  --ink: #f5eee4;
  --muted: #c4b5a3;
  --line: #3e3328;
  --accent: #d3894a;
  --accent-soft: #2b221b;
  --bg-grad-top: #2d241d;
  --bg-grad-start: #120f0d;
  --bg-grad-end: #17120f;
  --header-bg: rgba(25, 20, 16, 0.85);
  --header-line: rgba(124, 100, 78, 0.4);
  --grain: rgba(255, 255, 255, 0.08);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(1400px 600px at 20% -10%, var(--bg-grad-top), transparent),
    linear-gradient(180deg, var(--bg-grad-start) 0%, var(--bg) 40%, var(--bg-grad-end) 100%);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

html[data-theme='dark'] a:focus-visible,
html[data-theme='dark'] button:focus-visible,
html[data-theme='dark'] input:focus-visible,
html[data-theme='dark'] textarea:focus-visible,
html[data-theme='dark'] select:focus-visible {
  outline-color: #efb273;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.2;
  background-image: radial-gradient(var(--grain) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
  z-index: -1;
}

.shell {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--header-line);
  backdrop-filter: blur(10px);
  background: var(--header-bg);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  min-height: 80px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 0;
}

.brand-mark picture {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  font-size: 0.94rem;
  color: var(--muted);
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.lang-switcher {
  display: inline-flex;
  gap: 0.4rem;
}

.header-controls {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.lang-switcher button {
  border: 1px solid var(--line);
  background: #fff8ee;
  color: var(--muted);
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
}

.lang-switcher button.active {
  border-color: var(--ink);
  color: var(--ink);
}

.theme-toggle {
  border: 1px solid var(--line);
  background: #fff8ee;
  color: var(--muted);
  padding: 0.35rem 0.65rem;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  min-height: 32px;
}

.theme-toggle::before {
  content: "";
}

html[data-theme='dark'] .theme-toggle,
html[data-theme='dark'] .lang-switcher button {
  background: #201913;
}

.hero,
.page-hero {
  padding-top: clamp(4rem, 10vw, 7rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
}

.kicker {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.display {
  margin: 0.5rem 0 0;
  max-width: 16ch;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.3rem, 8vw, 5.1rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.lead {
  margin: 1.1rem 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(1rem, 2.6vw, 1.2rem);
}

.hero-cta {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.05rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.store-cta {
  gap: 0.55rem;
  min-height: 52px;
}

.store-badge-image {
  width: 134px;
  max-width: 100%;
  height: auto;
  flex: 0 0 auto;
  display: block;
}

.store-cta-label {
  font-size: 0.82rem;
  line-height: 1.2;
}

.btn-solid {
  background: var(--ink);
  color: #fff;
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 251, 245, 0.7);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.metrics article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.metric-value {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
}

.metric-label {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head h2,
.services h2,
.split h2,
.timeline h2,
.legal-copy h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.5rem, 3.8vw, 2.3rem);
  line-height: 1.12;
}

.section-head a {
  color: var(--accent);
  font-size: 0.92rem;
}

.work-grid,
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  margin-bottom: clamp(2rem, 8vw, 5rem);
}

.work-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.work-thumb {
  display: block;
  aspect-ratio: 16/9;
  background: var(--accent-soft);
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-body {
  padding: 1rem;
}

.work-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.28rem;
}

.work-description {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.work-link {
  margin-top: 0.8rem;
  display: inline-block;
  color: var(--accent);
  font-size: 0.92rem;
}

.services {
  margin-bottom: clamp(4rem, 8vw, 6rem);
}

.service-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.service-grid article,
.card-panel,
.contact-panel,
.timeline,
.legal-copy {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1.1rem;
}

html[data-theme='dark'] .btn-solid {
  background: var(--accent);
  color: #1a130d;
}

html[data-theme='dark'] .btn-ghost {
  background: #241d18;
  color: var(--ink);
  border-color: #4a3b2e;
}

html[data-theme='dark'] .btn-disabled {
  opacity: 0.75;
}

.service-grid h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.1rem;
}

.service-grid p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.plain-list {
  margin: 0.5rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
}

.timeline {
  margin-bottom: clamp(2rem, 6vw, 4rem);
}

.timeline ol {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
}

.timeline li + li {
  margin-top: 0.7rem;
}

.step {
  margin: 0;
  font-weight: 700;
}

.timeline p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.contact-panel {
  margin-bottom: clamp(2rem, 6vw, 4rem);
}

.contact-note {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.forms-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.secure-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.secure-form h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
}

.form-copy {
  margin: 0.35rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.form-field span {
  font-size: 0.84rem;
  color: var(--muted);
}

.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 251, 243, 0.6);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.58rem 0.7rem;
}

html[data-theme='dark'] .form-field input,
html[data-theme='dark'] .form-field textarea {
  background: #221c17;
}

.form-field textarea {
  resize: vertical;
  min-height: 112px;
}

.secure-form .cf-turnstile {
  margin-top: 0.9rem;
}

.form-status {
  margin: 0.6rem 0 0;
  min-height: 1.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.form-status.is-loading::before,
.form-status.is-success::before,
.form-status.is-error::before {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.form-status.is-loading::before {
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  animation: form-spin 0.8s linear infinite;
}

.form-status.is-success {
  color: #2f8b4c;
  font-weight: 600;
}

html[data-theme='dark'] .form-status.is-success {
  color: #6fdb97;
}

.form-status.is-success::before {
  background: #2f8b4c;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35);
}

html[data-theme='dark'] .form-status.is-success::before {
  background: #6fdb97;
  box-shadow: inset 0 0 0 3px rgba(20, 17, 15, 0.5);
}

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

html[data-theme='dark'] .form-status.is-error {
  color: #ff9a84;
}

.form-status.is-error::before {
  background: #b24635;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35);
}

html[data-theme='dark'] .form-status.is-error::before {
  background: #ff9a84;
  box-shadow: inset 0 0 0 3px rgba(20, 17, 15, 0.5);
}

.secure-form[data-state='loading'] {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 24%, transparent);
}

.secure-form[data-state='success'] {
  border-color: color-mix(in srgb, #2f8b4c 45%, var(--line));
  background: color-mix(in srgb, #2f8b4c 7%, var(--paper));
}

html[data-theme='dark'] .secure-form[data-state='success'] {
  border-color: color-mix(in srgb, #6fdb97 35%, var(--line));
  background: color-mix(in srgb, #6fdb97 12%, var(--paper));
}

.secure-form button[aria-busy='true'] {
  opacity: 0.88;
  cursor: progress;
}

.secure-form button[aria-busy='true']::after {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: rgba(255, 255, 255, 0.95);
  margin-left: 0.45rem;
  animation: form-spin 0.8s linear infinite;
}

.secure-form[data-state='success'] .cf-turnstile,
.secure-form[data-state='success'] button[type='submit'] {
  display: none;
}

@keyframes form-spin {
  to {
    transform: rotate(360deg);
  }
}

.bot-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.app-hero .display {
  max-width: 22ch;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent);
}

.app-summary {
  color: var(--muted);
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.shot {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--accent-soft);
}

.shot img {
  display: block;
  width: 100%;
}

.legal-copy {
  margin-bottom: clamp(2rem, 6vw, 4rem);
}

.legal-copy h2 + div,
.legal-copy h2 + p {
  color: var(--muted);
  white-space: pre-line;
}

.legal-company-name {
  margin: 0.25rem 0 0.8rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.85rem, 5.2vw, 2.7rem);
  font-weight: 680;
  letter-spacing: 0.01em;
  color: var(--ink);
  display: inline-block;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.4rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 0.8rem;
  align-items: start;
}

.footer-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
}

.footer-sub,
.footer-copy {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-links a {
  color: var(--muted);
}

.footer-mail {
  color: var(--accent);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 940px) {
  .work-grid,
  .portfolio-grid,
  .service-grid,
  .forms-grid,
  .split,
  .footer-grid,
  .shot-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .nav-wrap {
    min-height: auto;
    padding: 0.72rem 0 0.78rem;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand controls"
      "nav nav";
    row-gap: 0.72rem;
    column-gap: 0.75rem;
    align-items: center;
  }

  .brand {
    grid-area: brand;
    min-width: 0;
  }

  .brand-text {
    font-size: 1.08rem;
  }

  .site-nav {
    grid-area: nav;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: nowrap;
    gap: 0.5rem;
    justify-content: flex-start;
    padding-bottom: 0.1rem;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.46rem 0.78rem;
    line-height: 1;
    background: color-mix(in srgb, var(--paper) 86%, transparent);
    border-bottom-width: 1px;
  }

  .site-nav a.active,
  .site-nav a:hover {
    border-bottom-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
  }

  .header-controls {
    grid-area: controls;
    justify-self: end;
    align-self: center;
    gap: 0.38rem;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(1120px, 94vw);
  }

  .display {
    max-width: 100%;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .store-cta {
    justify-content: flex-start;
  }

  .store-badge-image {
    width: 122px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-controls {
    gap: 0.34rem;
  }

  .lang-switcher {
    gap: 0.32rem;
  }

  .lang-switcher button,
  .theme-toggle {
    min-height: 34px;
    padding: 0.35rem 0.58rem;
    border-radius: 11px;
    font-size: 0.86rem;
  }

  .theme-toggle {
    width: 34px;
    min-width: 34px;
    padding: 0;
    position: relative;
    font-size: 0;
    line-height: 0;
    color: transparent;
  }

  .theme-toggle::before {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    line-height: 1;
    color: var(--ink);
  }

  .theme-toggle[data-theme-current='dark']::before {
    content: "☾";
  }

  .theme-toggle[data-theme-current='light']::before {
    content: "☼";
  }

  .theme-toggle[data-theme-current='system']::before {
    content: "◐";
  }
}

@media (max-width: 520px) {
  .site-header {
    position: static;
  }

  .nav-wrap {
    row-gap: 0.64rem;
  }

  .brand {
    font-size: 0.94rem;
    gap: 0.55rem;
  }

  .brand-mark {
    width: 34px;
  }

  .site-nav a {
    font-size: 0.84rem;
    padding: 0.43rem 0.7rem;
  }

  .metric-value {
    font-size: 1.8rem;
  }

  .service-grid article,
  .card-panel,
  .contact-panel,
  .timeline,
  .legal-copy,
  .metrics article,
  .work-body {
    padding: 0.9rem;
  }
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  max-width: 720px;
}

.empty-state h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.16;
}

.empty-state p {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.empty-state-coming .empty-state-cta {
  margin-top: 1rem;
}

.home-featured .empty-state {
  margin-bottom: clamp(2rem, 7vw, 4rem);
}
