/* Automation detail pages (site/automations/*.html).
   Builds on the tokens and glass material in styles.css; nothing here restyles shared pieces. */

/* ---------- hero ---------- */
.ap-hero { padding-block: clamp(28px, 4vw, 48px) clamp(56px, 8vw, 96px); }
.ap-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-weight: 600; font-size: 0.9375rem; text-decoration: none; }
.ap-back:hover { color: var(--ink); }
.ap-back svg { width: 16px; height: 16px; }
.ap-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 80px); align-items: center; margin-top: 12px; }
.ap-copy { display: grid; gap: 22px; justify-items: start; }
.ap-price { display: grid; gap: 4px; padding: 14px 18px; border-radius: 16px; border: 1px solid var(--rim); background: rgb(255 255 255 / 0.04); }
.ap-price b { font: 600 1.0625rem/1.3 var(--mono); color: var(--ink); }
.ap-price span { font-size: 0.875rem; color: var(--muted); }
.ap-try[hidden] { display: none; }
.ap-try svg { width: 12px; height: 12px; }
.ap-visual { display: grid; justify-items: center; gap: 14px; min-width: 0; }

/* ---------- static phone: what the customer sees ---------- */
.ap-phone .screen { display: grid; grid-template-rows: auto minmax(0, 1fr); padding-top: 40px; text-align: left; }
.ap-thread { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 0; margin: 0; padding: 12px; list-style: none; overflow: hidden; }
.ap-thread li { max-width: 86%; padding: 8px 11px; font-size: 0.75rem; line-height: 1.4; overflow-wrap: anywhere; }
.ap-thread small { display: block; margin-top: 4px; font: 500 0.58rem/1.3 var(--mono); color: var(--night-muted); }
.ap-thread .sys { align-self: center; max-width: none; padding: 2px 0; font: 600 0.58rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--night-muted); text-align: center; }
.ap-thread .sys.miss { color: #fca5a5; }
.ap-thread .in { align-self: flex-start; border-radius: 16px 16px 16px 4px; background: rgb(255 255 255 / 0.10); }
.ap-thread .in.auto { background: linear-gradient(160deg, rgb(242 169 59 / 0.34), rgb(242 169 59 / 0.14)); border: 1px solid rgb(255 201 112 / 0.45); }
.ap-thread .out { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: rgb(56 120 255 / 0.32); }
.ap-thread .lnk { color: #7dd3fc; text-decoration: underline; text-underline-offset: 2px; }

/* lock screen with notifications (the owner's phone) */
.ap-lock { display: grid; align-content: start; justify-items: center; gap: 4px; padding: 56px 12px 16px; }
.ap-lock-time { font: 300 3.25rem/1 var(--body); letter-spacing: -0.02em; }
.ap-lock-date { font-size: 0.75rem; color: var(--night-muted); margin-bottom: 18px; }
.ap-note { width: 100%; display: grid; gap: 2px; padding: 10px 12px; margin-top: 8px; border-radius: 16px; background: rgb(255 255 255 / 0.10); border: 1px solid var(--rim); font-size: 0.75rem; line-height: 1.35; text-align: left; }
.ap-note small { font: 500 0.58rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--night-muted); }
.ap-note b { font-size: 0.8125rem; }
.ap-note.lead { background: linear-gradient(160deg, rgb(242 169 59 / 0.34), rgb(242 169 59 / 0.14)); border-color: rgb(255 201 112 / 0.45); }

/* ---------- data moving between tools ---------- */
.ap-sync { width: 100%; max-width: 460px; display: grid; gap: 12px; }
.ap-box { display: grid; gap: 8px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--rim); background: rgb(255 255 255 / 0.05); box-shadow: inset 0 1px 0 var(--rim-hi); min-width: 0; }
.ap-box-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-weight: 600; font-size: 0.9375rem; }
.ap-box-head svg { flex: none; width: 18px; height: 18px; color: var(--carbon-deep); }
.ap-box-head .auto-tag { margin-left: auto; font-size: 0.6875rem; font-family: var(--mono); }
.ap-box dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 12px; margin: 0; font-size: 0.8125rem; }
.ap-box dt { color: var(--muted); }
.ap-box dd { margin: 0; overflow-wrap: anywhere; }
.ap-box.is-new { border-color: rgb(255 201 112 / 0.55); background: linear-gradient(160deg, rgb(242 169 59 / 0.18), rgb(255 255 255 / 0.03)); }
.ap-sync-arrow { justify-self: center; display: flex; align-items: center; gap: 8px; font: 600 0.6875rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--carbon-deep); }
.ap-sync-arrow svg { width: 18px; height: 18px; }
.ap-dests { display: grid; gap: 10px; }

/* ---------- step-by-step walk-through ---------- */
.ap-flow-card { margin-bottom: clamp(28px, 4vw, 44px); }
.ap-flow-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.ap-walk { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.ap-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; border: 1px solid var(--rim); box-shadow: var(--shadow); }
.ap-figure { margin: 0; display: grid; gap: 10px; justify-items: center; }
.ap-figure figcaption { font-size: 0.8125rem; color: var(--muted); text-align: center; }
.ap-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: apstep; }
.ap-steps li { position: relative; display: grid; gap: 4px; padding-left: 52px; counter-increment: apstep; }
.ap-steps li::before { content: counter(apstep); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--carbon); color: var(--on-accent); font: 700 1rem/1 var(--display); }
.ap-when { font: 600 0.75rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--carbon-deep); }
.ap-steps p { color: var(--ink); }

/* ---------- install timeline ---------- */
.ap-tl-intro { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(28px, 4vw, 44px); }
.ap-tl { --tl-col: 150px; --tl-gap: 56px; --tl-x: calc(var(--tl-col) + var(--tl-gap) / 2); list-style: none; margin: 0; padding: 0; display: grid; }
.ap-tl > li { position: relative; display: grid; grid-template-columns: minmax(0, var(--tl-col)) minmax(0, 1fr); column-gap: var(--tl-gap); row-gap: 6px; padding-bottom: 36px; }
.ap-tl > li:last-child { padding-bottom: 0; }
.ap-tl > li::before { content: ""; position: absolute; left: calc(var(--tl-x) - 8px); top: 0.3em; width: 16px; height: 16px; border-radius: 50%; background: var(--field, #0F172A); border: 3px solid var(--carbon); box-shadow: 0 0 0 5px rgb(242 169 59 / 0.16); }
.ap-tl > li::after { content: ""; position: absolute; left: calc(var(--tl-x) - 1px); top: calc(0.3em + 22px); bottom: 4px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, rgb(255 201 112 / 0.7), var(--rim)); }
.ap-tl > li:last-child::after { display: none; }
.ap-tl > li.is-live::before { background: var(--carbon); box-shadow: 0 0 0 6px rgb(242 169 59 / 0.25), 0 0 24px 4px rgb(242 169 59 / 0.45); }
.ap-tl-when { justify-self: end; text-align: right; font: 600 0.8125rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--carbon-deep); }
.ap-tl-body { display: grid; gap: 8px; min-width: 0; }
.ap-tl-body h3 { font-size: 1.375rem; line-height: 1.15; }
.ap-tl-body p { color: var(--muted); }
.ap-tl-body ul { margin: 0; padding-left: 1.15em; display: grid; gap: 4px; color: var(--muted); }
.ap-you { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; justify-self: start; padding: 6px 12px; border-radius: 12px; background: rgb(255 255 255 / 0.06); border: 1px solid var(--rim); font-size: 0.8125rem; color: var(--ink); }
.ap-you b { font: 600 0.6875rem/1.6 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--carbon-deep); }

/* ---------- good to know + other automations ---------- */
.ap-know { display: grid; gap: 16px; }
.ap-know .checklist { color: var(--ink); }
.ap-others a.card { gap: 8px; padding: 22px; }
.ap-others .ph-title { font: 700 1.25rem/1.1 var(--display); }
.ap-others .ph-desc { color: var(--muted); font-size: 0.9375rem; }

@media (max-width: 900px) {
  .ap-hero-grid, .ap-walk { grid-template-columns: minmax(0, 1fr); }
  .ap-walk .ap-figure { order: 2; }
  /* shorter phone so the texts aren't floating under a tall empty screen */
  .ap-phone { width: min(280px, 78vw); aspect-ratio: 9 / 15.5; }
}
@media (max-width: 640px) {
  .ap-tl { --tl-x: 8px; }
  .ap-tl > li { grid-template-columns: minmax(0, 1fr); padding-left: 36px; }
  .ap-tl-when { justify-self: start; text-align: left; }
  .ap-copy .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-back, .ap-others a.card { transition: none; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
