/* ============================================================
   The Open Automation Brief — Landing page
   Nexus palette, DM Sans, editorial rhythm.
   ============================================================ */

:root {
  --bg: #F7F6F2;
  --surface: #FBFBF9;
  --surface-alt: #F1EFE8;
  --border: #D4D1CA;
  --border-strong: #B9B5AB;
  --text: #28251D;
  --text-muted: #7A7974;
  --text-faint: #BAB9B4;
  --primary: #01696F;
  --primary-hover: #0C4E54;
  --primary-tint: #E6EEEE;
  --primary-tint-2: #CFE4E5;
  --tier-1: #EDEBE3;
  --tier-2: #E9E4D2;
  --tier-3: #DEE9DF;
  --tier-4: #CFE4E5;
  --warn: #964219;
  --success: #437A22;

  --measure: 68ch;
  --radius: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(40, 37, 29, 0.04);
  --shadow-md: 0 8px 24px -12px rgba(40, 37, 29, 0.12);
  --shadow-lg: 0 24px 60px -30px rgba(40, 37, 29, 0.18);

  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }

/* --- Header --------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(140%) blur(8px);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.logo:hover { color: var(--primary); text-decoration: none; }
.crumb {
  font-size: 12.5px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* --- Section frame ------------------------------------------- */
main { padding-bottom: 40px; }
.section-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 96px) clamp(20px, 5vw, 56px);
}

/* --- Hero ---------------------------------------------------- */
.hero {
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 90% -20%, rgba(1, 105, 111, 0.08), transparent 55%),
    radial-gradient(circle at 5% 100%, rgba(150, 66, 25, 0.05), transparent 50%),
    var(--bg);
}
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 88px) clamp(20px, 5vw, 56px) clamp(56px, 9vw, 96px);
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  }
}

.eyebrow {
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 20px;
}
.eyebrow.center { text-align: center; }

h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(38px, 5.6vw, 64px);
  line-height: 1.03;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 24px;
  max-width: 18ch;
}
h1 em { font-style: italic; color: var(--primary); }

.lede {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--text);
  max-width: var(--measure);
  margin: 0 0 32px;
}
.lede em { font-style: italic; color: var(--primary); }

.highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 60ch;
}
.highlights li {
  padding-left: 22px;
  position: relative;
  font-size: 15px;
  color: var(--text);
  line-height: 1.55;
}
.highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 10px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}
.highlights strong { color: var(--text); font-weight: 700; }

.microtrust {
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 18px;
  max-width: 55ch;
  margin: 0;
}

/* --- Form card ------------------------------------------------ */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 32px);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 92px;
}
@media (max-width: 959px) {
  .form-card { position: static; }
}

.card-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  margin-bottom: 20px;
}
.tag {
  display: inline-block;
  background: var(--primary-tint);
  color: var(--primary);
  border-radius: 100px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.card-head h2 {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--text);
}
.card-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

form { display: flex; flex-direction: column; gap: 14px; }
[hidden] { display: none !important; }
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
label > span { color: var(--text); }
input[type="text"],
input[type="email"],
select {
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
}
select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%237A7974' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

.checkbox {
  flex-direction: row;
  gap: 10px;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 2px;
}
.checkbox input {
  margin-top: 3px;
  accent-color: var(--primary);
}
.checkbox span { color: var(--text-muted); font-weight: 400; }

button[type="submit"] {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--surface);
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  padding: 13px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 140ms ease, transform 140ms ease;
  margin-top: 6px;
}
button[type="submit"]:hover { background: var(--primary-hover); transform: translateY(-1px); }
button[type="submit"]:disabled { opacity: 0.65; cursor: wait; transform: none; }

.fineprint {
  font-size: 11.5px;
  color: var(--text-faint);
  margin: 4px 0 0;
  line-height: 1.5;
  text-align: center;
}

/* --- Success state ------------------------------------------- */
.success {
  text-align: center;
  padding: 12px 0 4px;
}
.success svg { margin: 0 auto 12px; }
.success h3 {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}
.success p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 20px;
  line-height: 1.5;
}
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--surface);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  transition: background 140ms ease;
}
.download-btn:hover { background: var(--primary-hover); color: var(--surface); text-decoration: none; }

/* --- Tiers section ------------------------------------------- */
.tiers {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.section-lede {
  text-align: center;
  max-width: 62ch;
  margin: 0 auto 48px;
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.55;
}
.tiers h2,
.signals h2,
.about h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-align: center;
  margin: 6px 0 20px;
  color: var(--text);
}
.about h2 { text-align: left; }

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}
.tier {
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--border-strong);
  border-radius: 10px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.tier:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tier-1 { border-top-color: #B0AC9F; }
.tier-2 { border-top-color: #C2A557; }
.tier-3 { border-top-color: #7FA57F; }
.tier-4 { border-top-color: var(--primary); background: var(--primary-tint); }
.tier-4.featured { box-shadow: var(--shadow-md); }

.tier-num {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tier h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}
.tier-verdict {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--primary);
  margin: 0;
  font-style: italic;
}
.tier p:not(.tier-verdict):not(.lockin) {
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.55;
  margin: 4px 0 0;
}
.tier .lockin {
  margin: auto 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tier .lockin strong {
  color: var(--text);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13.5px;
}

.inline-cta {
  display: block;
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  font-size: 16px;
  margin-top: 10px;
}
.inline-cta:hover { color: var(--primary-hover); }

/* --- Signals section ----------------------------------------- */
.signals { background: var(--bg); border-bottom: 1px solid var(--border); }
.signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 44px;
}
.signal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 22px 22px 22px 22px;
}
.signal .date {
  display: block;
  font-size: 11.5px;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.signal p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.55;
}
.signal p strong { color: var(--text); font-weight: 700; }
.signal em { font-style: italic; color: var(--text-muted); }

/* --- About / final CTA --------------------------------------- */
.about { background: var(--surface); border-bottom: 1px solid var(--border); }
.about-inner {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 780px) {
  .about-inner { grid-template-columns: minmax(0, 2fr) auto; }
}
.about p {
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  max-width: 60ch;
  margin: 0 0 14px;
}
.about p:last-of-type { color: var(--text-muted); }
.secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  background: var(--primary);
  color: var(--surface);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: background 140ms ease, transform 140ms ease;
}
.secondary-cta:hover { background: var(--primary-hover); color: var(--surface); text-decoration: none; transform: translateY(-1px); }

/* --- Footer -------------------------------------------------- */
footer {
  padding: 32px clamp(20px, 5vw, 56px);
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

/* --- Reduced motion ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
