.card-grid {
  display: grid;
  gap: 1rem;
}

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

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

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

.card,
.feature-card,
.quote,
.plan-card,
.faq-item,
.contact-panel,
.cta-band,
.comparison-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card,
.feature-card {
  padding: 1.2rem;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.card:hover,
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 68px -38px rgba(18, 36, 23, 0.78);
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
}

.action-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.action-card-index {
  margin-bottom: 1rem;
  color: var(--accent);
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1;
  letter-spacing: 0.08em;
}

.action-card .inline-link,
.action-card .store-row {
  margin-top: auto;
  padding-top: 1rem;
}

.card h3,
.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.24rem;
}

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

.feature-card ul,
.plan-card ul,
.app-list ul {
  margin: 0.8rem 0 0;
  padding-left: 1.18rem;
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
}

.dashboard-previews {
  display: grid;
  gap: 0.75rem;
}

.dashboard-shot img {
  width: 100%;
  display: block;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  background: #123;
}

.dashboard-shot figcaption {
  margin-top: 0.42rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.app-section {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1rem;
}

.app-list {
  padding: 1.2rem;
}

.app-list h3 {
  margin: 0;
}

.iphone-gallery {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.dashboard-shot,
.phone-shot {
  margin: 0;
}

.phone-shot img {
  width: 100%;
  display: block;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  object-position: top center;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  box-shadow: 0 22px 34px -24px rgba(18, 36, 23, 0.9);
}

.phone-shot figcaption {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.spreadsheet-compare {
  margin-top: 1.2rem;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
  border-radius: var(--radius-md);
  background:
    linear-gradient(140deg, color-mix(in srgb, #fff 90%, transparent), color-mix(in srgb, var(--accent) 12%, #fff)),
    var(--surface);
  box-shadow: 0 22px 46px -34px rgba(18, 36, 23, 0.82);
}

.spreadsheet-compare table {
  width: 100%;
  border-collapse: collapse;
}

.spreadsheet-compare caption {
  padding: 0.85rem 1rem 0.15rem;
  text-align: left;
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1;
  letter-spacing: 0.03em;
}

.spreadsheet-compare th,
.spreadsheet-compare td {
  padding: 0.68rem 1rem;
  text-align: left;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
}

.spreadsheet-compare th {
  color: var(--primary-deep);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.spreadsheet-compare td:first-child {
  color: var(--muted);
}

.spreadsheet-compare td:last-child {
  font-weight: 650;
}

.spreadsheet-compare tr:last-child td {
  border-bottom: 0;
}

.proof-ledger {
  margin-top: clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.35fr);
  align-items: stretch;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
  border-radius: var(--radius-lg);
  background: linear-gradient(105deg, color-mix(in srgb, var(--primary-deep) 96%, #000), color-mix(in srgb, var(--primary) 88%, #092f20));
  color: #fffdf5;
  box-shadow: 0 30px 60px -40px rgba(6, 65, 38, 0.9);
  overflow: hidden;
}

.proof-ledger-intro {
  padding: clamp(1.35rem, 3.2vw, 2.25rem);
  position: relative;
}

.proof-ledger-intro::after {
  content: "";
  position: absolute;
  right: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: rgba(255, 255, 255, 0.22);
}

.proof-ledger .section-kicker {
  color: #e8c878;
}

.proof-ledger h2 {
  margin: 0;
  max-width: 10ch;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
}

.proof-stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.proof-stat {
  padding: clamp(1.35rem, 3.2vw, 2.25rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.proof-stat + .proof-stat {
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.proof-stat dt {
  order: 2;
  margin-top: 0.15rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.proof-stat dd {
  order: 1;
  margin: 0;
  font-family: var(--display);
  color: #fff;
  font-size: clamp(2.6rem, 5.5vw, 4.7rem);
  line-height: 0.88;
  letter-spacing: 0.025em;
}

.proof-stat p {
  order: 3;
  margin: 0.7rem 0 0;
  max-width: 24ch;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.92rem;
}

.testimonials-section .section-title {
  max-width: 22ch;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.25fr);
  gap: 1rem;
  align-items: stretch;
}

.quote {
  margin: 0;
  padding: clamp(1.35rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.quote:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 68px -38px rgba(18, 36, 23, 0.78);
}

.quote-featured {
  color: #fffdf5;
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  background:
    radial-gradient(circle at 90% 5%, rgba(195, 156, 72, 0.2), transparent 30%),
    linear-gradient(145deg, #17382a, #0b271d 68%);
  box-shadow: 0 32px 70px -44px rgba(6, 65, 38, 0.95);
}

.quote-mark {
  font-family: Georgia, serif;
  font-size: 4rem;
  line-height: 0.65;
  color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.quote p {
  margin: 0.8rem 0 0;
  font-size: 1.08rem;
}

.quote-featured p {
  color: rgba(255, 255, 255, 0.88);
}

.quote-rating {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: #e8c878;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quote-rating span {
  letter-spacing: 0.16em;
}

.quote-attribution {
  margin-top: auto;
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quote-monogram {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  color: var(--primary-deep);
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.08em;
}

.quote-featured .quote-monogram {
  border-color: rgba(232, 200, 120, 0.5);
  background: rgba(232, 200, 120, 0.12);
  color: #f3d991;
}

.quote cite {
  display: grid;
  gap: 0.05rem;
  font-style: normal;
}

.quote cite strong {
  color: var(--primary-deep);
  font-size: 0.96rem;
}

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

.quote-featured cite strong {
  color: #fff;
}

.quote-featured cite span {
  color: rgba(255, 255, 255, 0.66);
}

.cta-band {
  padding: clamp(1.2rem, 3vw, 2.2rem);
  background:
    radial-gradient(circle at 92% 15%, rgba(195, 156, 72, 0.2), transparent 32%),
    linear-gradient(145deg, #17382a, #0b271d 72%);
  border-color: color-mix(in srgb, var(--primary) 38%, var(--line));
  box-shadow: 0 34px 72px -46px rgba(6, 65, 38, 0.96);
  color: #fffdf5;
}

.cta-band h2 {
  margin: 0;
  max-width: 22ch;
  line-height: 1.08;
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
}

.cta-band .section-kicker {
  color: #e8c878;
}

.cta-band .button-ghost {
  color: #fffdf5;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cta-band .button-ghost:hover,
.cta-band .button-ghost:focus-visible {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.14);
}

.inline-link {
  color: var(--primary-deep);
  font-weight: 620;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.15em;
  transition: gap 180ms ease;
}

.inline-link:hover,
.inline-link:focus-visible {
  text-decoration: underline;
  outline: none;
  gap: 0.4em;
}

.plans-grid {
  align-items: stretch;
}

.plan-card {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  position: relative;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 68px -38px rgba(18, 36, 23, 0.78);
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
}

.plan-card h2 {
  margin: 0;
  font-family: var(--display);
  line-height: 0.92;
  letter-spacing: 0.03em;
  font-size: clamp(2.2rem, 4vw, 3.25rem);
}

.plan-card h2 span {
  font-family: var(--body);
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--muted);
}

.plan-label {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary-deep);
  font-weight: 680;
}

.plan-meta {
  margin: 0;
  color: var(--muted);
}

.plan-card .button {
  margin-top: auto;
}

.plan-card-featured {
  background:
    linear-gradient(150deg, color-mix(in srgb, #fff 88%, transparent), color-mix(in srgb, var(--accent) 18%, #fff)),
    var(--surface);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  box-shadow: 0 28px 62px -40px rgba(6, 101, 59, 0.76), inset 0 3px 0 color-mix(in srgb, var(--accent) 82%, #fff);
}

.plan-card-featured:hover {
  border-color: color-mix(in srgb, var(--accent) 78%, var(--primary));
  box-shadow: 0 34px 68px -40px rgba(6, 101, 59, 0.88), inset 0 3px 0 var(--accent);
}

.plan-recommendation {
  align-self: flex-start;
  margin: 0 0 0.1rem;
  padding: 0.26rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 20%, #fff);
  color: var(--primary-deep);
  font-size: 0.67rem;
  font-weight: 720;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.comparison-wrap {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.comparison-table th,
.comparison-table td {
  padding: 0.86rem;
  text-align: left;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
}

.comparison-table th {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-deep);
}

.comparison-table thead {
  background: color-mix(in srgb, var(--primary) 7%, #fff);
}

.comparison-table tbody tr {
  transition: background-color 160ms ease;
}

.comparison-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 8%, #fff);
}

.comparison-table td:first-child {
  color: var(--ink);
  font-weight: 620;
}

.comparison-table td:not(:first-child) {
  color: var(--primary-deep);
  font-weight: 570;
}

.faq-list {
  display: grid;
  gap: 0.8rem;
}

.faq-item {
  padding: 0.9rem 1rem;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.faq-item:hover,
.faq-item[open] {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
  background: color-mix(in srgb, var(--surface) 88%, #fff);
}

.faq-item[open] {
  box-shadow: 0 22px 48px -40px rgba(18, 36, 23, 0.9);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--primary-deep);
  transition: transform 200ms ease;
}

.faq-item[open] summary::after {
  content: "−";
  transform: rotate(90deg);
}

.faq-item p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  animation: faq-open 280ms ease;
}

@keyframes faq-open {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact-panel {
  padding: 1.2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  background:
    radial-gradient(circle at 8% 10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 35%),
    var(--surface);
}

.contact-form {
  display: grid;
  gap: 0.8rem;
}

.form-flash,
.form-errors {
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  margin: 0 0 0.8rem;
}

.form-flash {
  font-size: 0.95rem;
}

.form-flash-success {
  border: 1px solid color-mix(in srgb, #18794e 35%, var(--line));
  background: color-mix(in srgb, #e8fff3 75%, #fff);
  color: #0f5b39;
}

.form-flash-error,
.form-errors {
  border: 1px solid color-mix(in srgb, #b93838 35%, var(--line));
  background: color-mix(in srgb, #fff0f0 75%, #fff);
  color: #8f1f1f;
}

.form-errors p {
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.form-errors ul {
  margin: 0;
  padding-left: 1.2rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 540;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, #fff 90%, transparent);
  padding: 0.62rem 0.75rem;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--ink);
}

.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 1px;
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 10%, transparent);
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  background: color-mix(in srgb, var(--bg) 90%, #fff);
}

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

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

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-inner nav a {
  color: var(--muted);
  text-decoration: none;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color 180ms ease, background-size 260ms ease;
}

.footer-inner nav a:hover,
.footer-inner nav a:focus-visible {
  color: var(--ink);
  background-size: 100% 1px;
}

.spotlight {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.spotlight::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at var(--mouse-x, -100%) var(--mouse-y, -100%),
    color-mix(in srgb, #fff 70%, transparent),
    transparent 42%
  );
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
  z-index: -1;
}

.spotlight:hover::after,
.spotlight:focus-within::after {
  opacity: 0.64;
}

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

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

@media (max-width: 1080px) {
  .card-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-section {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 930px) {
  .hero {
    grid-template-columns: 1fr;
  }

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

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

  .proof-ledger {
    grid-template-columns: 1fr;
  }

  .proof-ledger-intro::after {
    top: auto;
    right: 1.35rem;
    bottom: 0;
    left: 1.35rem;
    width: auto;
    height: 1px;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(1120px, calc(100% - 1.35rem));
  }

  .nav-toggle {
    display: inline-flex;
  }

  .top-nav {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0.7rem;
    left: 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--surface-strong) 96%, transparent);
    box-shadow: var(--shadow);
    display: grid;
    gap: 0.2rem;
    padding: 0.6rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 170ms ease, transform 170ms ease;
  }

  .site-header.nav-open .top-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .top-nav a {
    border-radius: 10px;
  }

  .top-nav .nav-cta {
    margin-top: 0.2rem;
  }

  .snapshot-grid,
  .iphone-gallery,
  .testimonial-grid,
  .card-grid-2,
  .card-grid-3,
  .card-grid-4 {
    grid-template-columns: 1fr;
  }

  .proof-stats {
    grid-template-columns: 1fr;
  }

  .proof-stat + .proof-stat {
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    border-left: 0;
  }

  .hero h1 {
    line-height: 0.9;
  }

  .footer-inner {
    padding-block: 0.8rem;
    flex-direction: column;
    align-items: flex-start;
  }
}

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

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