/*
 * The landing page's own stylesheet (#1102, #1998).
 *
 * Cortuno Design does the components: /static/theme/tokens.css and
 * /static/theme/bundle.css (web/theme, byte copies of the design system) are
 * linked before this file and carry the header, hero, cards, plan cards,
 * buttons, fields, notices and footer. What is left here is the page's own
 * layout - the width a section sits in, the space between sections, the grids
 * - and the few things the system has no component for: the language switch,
 * the legal pages' prose, the summary of an application.
 *
 * Every rule is served from this origin, so the Content-Security-Policy's
 * style-src 'self' holds with no 'unsafe-inline' and no remote stylesheet,
 * and there is no style attribute anywhere in the templates.
 *
 * Every colour, radius and family is a token; nothing here names a colour of
 * its own (web/theme's TestNoSiteStylesheetNamesAColourOfItsOwn). Dark mode is
 * the tokens' and follows the reader's own setting (data-theme="auto" on
 * <html>). There is no toggle, because a toggle needs somewhere to remember
 * the choice and the only state this site keeps about a visitor is the
 * language they read in.
 *
 * Class names: bundle.css gives .cbm-shell and .cbm-main to the back office's
 * frame (a full-height flex row), so this site's width container is .cbm-wrap
 * and its main element .cbm-site-main. Reusing the old names would have laid
 * every page out as a sidebar application.
 */

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

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

body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: 32px; }
h2 { font-size: 26px; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }

a { color: var(--action); text-underline-offset: 3px; }

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

/*
 * One width for every band on the page, the header's: the design system's
 * content width with a 16px gutter each side on a phone. The hero's inner
 * box is set to the same, so its text starts where the logo does.
 */
.cbm-wrap,
.cbm-hero-inner {
    width: min(var(--content-max), 100% - 32px);
    margin: 0 auto;
}

.cbm-wrap.cbm-narrow { width: min(44rem, 100% - 32px); }

.cbm-site-main { display: block; }

/* The skip link: off-screen until it is focused, which is the one moment it
   is useful. */
.cbm-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--action);
    color: var(--on-action);
    padding: 8px 16px;
}
.cbm-skip:focus { left: 0; z-index: 10; }

/* The honeypot's home. Moved off-screen rather than display:none, which some
   scripts skip - see the challenge component. */
.cbm-offscreen {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- header --------------------------------------------------------------- */

/*
 * SiteHeader holds a brand and one nav. This site adds the language switch
 * beside the nav, so the two share an end group; on a phone the nav moves to
 * the tabs row beneath the bar and the switch stays.
 */
.cbm-site-header-end {
    display: flex;
    align-self: stretch;
    align-items: center;
    gap: 28px;
}

.cbm-site-nav .cbm-btn {
    padding: 0 16px;
    border-bottom: 0;
    color: var(--on-action);
    font-weight: 600;
}
.cbm-site-nav .cbm-btn:hover { color: var(--on-action); }

.cbm-languages { display: flex; gap: 6px; }

.cbm-language {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 20px;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--text-muted);
}

.cbm-language-current {
    border-color: var(--tint-line);
    background: var(--tint);
    color: var(--text);
    font-weight: 600;
}

/* --- sections ------------------------------------------------------------- */

.cbm-section { padding: 56px 0; }
.cbm-section-muted {
    background: var(--surface-alt);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.cbm-section-lead { color: var(--text-muted); max-width: 62ch; font-size: 17px; margin-bottom: 28px; }

.cbm-cards {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.cbm-cards-compact { gap: var(--space-4); }

.cbm-card-list { margin: 0; max-width: none; font-size: 15px; color: var(--text-muted); }
.cbm-card-list li { margin-bottom: 10px; }
.cbm-card-list li:last-child { margin-bottom: 0; }

.cbm-list { padding-left: 20px; max-width: 62ch; }
.cbm-list li { margin-bottom: 8px; }

.cbm-closing { text-align: left; }
.cbm-closing p { max-width: 58ch; color: var(--text-muted); }

/* The design system's action row has no margin of its own; on a page it
   follows text, so it takes the space the hero gives it. */
.cbm-actions { margin: 28px 0 0; }

.cbm-fineprint { font-size: 14px; color: var(--text-muted); margin-top: 24px; }

/* --- notices and forms ---------------------------------------------------- */

.cbm-notice { margin: 0 0 20px; }
.cbm-notice h2 { font-size: 18px; color: inherit; }
.cbm-notice p:last-child, .cbm-notice ul:last-child { margin-bottom: 0; }
.cbm-notice ul { margin: 0; padding-left: 20px; }

.cbm-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    max-width: 34rem;
}

/* A short field (house number, postal code) keeps its own width rather than
   stretching to the form's. */
.cbm-input[size] { width: auto; min-width: 8rem; align-self: flex-start; }

/*
 * The country select. `color-scheme` is what makes the native dropdown's own
 * list follow the reader's theme - without it a dark page opens a white list,
 * which is the one part of a select a stylesheet cannot reach.
 */
.cbm-select { color-scheme: light dark; }

.cbm-consent {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

/* --- pricing -------------------------------------------------------------- */

/* The offer pages still use the plan-card headings. */
.cbm-plans-heading { margin-top: 40px; }
.cbm-plans + .cbm-plans-heading { margin-top: 56px; }
.cbm-plans { margin-top: 8px; }

/*
 * The price list (CORTUNO-2662). The plans share one grid and each card is a
 * subgrid spanning its nine rows - name, what it includes, price, button and
 * the five allowances - so every row sits at the same height in every plan.
 * Below 900px the cards stack and the subgrid is dropped.
 */
.cbm-pricing { display: flex; flex-direction: column; gap: 64px; }
.cbm-pricing-intro { max-width: 760px; }
.cbm-pricing-intro .cbm-section-lead { margin-bottom: 0; }
.cbm-pricing-intro .cbm-fineprint { margin: 14px 0 0; }
.cbm-pricing-block { display: flex; flex-direction: column; gap: 20px; }

.cbm-price-plans {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    column-gap: 24px;
}
.cbm-price-plan {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 9;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 28px 12px;
}
.cbm-price-head { padding-bottom: 16px; }
.cbm-price-head h2 { margin: 0; font-size: 24px; line-height: 32px; }
.cbm-price-for { margin: 4px 0 0; font-size: 15px; line-height: 22px; color: var(--text-muted); }

.cbm-price-includes { padding-bottom: 24px; }
.cbm-price-includes-heading { margin: 0 0 10px; font-size: 14px; line-height: 20px; font-weight: 600; }
.cbm-price-checks { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 22px; }
.cbm-price-checks li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.cbm-price-checks li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 6px;
    height: 11px;
    border: solid var(--action);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cbm-price-price { border-top: 1px solid var(--line); padding: 20px 0; }
.cbm-price-figure { margin: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cbm-price-amount { font-size: 44px; line-height: 48px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cbm-price-per { font-size: 15px; font-weight: 400; color: var(--text-muted); }
.cbm-price-yearly { margin: 8px 0 0; font-size: 15px; line-height: 22px; color: var(--text-muted); }
.cbm-price-price p:last-child { margin-bottom: 0; }
.cbm-price-saving,
.cbm-price-chip {
    display: inline-block;
    padding: 1px 12px;
    border-radius: 999px;
    background: var(--tint);
    color: var(--action);
    font-size: 13px;
    line-height: 22px;
    font-weight: 600;
}
.cbm-price-price .cbm-price-saving { margin-top: 10px; }

.cbm-price-action { padding-bottom: 24px; }
.cbm-price-trial-note { margin: 8px 0 0; font-size: 13px; line-height: 20px; color: var(--text-muted); text-align: center; }

.cbm-price-allowance { border-top: 1px solid var(--line); padding: 16px 0; }
.cbm-price-allowance p { margin: 0; }
.cbm-price-label { font-size: 13px; line-height: 20px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.cbm-price-allowance .cbm-price-included { margin-top: 4px; font-size: 17px; line-height: 24px; font-weight: 600; }
.cbm-price-allowance .cbm-price-minute { margin-top: 2px; font-size: 14px; line-height: 22px; }
.cbm-price-allowance .cbm-price-then { margin-top: 6px; font-size: 14px; line-height: 22px; color: var(--text-muted); }
.cbm-price-bands { margin: 4px 0 0; font-size: 14px; line-height: 22px; font-variant-numeric: tabular-nums; }
.cbm-price-bands div { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; }
.cbm-price-bands dt { font-weight: 400; color: var(--text-muted); }
.cbm-price-bands dd { margin: 0; text-align: right; }

.cbm-price-notes { max-width: 760px; font-size: 14px; line-height: 22px; color: var(--text-muted); }
.cbm-price-notes p { margin: 0 0 6px; }

.cbm-price-addons,
.cbm-price-services {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.cbm-price-services { gap: 24px; }
.cbm-price-addon,
.cbm-price-service {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
}
.cbm-price-service { padding: 28px; gap: 10px; }
.cbm-price-addon p,
.cbm-price-service p { margin: 0; }
.cbm-price-addon-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cbm-price-addon-head h3 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.cbm-price-addon-price { white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.cbm-price-addon-price .cbm-price-per { font-size: 14px; }
.cbm-price-addon-text,
.cbm-price-service-text { font-size: 14px; line-height: 22px; color: var(--text-muted); }
.cbm-price-addon .cbm-price-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.cbm-price-chip { padding: 1px 10px; }
.cbm-price-chip-outline { background: transparent; border: 1px solid var(--tint-line); color: var(--text); padding: 0 10px; }
.cbm-price-service h3 { margin: 0; font-size: 18px; line-height: 24px; }
.cbm-price-service-figure { font-size: 26px; line-height: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cbm-price-service .cbm-btn { margin-top: auto; }

@media (max-width: 900px) {
    .cbm-price-plans { display: flex; flex-direction: column; gap: 24px; }
    .cbm-price-plan { display: flex; flex-direction: column; }
    .cbm-price-addons,
    .cbm-price-services { grid-template-columns: minmax(0, 1fr); }
}

/* --- summaries and prose -------------------------------------------------- */

.cbm-summary { margin: 0 0 24px; }
.cbm-summary dt { font-weight: 600; margin-top: 14px; }
.cbm-summary dd { margin: 2px 0 0; color: var(--text-muted); }

.cbm-mono {
    font-family: var(--font-mono);
    word-break: break-all;
}

.cbm-reference {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-alt);
}

.cbm-prose section { margin-bottom: 32px; }
.cbm-prose h2 { margin-top: 0; font-size: 20px; }

/* The data processing agreement (#2250): clauses and annex tables. A table
   scrolls inside its own box on a phone rather than widening the page. */
.cbm-prose [data-type="dpa-text"] h2 { margin-top: 32px; }
.cbm-prose [data-type="dpa-text"] h3 { margin-top: 24px; font-size: 17px; }
.cbm-dpa-table { margin: 16px 0; }
.cbm-dpa-table .cbm-table { min-width: 520px; }
.cbm-dpa-table .cbm-table td { vertical-align: top; }
.cbm-dpa-table .cbm-table th { white-space: normal; }
.cbm-dpa-table .cbm-table tbody tr:hover { background: none; box-shadow: none; }

/* --- footer --------------------------------------------------------------- */

.cbm-site-footer { margin-top: 0; }
.cbm-footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }

@media (max-width: 640px) {
    h1 { font-size: 26px; }
    h2 { font-size: 22px; }
    .cbm-section { padding: 40px 0; }
    .cbm-cards { gap: var(--space-4); }
    .cbm-site-header-end { gap: 12px; }
    .cbm-languages { gap: 4px; }
    .cbm-language { padding: 2px 6px; }
}

/* Before the launch (#2085): one line under the header on every page. */
.cbm-prelaunch {
    margin: 0;
    padding: 8px 16px;
    text-align: center;
    font-weight: 600;
    background: var(--tint);
    color: var(--text);
    border-bottom: 1px solid var(--tint-line);
}

/* The waiting list's consent box (CORTUNO-2647): the box beside its sentence,
   the sentence wrapping under itself rather than under the box. */
.cbm-consent-box {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}
.cbm-consent-box input {
    margin-top: 0.25rem;
    flex: none;
}
