/* James Powell Software. One stylesheet for every page. Self hosted fonts, no outside requests, no JavaScript. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --ink: #0b1220;
  --ink-raised: #151e31;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #0b1220;
  --muted: #4b5565;
  --line: #e3e6eb;
  --on-dark: #f5f7fa;
  --on-dark-muted: #a9b4c7;
  /* Lime: 14:1 on the navy. On light backgrounds use it as a fill with navy text, never as text. */
  --accent: #c6f135;
  --accent-hover: #d6ff4f;
  --link-line: #6e8f00;
  --focus: var(--ink);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(11, 18, 32, 0.06), 0 8px 24px rgba(11, 18, 32, 0.06);
  --shadow-lift: 0 2px 4px rgba(11, 18, 32, 0.06), 0 18px 40px rgba(11, 18, 32, 0.12);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  font-family: var(--display);
  line-height: 1.1;
}

h2 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
  text-decoration-color: var(--link-line);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

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

/* Keep jump links (like about.html#contact) clear of the sticky header */
[id] {
  scroll-margin-top: 5rem;
}

.dark {
  --focus: var(--accent);
  --link-line: var(--accent);
  background: var(--ink);
  color: var(--on-dark);
}

.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

/* Skip link */

.skip {
  position: absolute;
  top: -5rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
}

.skip:focus {
  top: 1rem;
}

/* Sticky header: always dark, so it reads the same over the hero and the light sections */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 18, 32, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
}

/* Logo: ticket mark plus the outlined wordmark, spaced as in the logo lockup (12px gap) */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--on-dark);
  text-decoration: none;
}

.brand-mark {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
}

.brand > .brand-name {
  flex: none;
  width: 201.73px;
  height: 13.16px;
}

@media (max-width: 34.99em) {
  .brand > .brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

.site-header ul {
  display: flex;
  gap: 0 1.125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header ul a {
  display: block;
  padding: 0.625rem 0;
  color: var(--on-dark-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-header ul a:hover {
  color: var(--on-dark);
}

.site-header ul a[aria-current="page"] {
  color: var(--on-dark);
  box-shadow: inset 0 -2px 0 var(--accent);
}

@media (max-width: 22.5em) {
  .site-header ul {
    gap: 0 0.875rem;
  }
}

@media (min-width: 40em) {
  .site-header ul {
    gap: 0 1.75rem;
  }

  .site-header ul a {
    font-size: 1rem;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.375rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: var(--ink);
}

.btn-accent:hover {
  background: var(--accent-hover);
  box-shadow: 0 10px 30px rgba(198, 241, 53, 0.25);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--on-dark);
}

.btn-ghost:hover {
  border-color: var(--on-dark);
  background: rgba(255, 255, 255, 0.06);
}

.btn-ink {
  background: var(--ink);
  color: var(--on-dark);
}

.btn-ink:hover {
  box-shadow: var(--shadow-lift);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 0;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0 4rem;
  background:
    radial-gradient(40rem 26rem at 90% 0%, rgba(198, 241, 53, 0.22), transparent 65%),
    radial-gradient(44rem 30rem at 0% 100%, rgba(64, 110, 255, 0.32), transparent 65%),
    var(--ink);
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 60em) {
  .hero {
    padding: 5.5rem 0 6rem;
  }

  .hero-grid {
    grid-template-columns: 1fr 1.05fr;
    gap: 3.5rem;
  }
}

.hero h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.5rem, 1.6rem + 4.2vw, 4.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hl {
  color: var(--accent);
}

.lede {
  max-width: 32rem;
  margin: 0;
  color: var(--on-dark-muted);
  font-size: 1.1875rem;
}

/* Faint dot pattern on the dark bands, fading out towards the edges */

.hero::before,
.page-hero::before,
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1.2px, transparent 1.8px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 85% 100% at 65% 30%, #000 25%, transparent 85%);
  mask-image: radial-gradient(ellipse 85% 100% at 65% 30%, #000 25%, transparent 85%);
}

.hero > .container,
.page-hero > .container,
.cta > .container {
  position: relative;
}

.hero-copy,
.devices,
.page-hero > .container {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.devices {
  animation-delay: 0.15s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* CSS drawn laptop and phone */

.devices {
  position: relative;
  max-width: 40rem;
  margin: 0 auto;
  width: 100%;
}

.device-stage {
  position: relative;
  padding-bottom: 2.75rem;
}

.laptop {
  width: 86%;
  margin-left: 5%;
}

.laptop-screen {
  padding: 2.2%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px 14px 4px 4px;
  background: #1b2336;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
}

.laptop-screen img {
  width: 100%;
  border-radius: 4px;
}

.laptop-base {
  position: relative;
  width: 114%;
  height: 0.875rem;
  margin-left: -7%;
  border-radius: 2px 2px 14px 14px;
  background: linear-gradient(#d6dbe4, #8c95a6);
}

.laptop-base::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 16%;
  height: 0.3rem;
  border-radius: 0 0 8px 8px;
  background: #707a8c;
  transform: translateX(-50%);
}

.phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 27%;
  padding: 2.4%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: clamp(18px, 4vw, 30px);
  background: #0e1424;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
}

.phone img {
  width: 100%;
  border-radius: clamp(12px, 2.8vw, 22px);
}

.phone::before {
  content: "";
  position: absolute;
  top: 5%;
  left: 50%;
  z-index: 1;
  width: 28%;
  height: 2.2%;
  border-radius: 999px;
  background: #0e1424;
  transform: translateX(-50%);
}

.devices figcaption {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  color: var(--on-dark-muted);
  font-size: 0.875rem;
}

.devices figcaption::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

/* Shorter dark hero band for the inner pages */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 3rem 0 3.25rem;
  background:
    radial-gradient(36rem 20rem at 95% 0%, rgba(198, 241, 53, 0.16), transparent 65%),
    radial-gradient(40rem 22rem at 0% 100%, rgba(64, 110, 255, 0.3), transparent 65%),
    var(--ink);
}

@media (min-width: 48em) {
  .page-hero {
    padding: 4.5rem 0 4.75rem;
  }
}

.page-hero h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2.5rem, 1.8rem + 3vw, 3.75rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.page-hero h1:last-child {
  margin-bottom: 0;
}

/* Light sections */

.section {
  padding: 4rem 0;
}

/* Soft glows and a faint dot pattern behind key light sections.
   No overflow: hidden here: it would stop the scroll reveal on the cards inside. */
.glow {
  position: relative;
  background:
    radial-gradient(48rem 24rem at 100% 0%, rgba(198, 241, 53, 0.2), transparent 70%),
    radial-gradient(40rem 24rem at 0% 100%, rgba(64, 110, 255, 0.11), transparent 70%),
    var(--bg);
}

.glow::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(11, 18, 32, 0.12) 1.2px, transparent 1.8px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 100% 0%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 90% at 100% 0%, #000 10%, transparent 75%);
}

.glow > .container {
  position: relative;
}

.band {
  --ring: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

@media (min-width: 48em) {
  .section {
    padding: 6rem 0;
  }
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-head p {
  color: var(--muted);
  font-size: 1.125rem;
}

.card {
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.card p {
  margin: 0;
  color: var(--muted);
}

.grid-2 {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48em) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

.icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1.5rem;
  border-radius: 14px;
  background: var(--ink);
  color: var(--accent);
}

.icon svg {
  width: 1.625rem;
  height: 1.625rem;
}

/* How it works: numbered steps joined by a line (down on phones, across on wide screens) */

.process {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.process li {
  position: relative;
  padding: 0 0 2.25rem 4.25rem;
  counter-increment: step;
}

.process li:last-child {
  padding-bottom: 0;
}

.process li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--accent);
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 800;
  box-shadow: 0 0 0 6px var(--ring, var(--bg));
}

.process li::after {
  content: "";
  position: absolute;
  top: 2.75rem;
  bottom: 0;
  left: calc(1.375rem - 1px);
  width: 2px;
  background: #c9d0da;
}

.process li:last-child::after {
  display: none;
}

.process h3 {
  margin-bottom: 0.25rem;
  padding-top: 0.4rem;
}

.process p {
  margin: 0;
  color: var(--muted);
}

@media (min-width: 56em) {
  .process {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .process li {
    padding: 4.25rem 1rem 0 0;
  }

  .process li::after {
    top: calc(1.375rem - 1px);
    right: -2rem;
    bottom: auto;
    left: 2.75rem;
    width: auto;
    height: 2px;
  }

  .process h3 {
    padding-top: 0;
  }
}

/* Prices */

.price-card {
  display: flex;
  flex-direction: column;
}

.card .price {
  margin: 0 0 1rem;
  color: inherit;
}

.price-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.price-amount {
  display: block;
  font-family: var(--display);
  font-size: clamp(2.5rem, 2rem + 2vw, 3.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.price-amount small {
  margin-right: 0.15em;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: 0;
}

.price-card.dark {
  border-color: var(--ink);
  background:
    radial-gradient(24rem 14rem at 100% 0%, rgba(198, 241, 53, 0.14), transparent 70%),
    var(--ink);
}

.price-card.dark .price-amount strong {
  color: var(--accent);
}

.price-card.dark .price-amount small,
.price-card.dark .price-note {
  color: var(--on-dark-muted);
}

.notes {
  display: grid;
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.notes li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.notes svg {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.1rem;
  padding: 0.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
}

@media (min-width: 48em) {
  .notes {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

/* Work strip */

.thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 56em) {
  .thumbs {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

.thumb {
  display: block;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s ease;
}

.thumb:hover {
  transform: translateY(-4px);
}

.thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 0.75rem;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s ease;
}

.thumb:hover img {
  box-shadow: var(--shadow-lift);
}

/* Closing call to action */

.cta {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0;
  background:
    radial-gradient(36rem 22rem at 100% 100%, rgba(198, 241, 53, 0.22), transparent 65%),
    radial-gradient(36rem 22rem at 0% 0%, rgba(64, 110, 255, 0.28), transparent 65%),
    var(--ink);
}

@media (min-width: 48em) {
  .cta {
    padding: 6rem 0;
  }
}

.cta h2 {
  font-size: clamp(2.25rem, 1.5rem + 3.5vw, 3.75rem);
}

.cta p {
  max-width: 38rem;
  color: var(--on-dark-muted);
  font-size: 1.1875rem;
}

/* Inline links only: the lime button keeps its own navy text */
.cta p a:not(.btn) {
  color: var(--on-dark);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.cta .email {
  margin: 1.5rem 0 0.5rem;
  font-family: var(--display);
  /* Sized to the screen so the address stays on one line, even on a 320px phone */
  font-size: clamp(0.9375rem, 4.6vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cta .email a {
  color: var(--accent);
  text-decoration-color: rgba(198, 241, 53, 0.4);
}

/* Work page */

.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.project img {
  width: 100%;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.75rem;
}

.project h2 {
  margin-bottom: 0.5rem;
  font-size: 1.625rem;
}

.project .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.project .project-text {
  margin-bottom: 1.25rem;
}

.project .project-link {
  margin-top: auto;
  color: var(--text);
  font-weight: 600;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* About page */

.about-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 48em) {
  .about-grid {
    grid-template-columns: 18rem 1fr;
    gap: 4rem;
  }
}

.portrait {
  position: relative;
  max-width: 18rem;
  margin: 0 0.75rem 0.75rem 0;
}

.portrait::before {
  content: "";
  position: absolute;
  inset: 0.75rem -0.75rem -0.75rem 0.75rem;
  border-radius: 24px;
  background: var(--accent);
}

.portrait img {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--line);
  box-shadow: var(--shadow-lift);
}

.about-text {
  font-size: 1.1875rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.narrow {
  max-width: 44rem;
}

.narrow p:last-child {
  margin-bottom: 0;
}

/* Privacy page: plain and easy to read */

.prose {
  max-width: 44rem;
}

.prose h2 {
  margin: 2.5rem 0 0.5rem;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.prose h2:first-of-type {
  margin-top: 2rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.page-hero .updated {
  margin: 0;
  color: var(--on-dark-muted);
}

/* Footer */

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-inner p {
  margin: 0;
}

/* Scroll reveal: section headings, cards and steps fade up as they come into view.
   Only in browsers that support scroll driven animations; everywhere else they just show.
   Uses the translate property so it never fights the hover lift (which uses transform).
   The range is in pixels of scrolling, not a share of the element's height, so every item
   finishes within about 260px of entering: well before it reaches the middle of the screen.
   Items later in a group start a little later, for a gentle stagger. */

@keyframes reveal {
  from {
    opacity: 0;
    translate: 0 28px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section-head,
    .grid-2 > .card,
    .thumbs > li,
    .process li,
    .about-grid > * {
      animation: reveal cubic-bezier(0.25, 0.6, 0.3, 1) both;
      animation-timeline: view();
      animation-range: cover 0px cover 260px;
    }

    .grid-2 > .card:nth-child(even),
    .thumbs > li:nth-child(2),
    .process li:nth-child(2),
    .about-grid > :nth-child(2) {
      animation-range: cover 60px cover 320px;
    }

    .thumbs > li:nth-child(3),
    .process li:nth-child(3) {
      animation-range: cover 120px cover 380px;
    }

    .thumbs > li:nth-child(4) {
      animation-range: cover 180px cover 420px;
    }
  }
}

/* No motion for people who ask for less */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .btn:hover,
  .card:hover,
  .thumb:hover {
    transform: none;
  }
}
