/*
 * Ember: components
 * Needs tokens.css first. Every class starts with "em-" so it can sit next to any other CSS.
 */

/* Base */
.em { margin: 0; background: var(--em-white); color: var(--em-ink); font-family: var(--em-sans); font-size: var(--em-text-body); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.em *, .em *::before, .em *::after { box-sizing: border-box; }
.em img { max-width: 100%; display: block; }
.em-container { width: min(100% - 48px, var(--em-container)); margin-inline: auto; }
.em-narrow { width: min(100% - 48px, var(--em-narrow)); margin-inline: auto; }
.em-center { text-align: center; }
.em-center .em-lead { margin-inline: auto; }

/* Sections */
.em-section { padding-block: var(--em-section); }
.em-section--sand { background: var(--em-sand); }
.em-section--ember { position: relative; overflow: hidden; background: var(--em-ember); color: var(--em-white); }
.em-section--ember .em-lead { color: rgba(255, 255, 255, .86); }
.em-section--night { background: var(--em-night); color: var(--em-white); }
.em-section--night .em-lead { color: rgba(255, 255, 255, .66); }
.em-divider { height: 1px; border: 0; background: var(--em-line); }

/* Type: serif headlines at regular weight, never bold; sans for everything else */
.em-hero-title, .em-h2, .em-h3 { margin: 0; font-family: var(--em-serif); font-weight: 400; color: inherit; }
.em-hero-title { font-size: var(--em-text-hero); letter-spacing: var(--em-tracking-hero); line-height: 1.02; }
.em-h2 { font-size: var(--em-text-h2); letter-spacing: var(--em-tracking-h2); line-height: 1.08; }
.em-h3 { font-size: var(--em-text-h3); letter-spacing: -.015em; line-height: 1.2; }
.em-accent { color: var(--em-ember); }
.em-lead { max-width: 640px; margin: 20px 0 0; color: var(--em-soft); font-size: var(--em-text-lead); line-height: 1.5; }
.em-eyebrow { display: inline-block; margin-bottom: 16px; color: var(--em-ember); font-size: var(--em-text-small); font-weight: 600; }
.em-mono { font-family: var(--em-mono); font-size: var(--em-text-micro); }

/* Announcement bar: a sand strip with rounded ends, above the nav */
.em-announce { display: block; margin: 12px auto 0; width: min(100% - 32px, 1240px); padding: 9px 16px; border-radius: var(--em-radius-sm); background: var(--em-sand); color: var(--em-ink); font-size: var(--em-text-small); font-weight: 500; text-align: center; text-decoration: none; }
.em-announce:hover { background: var(--em-sand-2); }

/* Nav */
.em-nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 18px; }
.em-nav__links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.em-nav__links a { color: var(--em-ink); text-decoration: none; }
.em-nav__links a:hover { color: var(--em-soft); }

/* Buttons: pills. Ember for the one main action, sand for everything else */
.em-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border: 0; border-radius: var(--em-radius-pill); font-family: var(--em-sans); font-size: 16px; font-weight: 500; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .2s var(--em-ease), transform .2s var(--em-ease); }
.em-btn:active { transform: scale(.98); }
.em-btn--primary { background: var(--em-ember); color: var(--em-white); }
.em-btn--primary:hover { background: var(--em-ember-dark); }
.em-btn--secondary { background: var(--em-sand); color: var(--em-ink); }
.em-btn--secondary:hover { background: var(--em-sand-2); }
.em-btn--white { background: var(--em-white); color: var(--em-ink); }
.em-btn--ghost { border: 1px solid rgba(255, 255, 255, .5); background: transparent; color: var(--em-white); }
.em-btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.em-btn--sm { padding: 8px 16px; font-size: 15px; }
.em-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.em-center .em-actions { justify-content: center; }

/* Segmented toggle: two or three options in a sand pill */
.em-segment { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--em-radius-pill); background: var(--em-sand); }
.em-segment button { padding: 7px 16px; border: 0; border-radius: var(--em-radius-pill); background: transparent; color: var(--em-soft); font: 500 14px var(--em-sans); cursor: pointer; }
.em-segment button[aria-pressed="true"] { background: var(--em-white); color: var(--em-ink); box-shadow: 0 1px 3px rgba(20, 18, 16, .12); }

/* Product stage: a wide rounded panel with a soft peach glow, holding layered windows */
.em-stage { position: relative; overflow: hidden; min-height: 520px; padding: 56px 48px 0; border-radius: var(--em-radius-lg); background: radial-gradient(120% 90% at 50% 0%, var(--em-sand) 0%, var(--em-peach) 70%, #f6c2aa 100%); }
.em-stage__dots { position: absolute; inset: 0; background-image: radial-gradient(var(--em-ember) 1.2px, transparent 1.4px); background-size: 46px 46px; opacity: .14; pointer-events: none; }

/* Window: an app window with traffic lights; --night for terminals */
.em-window { position: relative; overflow: hidden; border: var(--em-border); border-radius: var(--em-radius); background: var(--em-white); box-shadow: var(--em-shadow-lg); }
.em-window__bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: var(--em-border); color: var(--em-soft); font-size: var(--em-text-micro); font-weight: 500; }
.em-window__lights { display: flex; gap: 6px; }
.em-window__lights i { width: 10px; height: 10px; border-radius: 50%; background: #ff6159; }
.em-window__lights i:nth-child(2) { background: #ffbd2e; }
.em-window__lights i:nth-child(3) { background: #28c840; }
.em-window__body { padding: 20px; }
.em-window--night { border-color: #2d2a33; background: var(--em-night); color: #e7e3ee; }
.em-window--night .em-window__bar { border-color: #2d2a33; color: #8c8697; }
.em-window--night .em-window__body { font-family: var(--em-mono); font-size: 12.5px; line-height: 1.7; }

/* Phone: a small device frame for notifications and mobile UI */
.em-phone { width: 230px; padding: 10px; border: var(--em-border); border-radius: 30px; background: var(--em-white); box-shadow: var(--em-shadow-lg); }
.em-phone__screen { overflow: hidden; border-radius: 22px; background: var(--em-sand); }

/* Chips inside product UI */
.em-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--em-radius-pill); background: var(--em-sand); color: var(--em-ink); font-size: var(--em-text-micro); font-weight: 500; }
.em-chip--ember { background: var(--em-ember); color: var(--em-white); }
.em-chip--soft { background: var(--em-ember-soft); color: var(--em-ember-dark); }
.em-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Logo wall: wordmarks in one gray, two rows */
.em-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px 52px; padding-block: 48px; border-bottom: var(--em-border); color: var(--em-ink); font-weight: 700; font-size: 22px; letter-spacing: -.02em; opacity: .85; }

/* Feature cards: white, thin border, an icon tile on top */
.em-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.em-card { padding: 24px; border: var(--em-border); border-radius: var(--em-radius); background: var(--em-white); color: var(--em-ink); box-shadow: var(--em-shadow); }
.em-card__icon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 56px; border-radius: 10px; background: var(--em-ember-soft); color: var(--em-ember); font-size: 18px; }
.em-card__title { margin: 0 0 6px; font-family: var(--em-sans); font-size: 18px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.em-card__text { margin: 0; color: var(--em-soft); font-size: 15px; }

/* Quote: a big serif pull quote with a small byline */
.em-quote { margin: 0; }
.em-quote blockquote { margin: 0; font-family: var(--em-serif); font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; line-height: 1.25; }
.em-quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: 24px; color: var(--em-soft); font-size: var(--em-text-small); }
.em-quote figcaption strong { display: block; color: var(--em-ink); font-weight: 600; }
.em-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--em-sand-2); }

/* Stat row */
.em-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.em-stat strong { display: block; font-family: var(--em-serif); font-size: 56px; font-weight: 400; letter-spacing: -.04em; line-height: 1; }
.em-stat span { color: var(--em-soft); font-size: 15px; }

/* Entrance: a slow, small fade up */
.em-fade { animation: em-fade 1s var(--em-ease) backwards; }
@keyframes em-fade { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  .em-fade { animation: none; }
  .em-btn { transition: none; }
}

/* Pricing plans: white cards; the featured one gets an ember border and label */
.em-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.em-plan { display: flex; flex-direction: column; padding: 28px; border: var(--em-border); border-radius: var(--em-radius); background: var(--em-white); box-shadow: var(--em-shadow); text-align: left; }
.em-plan--featured { border-color: var(--em-ember); box-shadow: var(--em-shadow-lg); }
.em-plan__label { align-self: flex-start; margin-bottom: 14px; }
.em-plan__name { margin: 0; font-size: 18px; font-weight: 600; }
.em-plan__desc { margin: 6px 0 20px; color: var(--em-soft); font-size: 15px; }
.em-plan__price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 20px; }
.em-plan__price strong { font-family: var(--em-serif); font-size: 52px; font-weight: 400; letter-spacing: -.04em; line-height: 1; }
.em-plan__price span { color: var(--em-soft); font-size: var(--em-text-small); }
.em-plan__list { flex: 1; margin: 0 0 24px; padding: 20px 0 0; border-top: var(--em-border); list-style: none; font-size: 15px; }
.em-plan__list li { position: relative; padding: 5px 0 5px 26px; }
.em-plan__list li::before { content: "✓"; position: absolute; left: 0; color: var(--em-ember); font-weight: 600; }
.em-plan .em-btn { width: 100%; }

/* Table: thin lines, sand header row */
.em-table { width: 100%; border-collapse: collapse; font-size: 15px; text-align: left; }
.em-table th, .em-table td { padding: 14px 16px; border-bottom: var(--em-border); }
.em-table thead th { background: var(--em-sand); font-weight: 600; }
.em-table thead th:first-child { border-top-left-radius: var(--em-radius-sm); }
.em-table thead th:last-child { border-top-right-radius: var(--em-radius-sm); }
.em-table td:not(:first-child), .em-table th:not(:first-child) { text-align: center; }
.em-table__yes { color: var(--em-ember); font-weight: 600; }
.em-table__no { color: var(--em-faint); }
.em-table-wrap { overflow-x: auto; }

/* FAQ: <details> rows with a plus that turns into a cross */
.em-faq { border-top: var(--em-border); text-align: left; }
.em-faq details { border-bottom: var(--em-border); }
.em-faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font-size: 17px; font-weight: 500; list-style: none; cursor: pointer; }
.em-faq summary::-webkit-details-marker { display: none; }
.em-faq summary::after { content: "+"; color: var(--em-soft); font-size: 22px; line-height: 1; transition: transform .2s var(--em-ease); }
.em-faq details[open] summary::after { transform: rotate(45deg); }
.em-faq details p { margin: 0 0 20px; color: var(--em-soft); }

/* Article typography: serif headings, comfortable sans body */
.em-prose { color: var(--em-ink); font-size: 18px; line-height: 1.75; }
.em-prose > * + * { margin-top: 1.2em; }
.em-prose p { margin-bottom: 0; }
.em-prose h2 { margin: 2em 0 0; font-family: var(--em-serif); font-size: 34px; font-weight: 400; letter-spacing: -.025em; line-height: 1.15; }
.em-prose h3 { margin: 1.6em 0 0; font-family: var(--em-sans); font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.em-prose ul, .em-prose ol { padding-left: 1.2em; }
.em-prose li + li { margin-top: .4em; }
.em-prose li::marker { color: var(--em-ember); }
.em-prose a { color: var(--em-ember-dark); text-underline-offset: 3px; }
.em-prose blockquote { margin: 2em 0; padding-left: 24px; border-left: 2px solid var(--em-ember); font-family: var(--em-serif); font-size: 28px; letter-spacing: -.02em; line-height: 1.3; }
.em-prose code { padding: 2px 6px; border-radius: 6px; background: var(--em-sand); font-family: var(--em-mono); font-size: .85em; }
.em-prose pre { margin: 1.6em 0 0; padding: 20px; overflow-x: auto; border-radius: var(--em-radius); background: var(--em-night); color: #e7e3ee; font-family: var(--em-mono); font-size: 14px; line-height: 1.7; }
.em-prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.em-prose figure { margin: 2em 0 0; }
.em-prose figcaption { margin-top: 10px; color: var(--em-soft); font-size: var(--em-text-small); text-align: center; }

/* Callout: a sand box with an ember edge */
.em-callout { padding: 18px 20px; border-left: 3px solid var(--em-ember); border-radius: var(--em-radius-sm); background: var(--em-sand); font-size: 16px; line-height: 1.6; }
.em-callout strong { display: block; margin-bottom: 4px; }

/* Author line and author card */
.em-author { display: flex; align-items: center; gap: 12px; color: var(--em-soft); font-size: var(--em-text-small); }
.em-author strong { display: block; color: var(--em-ink); font-weight: 600; }
.em-author--card { padding: 24px; border: var(--em-border); border-radius: var(--em-radius); background: var(--em-white); }
.em-author--card .em-avatar { width: 56px; height: 56px; }
.em-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--em-soft); font-size: var(--em-text-small); }
.em-meta span + span::before { content: "·"; margin-right: 10px; color: var(--em-faint); }

/* Post card: for related articles */
.em-post { display: block; padding: 0 0 20px; border: var(--em-border); border-radius: var(--em-radius); background: var(--em-white); color: var(--em-ink); text-decoration: none; overflow: hidden; transition: box-shadow .2s var(--em-ease); }
.em-post:hover { box-shadow: var(--em-shadow); }
.em-post__thumb { height: 140px; margin-bottom: 18px; background: radial-gradient(120% 120% at 50% 0%, var(--em-sand) 0%, var(--em-peach) 100%); }
.em-post .em-eyebrow, .em-post h3, .em-post p { margin-inline: 20px; }
.em-post .em-eyebrow { margin-bottom: 8px; }
.em-post h3 { margin-top: 0; margin-bottom: 8px; font-family: var(--em-serif); font-size: 22px; font-weight: 400; letter-spacing: -.015em; line-height: 1.2; }
.em-post p { margin-top: 0; margin-bottom: 0; color: var(--em-soft); font-size: 14px; }

/* Forms */
.em-form { display: grid; gap: 18px; }
.em-field { display: grid; gap: 6px; }
.em-label { font-size: var(--em-text-small); font-weight: 500; }
.em-input, .em-select { width: 100%; padding: 11px 14px; border: var(--em-border); border-radius: var(--em-radius-sm); background: var(--em-white); color: var(--em-ink); font: 400 16px var(--em-sans); transition: border-color .2s var(--em-ease), box-shadow .2s var(--em-ease); }
.em-input::placeholder { color: var(--em-faint); }
.em-input:focus, .em-select:focus { border-color: var(--em-ember); outline: 0; box-shadow: 0 0 0 3px var(--em-ember-soft); }
.em-select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--em-soft) 50%), linear-gradient(135deg, var(--em-soft) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.em-input-wrap { position: relative; }
.em-input-wrap .em-input { padding-right: 64px; }
.em-input-toggle { position: absolute; top: 50%; right: 8px; padding: 4px 8px; border: 0; border-radius: var(--em-radius-sm); background: var(--em-sand); color: var(--em-ink); font: 500 12px var(--em-sans); transform: translateY(-50%); cursor: pointer; }
.em-help { color: var(--em-soft); font-size: 13px; }
.em-field--error .em-input { border-color: var(--em-ember); }
.em-error { color: var(--em-ember-dark); font-size: 13px; font-weight: 500; }
.em-check { display: flex; align-items: flex-start; gap: 10px; color: var(--em-soft); font-size: var(--em-text-small); }
.em-check input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--em-ember); }
.em-check a { color: var(--em-ink); }
.em-btn--block { width: 100%; }

/* "or" divider between two groups of actions */
.em-divider-text { display: flex; align-items: center; gap: 14px; color: var(--em-faint); font-size: 13px; }
.em-divider-text::before, .em-divider-text::after { content: ""; flex: 1; height: 1px; background: var(--em-line); }

/* Social sign-in: white pill with a letter tile */
.em-btn--social { border: var(--em-border); background: var(--em-white); color: var(--em-ink); }
.em-btn--social:hover { background: var(--em-sand); }
.em-btn__letter { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--em-sand-2); font-size: 12px; font-weight: 600; }

/* Footer: quiet columns on white with a thin top line */
.em-footer { padding-block: 56px 40px; border-top: var(--em-border); color: var(--em-soft); font-size: var(--em-text-small); }
.em-footer__cols { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
.em-footer h4 { margin: 0 0 12px; color: var(--em-ink); font-size: var(--em-text-small); font-weight: 600; }
.em-footer ul { margin: 0; padding: 0; list-style: none; }
.em-footer li + li { margin-top: 8px; }
.em-footer a { color: var(--em-soft); text-decoration: none; }
.em-footer a:hover { color: var(--em-ink); }
.em-footer__bottom { margin-top: 40px; padding-top: 20px; border-top: var(--em-border); }

@media (max-width: 860px) {
  .em-plans { grid-template-columns: 1fr; }
  .em-footer__cols { grid-template-columns: 1fr 1fr; }
}
