:root {
  color-scheme: light dark;
  --cream: #f7ead7;
  --cream-2: #fff8ed;
  --paper: #fdf5e8;
  --ink: #2b2723;
  --muted: #665a4e;
  --line: rgba(79, 63, 51, 0.18);
  --cider: #ad4f3a;
  --gold: #d89734;
  --moss: #7f805c;
  --charcoal: #211f1c;
  --shadow: 0 24px 70px rgba(70, 48, 34, 0.18);
  --radius: 8px;
  --max: 1180px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --cream: #211f1c;
  --cream-2: #171513;
  --paper: #27231f;
  --ink: #f8ebd8;
  --muted: #cdbda8;
  --line: rgba(248, 235, 216, 0.18);
  --cider: #df765e;
  --gold: #e1ab4b;
  --moss: #a8ad78;
  --charcoal: #10100f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.2rem;
  min-height: 76px;
  padding: 0.7rem clamp(1rem, 4vw, 3.5rem);
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  width: min(292px, 70vw);
  height: auto;
}

:root[data-theme="dark"] .brand img {
  filter: invert(1) hue-rotate(180deg) saturate(0.9) brightness(1.08);
}

.nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(0.9rem, 2.6vw, 2rem);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
}

.nav a,
.button,
.contact-link {
  text-decoration: none;
}

.nav a {
  transition: color 180ms ease;
}

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

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--cider) 70%, var(--line));
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: calc(82svh - 76px);
  display: grid;
  align-items: center;
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 3.5rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(90deg, color-mix(in srgb, var(--cream-2) 96%, transparent) 0%, color-mix(in srgb, var(--cream-2) 82%, transparent) 34%, color-mix(in srgb, var(--cream-2) 32%, transparent) 62%, transparent 100%),
    linear-gradient(0deg, color-mix(in srgb, var(--cream) 90%, transparent), transparent 36%),
    url("assets/cider-code-hero.png");
  background-size: cover;
  background-position: center right;
}

:root[data-theme="dark"] .hero-bg {
  filter: saturate(0.86) brightness(0.72);
  background-image:
    linear-gradient(90deg, rgba(16, 16, 15, 0.98) 0%, rgba(16, 16, 15, 0.78) 42%, rgba(16, 16, 15, 0.28) 70%, rgba(16, 16, 15, 0.1) 100%),
    linear-gradient(0deg, color-mix(in srgb, var(--cream) 82%, transparent), transparent 42%),
    url("assets/cider-code-hero.png");
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--line);
}

.hero-copy {
  width: min(700px, 100%);
}

.eyebrow {
  margin: 0 0 1.45rem;
  color: var(--cider);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  line-height: 0.98;
}

h1 {
  max-width: 9ch;
  margin-bottom: 1.85rem;
  color: color-mix(in srgb, var(--ink) 82%, var(--muted));
  font-size: clamp(3.6rem, 9.5vw, 6.9rem);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.35rem, 5vw, 4.9rem);
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.18rem;
  line-height: 1.15;
}

.hero-lede {
  max-width: 660px;
  margin-bottom: 2.45rem;
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.38rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.78rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.button.primary {
  color: #fff9ef;
  background: var(--cider);
  border-color: color-mix(in srgb, var(--cider) 80%, #000);
}

.button.secondary {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
}

.signal-card {
  position: absolute;
  right: clamp(1rem, 4vw, 4rem);
  bottom: clamp(1rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: min(300px, calc(100% - 2rem));
  padding: 0.8rem 0.95rem;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  font-size: 0.92rem;
  font-weight: 800;
  animation: floaty 7s ease-in-out infinite;
}

.status-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--moss) 16%, transparent);
}

.cursor {
  width: 9px;
  height: 1.15em;
  background: var(--gold);
  animation: blink 1.1s steps(2, start) infinite;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 3.5rem);
}

.services {
  padding-top: clamp(2rem, 4vw, 3.25rem);
}

.section-heading,
.approach,
.contact-panel {
  width: min(var(--max), 100%);
  margin-inline: auto;
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2,
.approach-copy h2,
.contact-panel h2 {
  max-width: 820px;
}

.service-grid {
  width: min(var(--max), 100%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.service-card,
.process-list > div,
.contact-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(70, 48, 34, 0.08);
}

:root[data-theme="dark"] .service-card,
:root[data-theme="dark"] .process-list > div,
:root[data-theme="dark"] .contact-panel {
  box-shadow: none;
}

.service-card {
  min-height: 288px;
  padding: 1.35rem;
  transition: transform 180ms ease, border-color 180ms ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--gold) 70%, var(--line));
}

.service-card p,
.approach-copy p,
.process-list p,
.contact-panel p,
.site-footer {
  color: var(--muted);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1.2rem;
  color: var(--cider);
  background: color-mix(in srgb, var(--gold) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  border-radius: var(--radius);
}

.service-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.approach {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.approach-copy {
  position: sticky;
  top: 110px;
}

.approach-copy p {
  max-width: 640px;
  font-size: 1.1rem;
}

.process-list {
  display: grid;
  gap: 1rem;
}

.process-list > div {
  padding: 1.3rem;
}

.process-list span {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: var(--gold);
  font-weight: 850;
}

.process-list strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1.1rem;
}

.process-list p {
  margin-bottom: 0;
}

.contact {
  padding-top: 2rem;
}

.contact-panel {
  padding: clamp(1.5rem, 5vw, 3.5rem);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 14%, transparent), transparent 42%),
    var(--paper);
}

.contact-panel p {
  max-width: 660px;
  font-size: 1.08rem;
}

.contact-link {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--cider);
  font-size: clamp(1.35rem, 3.2vw, 2.4rem);
  font-weight: 850;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.7rem 1.5rem;
  padding: 1.4rem clamp(1rem, 4vw, 3.5rem);
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes blink {
  0%,
  45% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --cream: #211f1c;
    --cream-2: #171513;
    --paper: #27231f;
    --ink: #f8ebd8;
    --muted: #cdbda8;
    --line: rgba(248, 235, 216, 0.18);
    --cider: #df765e;
    --gold: #e1ab4b;
    --moss: #a8ad78;
    --charcoal: #10100f;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  }

  :root:not([data-theme="light"]) .brand img {
    filter: invert(1) hue-rotate(180deg) saturate(0.9) brightness(1.08);
  }

  :root:not([data-theme="light"]) .hero-bg {
    filter: saturate(0.86) brightness(0.72);
    background-image:
      linear-gradient(90deg, rgba(16, 16, 15, 0.98) 0%, rgba(16, 16, 15, 0.78) 42%, rgba(16, 16, 15, 0.28) 70%, rgba(16, 16, 15, 0.1) 100%),
      linear-gradient(0deg, color-mix(in srgb, var(--cream) 82%, transparent), transparent 42%),
      url("assets/cider-code-hero.png");
  }

  :root:not([data-theme="light"]) .service-card,
  :root:not([data-theme="light"]) .process-list > div,
  :root:not([data-theme="light"]) .contact-panel {
    box-shadow: none;
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .theme-toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .hero {
    min-height: calc(84svh - 142px);
    align-items: end;
    padding-top: 9rem;
  }

  .hero-bg {
    background-image:
      linear-gradient(0deg, color-mix(in srgb, var(--cream-2) 98%, transparent) 0%, color-mix(in srgb, var(--cream-2) 88%, transparent) 45%, color-mix(in srgb, var(--cream-2) 18%, transparent) 100%),
      url("assets/cider-code-hero.png");
    background-position: 68% top;
  }

  .signal-card {
    top: 5.6rem;
    right: 1rem;
    bottom: auto;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .approach {
    grid-template-columns: 1fr;
  }

  .approach-copy {
    position: static;
  }
}

@media (max-width: 620px) {
  .brand img {
    width: 235px;
  }

  .nav {
    font-size: 0.88rem;
  }

  .site-header {
    gap: 0.75rem;
    min-height: 0;
    padding-block: 0.62rem;
  }

  .hero {
    min-height: calc(86svh - 174px);
    padding-top: 4.7rem;
    padding-bottom: 2rem;
  }

  h1 {
    max-width: 7.2ch;
    font-size: clamp(2.8rem, 12.5vw, 3.45rem);
  }

  h2 {
    font-size: clamp(1.5rem, 6vw, 1.74rem);
    line-height: 1.08;
    text-wrap: pretty;
  }

  .section-heading h2,
  .approach-copy h2,
  .contact-panel h2 {
    max-width: 14ch;
  }

  .eyebrow {
    max-width: 34ch;
    margin-bottom: 1rem;
    font-size: 0.68rem;
    letter-spacing: 0.09em;
  }

  .hero-lede {
    margin-bottom: 1.6rem;
    font-size: 1rem;
    max-width: 31ch;
  }

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

  .button {
    width: 100%;
    padding-inline: 0.75rem;
  }

  .button.primary {
    font-size: clamp(0.91rem, 4vw, 1rem);
  }

  .signal-card {
    display: none;
  }

  .section {
    padding: 3rem 1.25rem;
  }

  .services {
    padding-top: 1.6rem;
  }

  .section-heading {
    margin-bottom: 1.35rem;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
