/* carterlong.net and rentals.carterlong.net share this file.

   One dark theme, on purpose. The screenshots are the colour on these pages,
   so the frame around them stays neutral: no accent hue, one serif italic for
   a single word in the headline, everything else Atkinson Hyperlegible Next.

   Shape rule: pills for anything you press, 20px for cards and frames, 12px
   for inputs. Written phone-first; the wider layouts are the overrides. */

@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/assets/fonts/atkinson-next-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('/assets/fonts/newsreader-italic-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0e0e0f;
  --surface: #161617;
  --surface-2: #1e1e20;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f2ef;
  --muted: #a3a3a8;
  --faint: #8e8e94;
  --ink: #0e0e0f;
  --danger: #ff9d8a;
  --ok: #9fe0b4;

  --sans: 'Atkinson Hyperlegible Next', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;

  --gutter: 20px;
  --max: 1180px;
  --r-card: 20px;
  --r-input: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Room for the floating nav on phones, so it never covers the footer. */
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

/* A lift of light at the very top, behind the headline. Fixed to the page,
   not the viewport, so it scrolls away with the hero. */
body::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 900px;
  background: radial-gradient(80% 60% at 50% 0%, rgba(255, 255, 255, 0.07), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; text-wrap: pretty; }
h1, h2 { margin: 0; font-weight: 500; }
ul, dl, dd { margin: 0; padding: 0; }
button, input, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

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

.ico {
  width: 1em; height: 1em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ------------------------------------------------------------------ top */

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px 0;
}

.who { text-decoration: none; line-height: 1.25; }
.who b { display: block; font-weight: 500; font-size: 1rem; }
.who span { display: block; color: var(--muted); font-size: 0.8125rem; }

.ext {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; margin-top: -10px;
  font-size: 0.9375rem; text-decoration: none; color: var(--text);
}
.ext .ico { transition: transform 0.3s var(--ease); }
.ext:hover .ico { transform: translate(2px, -2px); }

/* The one piece of fixed chrome. Bottom of the screen on a phone, where a
   thumb already is; top centre once there's room for it. */
.pill {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(30, 30, 32, 0.82);
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}
.pill a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  border-radius: 999px;
  font-size: 0.9375rem; font-weight: 500;
  color: var(--muted); text-decoration: none; white-space: nowrap;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.pill a:hover { color: var(--text); }
.pill a[aria-current='true'] { background: rgba(255, 255, 255, 0.1); color: var(--text); }

@media (prefers-reduced-transparency: reduce) {
  .pill { background: var(--surface-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

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

.hero { padding-block: 64px 56px; }

.hero h1 {
  font-size: clamp(2.5rem, 9.4vw, 5.25rem);
  line-height: 1.04;
  letter-spacing: -0.028em;
  font-weight: 500;
  max-width: 15ch;
  text-wrap: balance;
}
.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  /* The serif sits a touch small beside the sans at the same size. */
  font-size: 1.06em;
  padding-right: 0.04em;
}
.hero--wide h1 { max-width: 13.6em; }

.hero .sub {
  margin-top: 28px;
  max-width: 36ch;
  font-size: 1.125rem;
  line-height: 1.45;
  font-weight: 500;
}
.hero .sub span { display: block; color: var(--muted); font-weight: 400; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 30px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px;
  border: 0; border-radius: 999px;
  background: var(--text); color: var(--ink);
  font-size: 1rem; font-weight: 500; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
}
.btn:hover { background: #fff; }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.6; cursor: default; }

.more {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px;
  color: var(--text); text-decoration: none; font-weight: 500;
}
.more .ico { transition: transform 0.3s var(--ease); }
.more:hover .ico { transform: translateY(3px); }

/* ----------------------------------------------------------------- work */

.work { display: grid; gap: 18px; }

.case {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.case-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  padding: 22px 20px 20px;
}
.case-head h2 { font-size: 1.375rem; letter-spacing: -0.015em; line-height: 1.2; }
.case-head h2 a { text-decoration: none; }
/* The whole card is the link, without wrapping the card in an anchor. */
.case-head h2 a::after { content: ''; position: absolute; inset: 0; z-index: 2; }
.case-head p { grid-column: 1 / -1; color: var(--muted); max-width: 58ch; }

.go {
  grid-column: 2; grid-row: 1;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 1.125rem;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.case:hover .go { background: var(--text); color: var(--ink); transform: rotate(-45deg); }

.tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin-top: 10px; }
.tags li {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.8125rem; color: var(--muted); line-height: 1.4;
}
.tags li.solid { background: var(--text); color: var(--ink); border-color: var(--text); font-weight: 500; }

/* The stage: a desktop capture in a browser frame with the phone capture
   standing in front of it. Both are real screenshots of the live site. */
.stage {
  position: relative;
  padding: 0 14px 0 14px;
  margin-top: 4px;
}
.browser {
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  background: #2a2a2d;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.browser-bar {
  display: flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  background: linear-gradient(#3a3a3d, #2c2c2f);
}
.browser-bar i { width: 8px; height: 8px; border-radius: 50%; background: #5d5d62; }
.browser-bar span {
  margin-left: 10px; padding: 2px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.6875rem; color: #b9b9be; letter-spacing: 0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser img { width: 100%; }

.phone {
  position: absolute;
  right: 4px; bottom: -1px;
  width: 31%;
  max-width: 250px;
  border-radius: 22px 22px 0 0;
  padding: 5px 5px 0;
  background: #0a0a0b;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  box-shadow: -18px 22px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  z-index: 1;
}
.phone img { width: 100%; border-radius: 17px 17px 0 0; }

/* The phone crops to the height of the browser frame on small screens so the
   card doesn't grow a second screen tall. */
.stage .phone { max-height: 92%; }

.aside { margin-top: 26px; color: var(--muted); max-width: 62ch; }
.aside b { color: var(--text); font-weight: 500; }

.more-grid { display: grid; gap: 12px; margin-top: 4px; }

.mini {
  position: relative;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.3s var(--ease);
}
.mini:hover { border-color: var(--line-strong); }
.mini img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 9px; }
.mini h2 { font-size: 1rem; line-height: 1.3; }
.mini h2 a { text-decoration: none; }
.mini h2 a::after { content: ''; position: absolute; inset: 0; }
.mini p { color: var(--muted); font-size: 0.875rem; line-height: 1.4; margin-top: 2px; }

/* ---------------------------------------------------------------- about */

.band { padding-block: 84px 0; }

.about { display: grid; gap: 32px; }

.portrait { margin: 0; }
.portrait img { width: 100%; border-radius: var(--r-card); }
.portrait figcaption { margin-top: 10px; color: var(--faint); font-size: 0.875rem; }

.lede {
  font-size: clamp(1.5rem, 5.2vw, 2.125rem);
  line-height: 1.3;
  letter-spacing: -0.022em;
  font-weight: 500;
  text-wrap: balance;
}
.prose { display: grid; gap: 18px; }
.prose .lede { margin-bottom: 8px; }
.prose p:not(.lede) { color: #c9c9cd; max-width: 62ch; }
.prose a { text-underline-offset: 3px; }

/* ------------------------------------------------------------- services */

.services { display: grid; gap: 28px; }
.services .lede { max-width: 24ch; }

.svc { display: grid; gap: 0; border-top: 1px solid var(--line); }
.svc > div { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.svc dt { font-weight: 500; }
.svc dd { color: var(--muted); max-width: 56ch; }

/* ------------------------------------------------------------- features */

.feat { display: grid; gap: 14px; }
.feat > div {
  overflow: hidden;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  align-content: start;
}
.feat p { padding: 20px 20px 22px; color: var(--muted); }
.feat p b { color: var(--text); font-weight: 500; }
.feat img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border-bottom: 1px solid var(--line); }
.feat .tall img { aspect-ratio: 4 / 3.4; }

.qa { border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 14px 0;
  cursor: pointer; list-style: none; font-weight: 500;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: '+'; flex: none;
  font-size: 1.375rem; font-weight: 300; color: var(--muted);
  transition: transform 0.3s var(--ease);
}
.qa details[open] summary::after { transform: rotate(45deg); }
.qa details p { padding: 0 0 20px; color: var(--muted); max-width: 62ch; }

/* -------------------------------------------------------------- contact */

.contact { display: grid; gap: 28px; }
.contact .note { color: var(--muted); margin-top: 14px; max-width: 40ch; }
.contact .note a { color: var(--text); text-underline-offset: 3px; }

.composer {
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 30px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  min-height: 56px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
}
.row > label, .row > .lab { color: var(--muted); font-size: 0.9375rem; }
.row input[type='text'], .row input[type='email'] {
  width: 100%; min-height: 44px;
  background: transparent; border: 0; outline: 0;
  font-size: 1rem;
}
.row input::placeholder, .composer textarea::placeholder { color: #8b8b91; }
.row:focus-within { background: rgba(255, 255, 255, 0.03); }
.row:focus-within > label { color: var(--text); }

.to { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.to span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9375rem; }
.copy {
  flex: none;
  min-height: 40px; padding: 0 11px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--muted);
  font-size: 0.8125rem; cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.copy:hover { color: var(--text); border-color: var(--text); }

.starts { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); border-top: 0; margin: 0; border-inline: 0; min-width: 0; }
.starts legend { padding: 0 0 10px; color: var(--muted); font-size: 0.9375rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label {
  display: inline-flex; align-items: center;
  min-height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: 0.875rem; color: var(--muted); cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label:hover { color: var(--text); }
.chips label:has(input:checked) { background: var(--text); color: var(--ink); border-color: var(--text); font-weight: 500; }
.chips label:has(input:focus-visible) { outline: 2px solid var(--text); outline-offset: 3px; }

.composer textarea {
  display: block; width: 100%;
  min-height: 300px; padding: 18px 16px;
  background: transparent; border: 0; outline: 0; resize: vertical;
  font-size: 1rem; line-height: 1.55;
}
.composer textarea:focus { background: rgba(255, 255, 255, 0.03); }

.send {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
}
.send small { color: var(--faint); font-size: 0.8125rem; max-width: 34ch; line-height: 1.4; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice {
  margin: 0; padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem; line-height: 1.45;
}
.notice[hidden] { display: none; }
.notice.err { color: var(--danger); background: rgba(255, 120, 90, 0.07); }
.notice.warn { color: #f0d9a8; background: rgba(240, 200, 120, 0.07); }
.notice a { color: inherit; }

.sent { padding: 40px 22px 44px; }
.sent[hidden] { display: none; }
.sent .lede { margin-bottom: 12px; }
.sent p:not(.lede) { color: var(--muted); max-width: 46ch; }
.sent a { color: var(--text); }

/* --------------------------------------------------------------- footer */

.foot {
  margin-top: 96px;
  padding-block: 26px 12px;
  border-top: 1px solid var(--line);
  display: grid; gap: 14px;
  color: var(--muted); font-size: 0.9375rem;
}
.foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.foot a { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; color: var(--text); text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ----------------------------------------------------- the small pages */

.solo { min-height: 62dvh; display: grid; align-content: center; padding-block: 72px; }
.solo h1 { font-size: clamp(2.25rem, 8vw, 4rem); letter-spacing: -0.03em; line-height: 1.05; }
.solo p { margin-top: 18px; color: var(--muted); max-width: 46ch; }
.solo p a { color: var(--text); text-underline-offset: 3px; }

/* --------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
  /* Load-in for the headline block. Starts visible if the animation never
     runs, because the hidden state lives only in the keyframes. */
  .hero h1, .hero .sub, .hero .actions { animation: rise 0.9s var(--ease) both; }
  .hero .sub { animation-delay: 0.08s; }
  .hero .actions { animation-delay: 0.16s; }

  /* site.js adds .pre only to things that are below the fold when it runs,
     then removes it as they arrive. No script, no hiding. */
  .pre { opacity: 0; transform: translateY(26px); }
  .rev { transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }

  .case .browser img { transition: transform 1.2s var(--ease); }
  .case:hover .browser img { transform: scale(1.015); }

  /* The phone drifts against the browser frame as the card passes through
     the screen. Transform only, so a browser without view() timelines just
     shows it standing still. */
  @supports (animation-timeline: view()) {
    .phone {
      animation: drift linear both;
      animation-timeline: view();
      animation-range: entry 10% exit 90%;
    }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes drift { from { transform: translateY(9%); } to { transform: translateY(-2%); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------- wider screens */

@media (min-width: 560px) {
  .more-grid { grid-template-columns: 1fr 1fr; }
  .feat { grid-template-columns: 1fr 1fr; }
  .feat .wide { grid-column: 1 / -1; }
}

@media (min-width: 820px) {
  :root { --gutter: 36px; }
  body { font-size: 1.0625rem; padding-bottom: 0; }

  .top { padding-top: 26px; }
  .pill { top: 18px; bottom: auto; }
  .pill a { min-height: 40px; padding: 0 20px; }

  .hero { padding-block: 104px 80px; }
  .hero .sub { font-size: 1.25rem; margin-top: 34px; }

  .work { gap: 26px; }
  .case-head { padding: 30px 34px 26px; grid-template-columns: 1fr auto auto; align-items: start; }
  .case-head h2 { font-size: 1.625rem; }
  .case-head p { grid-column: 1; grid-row: 2; }
  .case-head .tags { grid-column: 2; grid-row: 1 / span 2; justify-content: flex-end; margin-top: 4px; max-width: 460px; }
  .case-head .go { grid-column: 3; grid-row: 1 / span 2; }
  .stage { padding: 0 64px; margin-top: 14px; }
  .stage .phone { right: 30px; width: 21%; border-radius: 28px 28px 0 0; padding: 7px 7px 0; }
  .stage .phone img { border-radius: 21px 21px 0 0; }
  .browser-bar { height: 36px; }
  .browser-bar i { width: 10px; height: 10px; }
  .browser-bar span { font-size: 0.75rem; }

  .more-grid { grid-template-columns: repeat(6, 1fr); gap: 14px; }
  .mini { grid-template-columns: 1fr; gap: 12px; padding: 10px 10px 16px; grid-column: span 2; align-content: start; }
  .mini.big { grid-column: span 3; }
  .mini h2, .mini p { padding-inline: 8px; }

  .band { padding-top: 140px; }

  .about { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: start; }
  .portrait { position: sticky; top: 96px; }

  .services { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: start; }
  .svc > div { grid-template-columns: 11rem 1fr; gap: 20px; padding: 22px 0; }

  .feat { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .feat .wide { grid-column: auto; }

  .contact { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: start; }
  .contact-intro { position: sticky; top: 96px; }
  .row { grid-template-columns: 76px 1fr; }
  .to span { font-size: 1rem; }
  .row, .starts, .send { padding-inline: 22px; }
  .starts legend { float: left; width: 76px; padding: 0; line-height: 40px; }
  .composer textarea { padding-inline: 22px; min-height: 320px; }
  .notice { padding-inline: 22px; }

  .foot { grid-template-columns: 1fr auto; align-items: center; margin-top: 140px; padding-bottom: 34px; }
}

@media (min-width: 1100px) {
  .stage { padding: 0 110px; }
  .stage .phone { right: 64px; }
}
