@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f3f2f2;
  --surface: #eae9e9;
  --text: #201e1d;
  --muted: #605d5d;
  --rule: color-mix(in srgb, #201e1d 40%, transparent);
  --hover: #eae7e7;
  --dark-hover: #444141;
  --accent: #ec3013;
  --accent-600: #dd2b0f;
  --accent-700: #ae1800;
  --font: "Archivo", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
}

a { color: inherit; text-underline-offset: 3px; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; text-wrap: pretty; }
p { margin: 0; text-wrap: pretty; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 48px; border-bottom: 2px solid var(--rule);
}
.brand { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; text-decoration: none; }
.site-nav { display: flex; gap: 28px; align-items: center; font-size: 15px; }
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-nav .nav-login { font-weight: 600; border: 1px solid var(--rule); padding: 7px 12px; }
.site-nav .nav-login:hover { background: var(--hover); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex; justify-content: space-between; align-items: center; gap: 40px;
  padding: 15px 18px; border: 1px solid transparent; border-radius: 0;
  background: none; color: var(--text); font: 800 15px/1.2 var(--font);
  text-align: left; text-decoration: none; cursor: pointer;
}
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover { background: var(--dark-hover); }
.btn-accent { background: var(--accent); color: var(--bg); }
.btn-accent:hover { background: var(--accent-600); }
.btn-accent:active { background: var(--accent-700); }
.btn-outline { border-color: var(--rule); font-weight: 600; }
.btn-outline:hover { background: var(--hover); }
.btn-small { padding: 11px 14px; font-size: 14px; }
.btn-quiet { font-weight: 600; padding: 13px 12px; }
.btn-quiet:hover { background: var(--hover); }
.link {
  background: none; border: 0; padding: 0; cursor: pointer; color: inherit;
  font: 600 14px/1.4 var(--font); text-decoration: underline; text-underline-offset: 3px;
}

/* Grid */
.grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px;
  padding: 56px 48px 64px;
}
.rule-top { border-top: 2px solid var(--rule); }

/* Screenshots */
.shot { margin: 0; }
.shot-frame { border: 2px solid var(--text); aspect-ratio: 1179 / 2556; overflow: hidden; }
.shot-frame img { display: block; width: 100%; height: auto; }
.shot figcaption { font-size: 13px; margin-top: 8px; }

/* Home */
.hero { padding-top: 72px; align-items: start; }
.hero-copy { grid-column: 1 / span 7; display: flex; flex-direction: column; gap: 24px; }
.hero-copy h1 { font-size: 56px; letter-spacing: -0.03em; }
.lede { font-size: 24px; line-height: 1.4; font-weight: 600; max-width: 600px; }
.body-l { font-size: 20px; line-height: 1.5; max-width: 600px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-shots { grid-column: 9 / span 4; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-shots .shot:first-child { margin-top: 40px; }

.section-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 48px 48px 20px; border-top: 2px solid var(--rule);
}
.section-head h2, .how h2 { font-size: 36px; }
.work { padding-top: 0; }
.client { grid-column: 1 / span 4; border-top: 2px solid var(--text); padding-top: 16px; display: flex; flex-direction: column; gap: 16px; }
.client h3 { font-size: 36px; line-height: 1; }
.client p { font-size: 16px; }
.client-shots { grid-column: 5 / span 8; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.how h2 { grid-column: 1 / span 4; }
.how-copy { grid-column: 5 / span 8; display: flex; flex-direction: column; gap: 20px; font-size: 24px; line-height: 1.45; max-width: 760px; }
.how-copy a { font-weight: 800; }

.site-footer { padding-top: 40px; padding-bottom: 40px; align-items: end; border-top: 2px solid var(--rule); }
.footer-cta { grid-column: 1 / span 7; display: flex; flex-direction: column; gap: 14px; }
.footer-cta .big { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.footer-contact { grid-column: 9 / span 4; display: flex; flex-direction: column; gap: 6px; }
.footer-contact a:first-child { font-weight: 800; }
.footer-contact small { font-size: 13px; color: var(--muted); }

/* Privacy */
.doc { max-width: 720px; padding: 56px 48px 72px; display: flex; flex-direction: column; gap: 14px; font-size: 16px; }
.doc h1 { font-size: 44px; letter-spacing: -0.03em; }
.doc h2 { font-size: 20px; margin-top: 18px; }

/* Client portal */
.portal-main { grid-column: 1 / span 8; display: flex; flex-direction: column; gap: 40px; }
.portal-side { grid-column: 10 / span 3; display: flex; flex-direction: column; gap: 28px; padding-top: 8px; }
.page-head { display: flex; flex-direction: column; gap: 10px; }
.page-head h1, .panel-head h2 { font-size: 48px; letter-spacing: -0.03em; }
.page-head p { font-size: 18px; }
.list-title { font-size: 22px; margin-bottom: 12px; }

.invoice-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--text); }
.invoice { border-bottom: 1px solid var(--rule); }
.invoice-row { display: grid; grid-template-columns: 1fr 120px 120px; gap: 16px; align-items: center; padding: 18px 0; }
.invoice-title { display: block; font-weight: 800; font-size: 18px; }
.invoice-meta { font-size: 14px; color: var(--muted); }
.amount { font-weight: 800; font-size: 18px; text-align: right; }

.pay-panel { background: var(--surface); padding: 20px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 16px; }
.methods { border: 0; margin: 0; padding: 0; }
.methods legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 8px; }
.method { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); cursor: pointer; }
.methods legend + .method { border-top: 1px solid var(--rule); }
.method input { accent-color: var(--text); width: 18px; height: 18px; margin: 0; }
.method strong { font-weight: 600; }
.method span { font-size: 14px; color: var(--muted); }
.pay-actions { display: flex; gap: 8px; align-items: center; }

.side-block { border-top: 2px solid var(--rule); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.side-block:first-child { border-top-color: var(--text); }
.side-block h2 { font-size: 15px; letter-spacing: 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 13px; font-weight: 600; padding: 10px 12px 10px 0; border-bottom: 2px solid var(--text); }
.table td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table .num { text-align: right; }
.table td.num { font-weight: 800; }
.table .strong { font-weight: 600; }
.table form { margin: 0; }
.due-open { color: var(--accent-700); font-weight: 600; }

/* Admin */
.admin-header { padding-top: 0; padding-bottom: 0; }
.admin-header .left { display: flex; gap: 40px; align-items: center; }
.tabs { display: flex; gap: 28px; font-size: 15px; font-weight: 600; }
.tab { padding: 24px 0 21px; border-bottom: 3px solid transparent; text-decoration: none; color: var(--muted); }
.tab:hover { color: var(--text); }
.tab[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

.panel { padding: 48px; display: flex; flex-direction: column; gap: 32px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.panel-head .heading { display: flex; flex-direction: column; gap: 6px; }
.panel-head p { font-size: 16px; color: var(--muted); }

.new-invoice > summary { list-style: none; }
.new-invoice > summary::-webkit-details-marker { display: none; }
.new-invoice[open] > summary .when-closed, .new-invoice:not([open]) > summary .when-open { display: none; }
.invoice-form {
  margin-top: 16px; background: var(--surface); padding: 24px;
  display: grid; grid-template-columns: 1.2fr 1fr 2fr 1fr 1fr; gap: 16px; align-items: end;
}
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; border: 0; margin: 0; padding: 0; min-width: 0; }
.field legend { padding: 0; margin-bottom: 6px; }
.input {
  padding: 10px; border: 1px solid var(--rule); border-radius: 0; background: var(--bg);
  color: var(--text); font: 400 15px/1.3 var(--font); width: 100%;
}
.seg { display: flex; border: 1px solid var(--rule); background: var(--bg); }
.seg label { flex: 1; padding: 10px 8px; font-size: 14px; font-weight: 400; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--text); color: var(--bg); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-actions p { font-size: 14px; color: var(--muted); }

.client-name { display: block; font-weight: 800; font-size: 20px; }

.showcase-item { display: grid; grid-template-columns: 1fr 1.4fr 200px; gap: 32px; border-top: 2px solid var(--text); padding-top: 20px; }
.showcase-item .text { display: flex; flex-direction: column; gap: 10px; }
.showcase-item h3 { font-size: 24px; }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.thumbs .shot-frame { border-width: 1px; border-color: var(--rule); }
.switch { display: flex; gap: 12px; align-items: center; cursor: pointer; font-weight: 600; align-self: start; }
.switch input {
  appearance: none; width: 44px; height: 24px; margin: 0; position: relative; cursor: pointer;
  border: 2px solid var(--text); background: var(--bg); flex: none;
}
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: var(--text); }
.switch input:checked { background: var(--text); }
.switch input:checked::after { left: 22px; background: var(--bg); }

/* Small screens */
@media (max-width: 900px) {
  .site-header, .grid, .section-head, .doc, .panel { padding-left: 20px; padding-right: 20px; }
  .site-header { flex-wrap: wrap; }
  .site-nav, .tabs { gap: 16px; flex-wrap: wrap; }
  .grid > * { grid-column: 1 / -1; }
  .how h2 { grid-column: 1 / -1; }
  .hero { padding-top: 40px; }
  .hero-copy h1 { font-size: 40px; }
  .lede, .how-copy { font-size: 20px; }
  .hero-shots { max-width: 420px; }
  .client-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head h1, .panel-head h2 { font-size: 36px; }
  .invoice-row { grid-template-columns: 1fr auto; }
  .invoice-row .btn { grid-column: 1 / -1; }
  .invoice-form, .showcase-item { grid-template-columns: 1fr; }
  .admin-header .left { flex-wrap: wrap; gap: 0 24px; }
}
