/* Landing page. Built on the extension's own styles: theme.css for colors and
   type, frame.css for the Options cards, rows, switches, and toggles. */
@import "../modules/styles/theme.css";
@import "../modules/styles/frame.css";

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    font: 16px/1.6 var(--font-ui);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
dl,
dd {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
}

main:focus {
    outline: none;
}

.wrap {
    width: min(1120px, calc(100% - 48px));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    z-index: 10;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    border-radius: 6px;
    background: var(--text);
    color: var(--surface);
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: var(--surface);
    color: var(--text);
    font: 500 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    vertical-align: 1px;
}

kbd + kbd {
    margin-left: 3px;
}

small kbd {
    height: 18px;
    font-size: 11px;
}

code {
    font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace;
}

em {
    font-style: normal;
    font-weight: 600;
}

.ink-accent {
    color: var(--accent);
    font-weight: 600;
}

.ink-video {
    color: var(--video);
    font-weight: 600;
}

.ink-local {
    color: var(--local);
    font-weight: 600;
}

/* Header */

.topbar {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 80px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.topnav {
    display: flex;
    gap: 24px;
    margin-left: auto;
    color: var(--muted);
    font-size: 14px;
}

.topnav a:hover,
.footer a:hover,
.text-link:hover {
    color: var(--text);
}

/* Buttons, like the Options buttons at a larger size. */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 650;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.btn-icon {
    flex: none;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.btn-icon-fill {
    fill: currentColor;
    stroke: none;
}

.btn-small .btn-icon {
    width: 16px;
    height: 16px;
    margin-right: 7px;
}

.svg-library {
    position: absolute;
    width: 0;
    height: 0;
}

.btn-small {
    min-height: 36px;
    padding: 0 14px;
    font-size: 14px;
}

.btn-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-contrast);
}

.btn-primary:hover {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
}

.btn-quiet {
    border-color: var(--border-strong);
    background: var(--surface);
}

.btn-quiet:hover {
    background: var(--surface-subtle);
}

.text-link {
    color: var(--muted);
    font-weight: 500;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
}

.link-button:hover {
    color: var(--text);
}

/* Hero */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 448px);
    align-items: center;
    gap: 64px;
    padding-block: 48px 104px;
}

.kicker,
.section-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

h1 {
    margin-top: 18px;
    font-size: clamp(2.75rem, 6vw, 4.5rem);
    font-weight: 650;
    line-height: 1.02;
    letter-spacing: -0.045em;
}

h1 span,
.closing h2 span {
    color: var(--muted);
}

.lead {
    max-width: 34rem;
    margin-top: 24px;
    color: var(--muted);
    font-size: 18px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}

.hero-keys {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 28px;
    color: var(--muted);
    font-size: 13px;
}

.hero-keys kbd:last-of-type {
    margin-right: 6px;
}

/* The stage: a browser toolbar with the real popup below the icon. */

.stage {
    margin: 0;
    padding: 14px 18px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--background);
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 32px;
    margin-bottom: 10px;
}

.toolbar-dots {
    display: flex;
    gap: 6px;
}

.toolbar-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}

.omnibox {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--surface-subtle);
    color: var(--muted);
    font-size: 12px;
    line-height: 28px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.toolbar-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--selected);
}

.popup-frame {
    display: block;
    width: 400px;
    max-width: 100%;
    height: 420px;
    margin-left: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color-scheme: normal;
}

.stage-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 28px;
    margin-top: 14px;
}

.notice {
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
}

.notice kbd {
    height: 20px;
    min-width: 20px;
    font-size: 11px;
}

/* Sections */

.section {
    padding-block: 104px;
}

.section-tinted {
    border-block: 1px solid var(--border);
    background: var(--background);
}

.section-head {
    max-width: 40rem;
    margin-bottom: 56px;
}

.section-label span {
    margin-right: 10px;
    font-variant-numeric: tabular-nums;
    opacity: 0.7;
}

.section h2,
.closing h2 {
    margin-top: 12px;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 650;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.section-lead {
    margin-top: 16px;
    color: var(--muted);
    font-size: 17px;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: start;
    gap: 64px;
}

.split .section-head {
    margin-bottom: 0;
}

/* Features: copy beside a specimen of the real UI. */

.feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 64px;
    padding-block: 40px;
    border-top: 1px solid var(--border);
}

.feature h3 {
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.feature-copy p {
    max-width: 30rem;
    margin-top: 12px;
    color: var(--muted);
}

.specimen {
    display: grid;
    gap: 12px;
    padding: 28px;
    border-radius: 14px;
    background: var(--background);
    font-size: 14px;
    line-height: 1.5;
}

.specimen > * {
    min-width: 0;
}

.menu {
    display: grid;
    width: min(260px, 100%);
    padding: 6px 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--muted);
    font-size: 13px;
}

.menu span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px;
}

.menu hr {
    width: 100%;
    margin: 5px 0;
    border: 0;
    border-top: 1px solid var(--border);
}

.menu .menu-hit {
    background: var(--selected);
    color: var(--text);
}

/* Popup rows at the popup's own metrics (popup/reading-list/reading-list.css). */
.popup-rows {
    margin: 0;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    list-style: none;
}

.popup-rows li {
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 5px;
    line-height: 32px;
}

.popup-rows li.active {
    background: var(--selected);
}

.popup-rows svg {
    flex: none;
    width: 16px;
    height: 16px;
    margin-right: 9px;
}

.popup-rows .title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.popup-rows .local .title {
    color: var(--local);
}

.popup-rows .percent {
    padding-left: 5px;
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.popup-rows .percent.scroll {
    color: var(--accent);
}

.popup-rows .percent.video {
    color: var(--video);
}

.popup-rows .tag {
    flex: none;
    padding-left: 10px;
    color: var(--muted);
    font-size: 12px;
}

.status-line {
    padding: 0 16px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.local-total {
    color: var(--local);
}

/* Option cards inside specimens and the settings section come straight
   from frame.css; only the page's larger base font needs resetting. */
.option-list {
    font-size: 14px;
    line-height: 1.5;
}

.option-list select {
    height: 34px;
    padding: 0 30px 0 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface) var(--chevron) no-repeat right 11px center / 10px 6px;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    appearance: none;
}

/* Keyboard */

.key-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.key-group {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.key-group h3 {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.key-group dl {
    display: grid;
    gap: 12px;
}

.key-row dt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.key-or {
    margin: 0 6px;
    color: var(--muted);
    font-size: 12px;
}

.key-row dd {
    margin-top: 4px;
    font-size: 14px;
}

.key-row small {
    margin-top: 0;
}

.key-note {
    max-width: 44rem;
    margin-top: 32px;
    color: var(--muted);
    font-size: 14px;
}

/* Privacy */

.facts {
    display: grid;
}

.fact {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 24px;
    padding-block: 16px;
    border-top: 1px solid var(--border);
    font-size: 15px;
}

.fact:last-child {
    border-bottom: 1px solid var(--border);
}

.fact dt {
    font-weight: 600;
}

.fact dd {
    color: var(--muted);
}

/* Closing and footer */

.closing {
    padding-block: 48px 120px;
    text-align: center;
}

.closing .actions {
    justify-content: center;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 28px;
    padding-block: 32px 40px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 14px;
}

.footer p {
    margin-right: auto;
}

.footer p a {
    color: var(--text);
}

.footer nav {
    display: flex;
    gap: 20px;
}

@media (max-width: 960px) {
    .hero,
    .feature,
    .split {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .popup-frame {
        margin-inline: auto;
    }

    .key-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .topnav {
        display: none;
    }

    .topbar .btn {
        margin-left: auto;
    }

    .section {
        padding-block: 72px;
    }

    .stage {
        padding: 12px;
    }

    /* The popup is a fixed 400px wide, as in Chrome; shrink it to fit. */
    .popup-frame {
        zoom: 0.8;
        max-width: none;
    }

    .specimen {
        padding: 16px;
    }

    .key-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .fact {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }
}

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