/*
 * Obstetric Decision Tools — Landing page styles
 * Extends shared.css
 */

/* ─── App shell override for landing page ────────────────────────────────── */
.landing-app {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 0 env(safe-area-inset-bottom);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  body {
    padding: 32px 20px;
    background: var(--ot-bg);
  }
  .landing-app {
    background: var(--ot-surface);
    border-radius: var(--ot-radius-xl);
    min-height: calc(100vh - 64px);
    box-shadow:
      0 0 0 1px var(--ot-border),
      0 8px 32px rgba(15, 23, 42, 0.07);
    overflow: hidden;
  }
}

/* ─── Hero header ────────────────────────────────────────────────────────── */
.hero {
  padding: 32px 24px 24px;
  border-bottom: 1px solid var(--ot-border);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ot-text-muted);
  margin-bottom: 12px;
}

.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ot-accent);
}

.hero h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ot-text);
  margin: 0 0 10px;
  line-height: 1.15;
}

.hero p {
  font-size: 14px;
  color: var(--ot-text-muted);
  margin: 0;
  line-height: 1.6;
  max-width: 440px;
}

/* ─── Tool grid ──────────────────────────────────────────────────────────── */
.tools-section {
  padding: 20px 20px 0;
  flex: 1;
}

.tools-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ot-text-soft);
  margin-bottom: 12px;
}

.tools-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

@media (min-width: 480px) {
  .tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── Tool card ──────────────────────────────────────────────────────────── */
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--ot-surface);
  border: 1.5px solid var(--ot-border);
  border-radius: var(--ot-radius);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.1s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.tool-card:active {
  transform: scale(0.98);
}
.tool-card:hover {
  border-color: var(--ot-border-strong);
  box-shadow: var(--ot-shadow);
}
.tool-card:focus-visible {
  outline: 2px solid var(--ot-accent);
  outline-offset: 2px;
}

/* Stripe accent on left border */
.tool-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--ot-accent);
  border-radius: 3px 0 0 3px;
}
.tool-card.labour::before {
  background: var(--ot-success);
}

.tool-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 4px;
  align-self: flex-start;
  background: var(--ot-accent-soft);
  color: var(--ot-accent);
}
.tool-card.labour .tool-card-tag {
  background: var(--ot-success-soft);
  color: var(--ot-success);
}

.tool-card h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ot-text);
  margin: 0;
  line-height: 1.3;
}

.tool-card p {
  font-size: 12px;
  color: var(--ot-text-muted);
  margin: 0;
  line-height: 1.5;
}

.tool-card-arrow {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  justify-content: flex-end;
}
.tool-card-arrow svg {
  width: 16px;
  height: 16px;
  color: var(--ot-text-soft);
  transition: transform 0.15s;
}
.tool-card:hover .tool-card-arrow svg {
  transform: translateX(3px);
}

/* ─── Install section ────────────────────────────────────────────────────── */
.install-section {
  margin: 0 20px 20px;
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius);
  overflow: hidden;
}

.install-section-header {
  padding: 12px 16px;
  background: var(--ot-surface-2);
  border-bottom: 1px solid var(--ot-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.install-section-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ot-primary);
  color: var(--ot-primary-fg);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.install-section-icon svg {
  width: 16px;
  height: 16px;
}

.install-section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--ot-text);
}

.install-section-sub {
  font-size: 12px;
  color: var(--ot-text-muted);
  margin-top: 1px;
}

.install-steps {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.install-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--ot-text);
  line-height: 1.4;
}

.install-step-os {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
}
.install-step-os.ios {
  background: #f1f5f9;
  color: var(--ot-text-muted);
}
.install-step-os.android {
  background: #dcfce7;
  color: #15803d;
}

/* ─── Dismiss install button ─────────────────────────────────────────────── */
#pwa-install-btn {
  -webkit-appearance: none;
  appearance: none;
  margin: 0 20px 16px;
  width: calc(100% - 40px);
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ot-primary-fg);
  background: var(--ot-primary);
  border: none;
  border-radius: var(--ot-radius-sm);
  cursor: pointer;
  min-height: 46px;
  display: none; /* shown by JS when browser supports install */
  align-items: center;
  justify-content: center;
  gap: 8px;
  touch-action: manipulation;
  transition: opacity 0.15s;
}
#pwa-install-btn:active {
  opacity: 0.85;
}

/* ─── Section reference link (below tool grids) ─────────────────────────── */
.section-ref-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  margin: -12px 0 20px;
  font-size: 13px;
  color: var(--ot-text-muted);
  text-decoration: none;
  border-radius: var(--ot-radius-sm);
  border: 1px solid var(--ot-border);
  background: var(--ot-surface);
  transition:
    background 0.15s,
    border-color 0.15s;
}
.section-ref-link:hover {
  background: var(--ot-surface-2);
  border-color: var(--ot-border-strong);
}
.section-ref-link:active {
  background: var(--ot-surface-3);
  transform: scale(0.99);
}
.section-ref-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.section-ref-link svg:last-child {
  margin-left: auto;
  color: var(--ot-text-soft);
}
.section-ref-link span {
  flex: 1;
  min-width: 0;
}

/* ─── Landing footer ─────────────────────────────────────────────────────── */
.landing-footer {
  border-top: 1px solid var(--ot-border);
  padding: 16px 24px;
  font-size: 11px;
  color: var(--ot-text-soft);
  line-height: 1.6;
  text-align: center;
}
