/*
  DeployStatus marketing site.

  Written for this site — no framework, no vendor stylesheet. The visual ideas
  (shallow diagonal section edges, editorial headline scale, reveal-on-scroll)
  are ours to own; the palette and type come from the app so the hand-off from
  deploystatus.com to app.deploystatus.com doesn't look like two products.
*/

/* ============================ FONT ============================ */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The app's wordmark face. Loaded at the one weight the header uses. */
@font-face {
  font-family: 'Jura';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/jura-latin-300-normal.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================ TOKENS ============================ */

:root {
  /* Brand teal — hsl(174 100% 29%), the app's --primary. */
  --teal: #009488;
  --teal-dark: #00786f;
  --teal-darker: #005c55;
  --teal-wash: #e6f6f4;

  --ink: #0c1a1c;
  --ink-soft: #2f4447;
  --muted: #64777a;

  --surface: #ffffff;
  --tint: #f2f8f7;
  --border: #dde8e7;

  /* The app's header bar, verbatim: --header-bg / --header-text in
     packages/frontend/src/index.css. The two headers must not drift. */
  --header-bg: hsl(200 19% 18%);
  --header-text: #ffffff;

  --container: 1180px;
  --header-h: 72px;

  --radius: 14px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 2px rgba(12, 26, 28, 0.06), 0 4px 12px rgba(12, 26, 28, 0.04);
  --shadow-md: 0 2px 6px rgba(12, 26, 28, 0.06), 0 18px 40px rgba(12, 26, 28, 0.08);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Depth of the diagonal section edges. */
  --slice: 2.2deg;
}

/* ============================ RESET ============================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--surface);
  color: var(--ink-soft);
  font-family:
    'Inter',
    ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--teal-dark);
  text-decoration: none;
}

a:hover {
  color: var(--teal-darker);
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.1;
}

ul,
ol {
  list-style: none;
}

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
  color: #fff;
}

.container {
  width: min(var(--container), 90%);
  margin-inline: auto;
}

/* ============================ TYPE SCALE ============================ */

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(2.6rem, 6.4vw, 4.4rem);
  letter-spacing: -0.035em;
}

.hero-title em {
  font-style: normal;
  color: var(--teal-dark);
}

.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  max-width: 22ch;
}

.section-lede {
  margin-top: 18px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ============================ BUTTONS ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition:
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

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

.btn-lg {
  padding: 15px 28px;
  font-size: 16px;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}

.btn-primary:hover {
  background: var(--teal-dark);
  color: #fff;
}

.btn-outline {
  border-color: var(--border);
  background: var(--surface);
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--teal);
  color: var(--teal-darker);
}

.btn-ghost {
  color: var(--ink);
  border-color: transparent;
  background: transparent;
}

.btn-ghost:hover {
  color: var(--teal-darker);
  background: var(--teal-wash);
}

/* ============================ HEADER ============================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  color: var(--header-text);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s var(--ease);
}

.site-header.is-stuck {
  box-shadow: var(--shadow-md);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--header-text);
  /* Jura 300 at 20px is the app's wordmark (Header.tsx). One weight, one
     colour -- no bold 'Status', no logo mark. */
  font-family: 'Jura', ui-sans-serif, system-ui, sans-serif;
  font-size: 20px;
  font-weight: 300;
}

.brand:hover {
  color: var(--header-text);
}

.main-nav {
  display: flex;
  gap: 26px;
  margin-right: auto;
  font-size: 15px;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.8);
  padding-block: 6px;
  border-bottom: 2px solid transparent;
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.main-nav a:hover {
  color: var(--header-text);
  border-bottom-color: var(--teal);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.link-login {
  font-size: 15px;
  font-weight: 500;
  color: var(--header-text);
}

.link-login:hover {
  color: rgba(255, 255, 255, 0.75);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-sm);
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--header-text);
  transition: transform 0.3s var(--ease);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 5% 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--header-bg);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  padding: 12px 4px;
  color: var(--header-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.mobile-nav .btn {
  margin-top: 12px;
  border-bottom: 0;
  color: #fff;
}

@media (max-width: 900px) {
  .main-nav,
  .header-actions {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }
}

@media (min-width: 901px) {
  .mobile-nav {
    display: none;
  }
}

/* ============================ HERO ============================ */

.hero {
  position: relative;
  padding: clamp(70px, 11vw, 132px) 0 clamp(96px, 13vw, 168px);
  background:
    radial-gradient(60% 120% at 82% -10%, var(--teal-wash) 0%, transparent 62%), var(--surface);
}

.hero-compact {
  padding-block: clamp(60px, 9vw, 104px) clamp(80px, 11vw, 132px);
}

.hero-inner {
  max-width: 900px;
}

.hero-lede {
  margin-top: 26px;
  max-width: 62ch;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.hero-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}

/* The shallow diagonal that carries the eye into the next section. */
.hero-slice,
.section-slice {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -1px;
  height: 92px;
  background: var(--tint);
  transform: skewY(calc(-1 * var(--slice)));
  transform-origin: bottom right;
  pointer-events: none;
}

.section-slice {
  background: var(--tint);
}

/* ============================ SECTIONS ============================ */

.section {
  position: relative;
  padding: clamp(72px, 10vw, 120px) 0;
}

.section-tint {
  background: var(--tint);
}

.section > .container {
  position: relative;
  z-index: 1;
}

/* ============================ FEATURES ============================ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 48px;
}

.feature-card {
  position: relative;
  padding: 30px 28px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-darker) 100%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: #cfe2e0;
  box-shadow: var(--shadow-md);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card h3 {
  font-size: 1.16rem;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.97rem;
  color: var(--muted);
}

/* ============================ STEPS ============================ */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px 34px;
  margin-top: 52px;
}

.step {
  position: relative;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.step-num {
  position: absolute;
  top: -13px;
  left: 0;
  padding-right: 12px;
  background: var(--surface);
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.step h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.step p {
  color: var(--muted);
  font-size: 0.97rem;
}

/* ============================ PRICING ============================ */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 52px;
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  /* Top padding leaves room for the featured card's flag on every card, so the
     plan names and prices line up across the row. */
  padding: 54px 28px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.plan-card-featured {
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
}

.plan-flag {
  position: absolute;
  top: 20px;
  left: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--teal-wash);
  color: var(--teal-darker);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.plan-card h3 {
  font-size: 1.3rem;
}

.plan-tagline {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

.plan-price {
  margin-top: 22px;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.plan-price-note {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 4px;
}

.plan-points {
  margin: 26px 0 30px;
  display: grid;
  gap: 11px;
  font-size: 0.95rem;
}

.plan-points li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-soft);
}

.plan-points li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(-45deg);
}

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

/* ============================ CLOSING CTA ============================ */

.cta {
  padding: clamp(76px, 10vw, 116px) 0;
  background: linear-gradient(135deg, var(--teal-darker) 0%, var(--teal) 100%);
  color: rgba(255, 255, 255, 0.86);
}

.cta-inner {
  max-width: 720px;
}

.cta h2 {
  color: #fff;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  max-width: 20ch;
}

.cta p {
  margin-top: 18px;
  max-width: 54ch;
}

.cta .btn-primary {
  background: #fff;
  color: var(--teal-darker);
}

.cta .btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--teal-darker);
}

.cta .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.cta .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ============================ PROSE PAGES ============================ */

.prose-page {
  padding: clamp(56px, 8vw, 96px) 0 clamp(72px, 10vw, 112px);
}

.prose {
  max-width: 74ch;
}

.prose h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.prose h2 {
  font-size: 1.3rem;
  margin-top: 40px;
  margin-bottom: 12px;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose p {
  margin-top: 14px;
}

.prose ul {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.prose ul li {
  position: relative;
  padding-left: 20px;
}

.prose ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--teal);
}

.prose-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.callout {
  margin-top: 28px;
  padding: 18px 20px;
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--tint);
  font-size: 0.97rem;
}

/* ============================ FOOTER ============================ */

.site-footer {
  padding: clamp(56px, 7vw, 80px) 0 32px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.93rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(140px, 1fr));
  gap: 40px 28px;
}

@media (max-width: 760px) {
  .footer-inner {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

.footer-brand .brand-name {
  color: #fff;
  font-size: 18px;
}

.footer-brand .brand-name strong {
  color: #4ecbbf;
}

.footer-brand p {
  margin-top: 12px;
  max-width: 42ch;
  font-size: 0.9rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h2 {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
}

.site-footer a:hover {
  color: #fff;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================ REVEAL ============================ */

/*
  Reveal-on-scroll, done in CSS with a scroll-driven animation rather than an
  IntersectionObserver. The failure mode matters more than the technique here:
  a JS-driven reveal hides content up front and leaves the page blank for
  anything that doesn't run the script (a crawler, a screenshotter, a script
  error further up the file). This way the content is visible by default and the
  animation is pure decoration on browsers that support it.
*/
@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    [data-reveal] {
      animation: reveal-in 0.8s var(--ease) both;
      animation-timeline: view();
      animation-range: entry 4% cover 24%;
    }
  }
}

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

  .btn:hover,
  .feature-card:hover {
    transform: none;
  }
}
