/* ABOUTME: Defines the OPAS landing page's restrained editorial system and responsive layouts. */
/* ABOUTME: Keeps product proof, workflows, demos, deployment choices, and contact states clear and accessible. */

:root {
  color-scheme: light;
  --page: #f7f7f5;
  --surface: #ffffff;
  --ink: #11110f;
  --muted: #64645f;
  --line: #d9d9d3;
  --line-strong: #b9b9b1;
  --signal: #cc3327;
  --signal-hover: #ad281f;
  --dark: #151513;
  --dark-muted: #a8a8a0;
  --font-sans: Avenir, "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --container: 76rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--signal);
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

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

button,
input,
textarea {
  font: inherit;
}

button,
a,
summary,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  transform: translateY(-150%);
  background: var(--ink);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(calc(100% - 3rem), var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 245, 0.96);
}

.header-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 4.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.7rem;
  width: max-content;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.desktop-nav a {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

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

.header-action {
  justify-self: end;
  border-bottom: 1px solid var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.mobile-menu {
  display: none;
  position: relative;
  justify-self: end;
}

.mobile-menu summary {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-content: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  cursor: pointer;
  list-style: none;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-menu summary span {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--ink);
}

.mobile-menu[open] summary span:first-child {
  transform: translateY(0.2rem) rotate(45deg);
}

.mobile-menu[open] summary span:last-child {
  transform: translateY(-0.2rem) rotate(-45deg);
}

.mobile-menu nav {
  position: absolute;
  top: calc(100% + 1rem);
  right: 0;
  display: grid;
  width: min(18rem, calc(100vw - 2rem));
  border: 1px solid var(--line);
  background: var(--surface);
}

.mobile-menu nav a {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.mobile-menu nav a:last-child {
  border-bottom: 0;
  background: var(--ink);
  color: #ffffff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(34rem, 1.2fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
  min-height: calc(100svh - 4.75rem);
  padding-block: clamp(5rem, 10vw, 8.5rem);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 8.5ch;
  margin: 0;
  font-size: clamp(3.5rem, 6.3vw, 6.5rem);
  font-weight: 650;
  letter-spacing: -0.065em;
  line-height: 0.9;
}

.hero-summary {
  max-width: 35rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.5vw, 1.28rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.5rem;
  margin-top: 2.4rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  gap: 0.5rem;
  padding: 0.8rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 0.2rem;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button-primary {
  border-color: var(--signal);
  background: var(--signal);
  color: #ffffff;
}

.button-primary:hover {
  border-color: var(--signal-hover);
  background: var(--signal-hover);
}

.text-link {
  font-size: 0.9rem;
  font-weight: 800;
}

.product-window {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: 1.5rem 1.5rem 0 #e7e7e2;
}

.product-window-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.window-dots {
  display: flex;
  gap: 0.35rem;
}

.window-dots i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--line-strong);
}

.product-window img {
  width: 100%;
  height: auto;
}

.proof-strip {
  border-block: 1px solid var(--line);
}

.proof-layout {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.proof-layout span {
  padding: 1.2rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.proof-layout span:last-child {
  border-right: 1px solid var(--line);
}

.section {
  padding-block: clamp(6.5rem, 12vw, 11rem);
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  column-gap: clamp(3rem, 10vw, 9rem);
  align-items: end;
  margin-bottom: clamp(4rem, 8vw, 7rem);
}

.section-intro .eyebrow {
  grid-column: 1 / -1;
}

h2 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(2.8rem, 5.2vw, 5.25rem);
  font-weight: 650;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.section-intro > p:last-child {
  max-width: 32rem;
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.workflow {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
  list-style: none;
}

.workflow li {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1.3fr) minmax(12rem, 0.7fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  padding-block: 2.25rem;
  border-bottom: 1px solid var(--line);
}

.workflow-number {
  padding-top: 0.3rem;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.workflow h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.workflow li > div p {
  max-width: 38rem;
  margin: 0.85rem 0 0;
  color: var(--muted);
}

.workflow-meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.demo-section {
  background: var(--dark);
  color: #f7f7f4;
}

.demo-intro {
  display: block;
  max-width: 58rem;
}

.demo-intro .eyebrow {
  color: #ff6c5f;
}

.demo-intro h2 {
  max-width: 13ch;
}

.demo-list {
  border-top: 1px solid #4a4a45;
}

.demo-list a {
  display: grid;
  grid-template-columns: minmax(14rem, 0.65fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
  min-height: 7.5rem;
  border-bottom: 1px solid #4a4a45;
  color: inherit;
  text-decoration: none;
  transition: background-color 160ms ease, padding-inline 160ms ease;
}

.demo-list a:hover {
  padding-inline: 1rem;
  background: #20201d;
}

.demo-label {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.demo-description {
  max-width: 34rem;
  color: var(--dark-muted);
}

.demo-arrow {
  color: #ff6c5f;
  font-size: 1.5rem;
}

.deploy-list {
  margin: 0;
  border-top: 1px solid var(--ink);
}

.deploy-list > div {
  display: grid;
  grid-template-columns: minmax(9rem, 0.55fr) minmax(12rem, 0.6fr) minmax(18rem, 1fr);
  gap: 2rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.deploy-list dt {
  font-weight: 800;
}

.deploy-list dd {
  margin: 0;
}

.deploy-note {
  color: var(--muted);
}

.contact-section {
  background: #e9e9e4;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(32rem, 1.2fr);
  gap: clamp(4rem, 10vw, 10rem);
  align-items: start;
}

.contact-heading,
.contact-form,
.field-row,
.field {
  min-width: 0;
}

.contact-heading h2 {
  max-width: 9ch;
}

.contact-heading > p:not(.eyebrow) {
  max-width: 32rem;
  margin: 2rem 0 1.5rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.contact-form {
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border: 1px solid var(--line-strong);
  border-radius: 0.75rem;
  background: var(--surface);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 3.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.2rem;
  background: #ffffff;
  color: var(--ink);
  padding: 0.75rem 0.85rem;
}

.field textarea {
  min-height: 10rem;
  resize: vertical;
}

.field input:hover,
.field textarea:hover {
  border-color: var(--ink);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--signal);
  outline: 3px solid rgba(227, 59, 46, 0.18);
  outline-offset: 0;
}

.field textarea::placeholder {
  color: #8b8b84;
}

.field-hint {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.field-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.turnstile-wrap {
  min-height: 65px;
  max-width: 100%;
  margin-bottom: 1rem;
  overflow: hidden;
}

.contact-submit {
  width: 100%;
}

.contact-submit:disabled {
  border-color: #8b8b84;
  background: #8b8b84;
  cursor: wait;
}

.form-status {
  min-height: 1.5em;
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
}

.form-status[data-state="success"] {
  color: #14733b;
}

.form-status[data-state="error"] {
  color: #9d2018;
}

.site-footer {
  padding-block: 3rem;
  background: var(--dark);
  color: #f7f7f4;
}

.footer-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 3rem;
}

.footer-brand {
  color: inherit;
}

.footer-layout p {
  margin: 0.9rem 0 0;
  color: var(--dark-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--dark-muted);
  font-size: 0.82rem;
}

.footer-links a:hover {
  color: #ffffff;
}

@media (max-width: 60rem) {
  .header-layout {
    grid-template-columns: 1fr auto;
  }

  .desktop-nav,
  .header-action {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 4rem;
  }

  .hero-copy {
    max-width: 44rem;
  }

  .product-window {
    width: 100%;
    box-shadow: 0.85rem 0.85rem 0 #e7e7e2;
  }

  .section-intro {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .section-intro .eyebrow {
    grid-column: auto;
  }

  .section-intro > p:last-child {
    margin: 0;
  }

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

@media (max-width: 44rem) {
  .container {
    width: min(calc(100% - 2rem), var(--container));
  }

  .site-header {
    background: var(--page);
  }

  .header-layout {
    min-height: 4rem;
  }

  .hero {
    padding-block: 4.5rem 5.5rem;
  }

  h1 {
    font-size: clamp(3.45rem, 17vw, 5rem);
  }

  .hero-summary {
    font-size: 1.05rem;
  }

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

  .product-window-bar {
    grid-template-columns: 1fr auto;
  }

  .product-window-bar > span:nth-child(2) {
    grid-column: 2;
  }

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

  .proof-layout span {
    border-bottom: 1px solid var(--line);
    border-left: 0;
    text-align: left;
  }

  .proof-layout span:nth-child(odd) {
    border-right: 1px solid var(--line);
  }

  .proof-layout span:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .proof-layout span:last-child {
    border-right: 0;
  }

  .section {
    padding-block: 6rem;
  }

  .section-intro {
    margin-bottom: 3.5rem;
  }

  h2 {
    font-size: clamp(2.75rem, 13vw, 4rem);
  }

  .workflow li {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.75rem 1rem;
    padding-block: 1.75rem;
  }

  .workflow-meta {
    grid-column: 2;
  }

  .demo-list a {
    grid-template-columns: 1fr auto;
    gap: 0.65rem 1rem;
    padding-block: 1.5rem;
  }

  .demo-description {
    grid-column: 1;
    grid-row: 2;
  }

  .demo-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .deploy-list > div {
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 1rem;
  }

  .deploy-note {
    grid-column: 1 / -1;
  }

  .contact-layout {
    gap: 3rem;
  }

  .contact-form {
    padding: 1rem;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer-layout {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 24rem) {
  .proof-layout {
    grid-template-columns: 1fr;
  }

  .proof-layout span,
  .proof-layout span:nth-child(odd) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .proof-layout span:nth-last-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .proof-layout span:last-child {
    border-bottom: 0;
  }

  .deploy-list > div {
    grid-template-columns: 1fr;
  }

  .deploy-note {
    grid-column: auto;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
