/* ==========================================================================
   AttentionPro web: shared primitives.

   Loaded by every page after theme.css (the extension's tokens, verbatim) and
   tokens-web.css (fonts, radii, glows). This file holds only what more than
   one kind of page needs: type, buttons, pills, the brand, the marketing
   navbar and footer, cards, forms, notices, list rows and the prose styles.

   Page families layer their own sheet on top:
     landing.css   the marketing page
     auth.css      sign in
     app.css       the signed-in app shell and its views
     focus.css     the strict session stage
   ========================================================================== */

/* ---------- typography ---------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  margin-bottom: 0.75rem;
}

p {
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.65;
}

p.lead {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  color: var(--text-2);
  max-width: 680px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--accent-hover); }

/* ---------- layout ---------- */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow { max-width: 860px; }

.section {
  padding: 6rem 0;
  position: relative;
}

@media (max-width: 768px) {
  .section { padding: 4rem 0; }
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.text-center { text-align: center; }

/* Keyboard users land on the content, not on thirty links. */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 2000;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--control);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}

.btn:hover {
  background: var(--surface-2);
  border-color: var(--border-glow);
  transform: translateY(-1px);
  color: var(--text);
}

.btn:active { transform: translateY(0) scale(0.98); }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-green {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--green-glow);
}

.btn-green:hover {
  filter: brightness(1.08);
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.btn-secondary {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--surface-3);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* Destructive actions. Quiet by default and only committing on hover, because
   a permanently red button trains people to ignore red. */
.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--border);
}

.btn-danger:hover {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
}

.btn-lg {
  padding: 0.95rem 1.85rem;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.btn-block { width: 100%; }

/* A dark button on a light page, used for the two store buttons so they read
   as "install" rather than as another accent CTA. */
.btn-store {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  padding: 0.7rem 1.2rem 0.7rem 0.9rem;
  gap: 0.7rem;
  text-align: left;
}

.btn-store:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  filter: brightness(1.15);
}

.btn-store svg { flex: none; }

.btn-store .store-lines {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.btn-store .store-kicker {
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.8;
  letter-spacing: 0.02em;
}

.btn-store .store-name {
  font-size: 0.98rem;
  font-weight: 700;
}

/* ---------- pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.pill.accent { background: var(--accent-soft); color: var(--accent); border-color: var(--border-glow); }
.pill.green  { background: var(--green-soft);  color: var(--green);  border-color: var(--green-glow); }
.pill.amber  { background: var(--amber-soft);  color: var(--amber);  border-color: var(--amber-glow); }
.pill.red    { background: var(--red-soft);    color: var(--red);    border-color: var(--red-glow); }
.pill.grey   { background: var(--surface-2);   color: var(--text-2); border-color: var(--border); }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

/* ---------- the brand ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text);
  letter-spacing: -0.03em;
}

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

/* The product mark, not a letter. Both shipped clients draw the same thing:
   "a white ring with a centered dot, on the accent blue"
   (attention_android_app/.../ic_launcher_foreground.xml, and the extension's
   icons/icon128.png). The site is the third surface and uses it verbatim.
   No gradient: the accent is one flat colour everywhere else. */
.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* ---------- marketing navbar ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--surface-glass);
  border-bottom: 1px solid var(--border-light);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-2);
}

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

.nav-link.active {
  color: var(--accent);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }

  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    width: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
    gap: 1.25rem;
    box-shadow: var(--shadow-lg);
  }
}

@media (max-width: 560px) {
  .navbar .nav-actions .btn-primary { display: none; }
}

/* ---------- cards ---------- */

.card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  background: var(--accent-soft);
  color: var(--accent);
}

.card-icon.green { background: var(--green-soft); color: var(--green); }
.card-icon.amber { background: var(--amber-soft); color: var(--amber); }
.card-icon.red   { background: var(--red-soft);   color: var(--red); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ---------- forms ---------- */

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.45rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
}

.form-control:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control.mono { font-family: var(--mono); }

/* ---------- notices ---------- */

.notice {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  border: 1px solid transparent;
  margin-bottom: 1.25rem;
  text-align: left;
}

.notice.amber { background: var(--amber-soft); color: var(--amber); border-color: var(--amber); }
.notice.red   { background: var(--red-soft);   color: var(--red);   border-color: var(--red); }
.notice.green { background: var(--green-soft); color: var(--green); border-color: var(--green); }
.notice.grey  { background: var(--surface-2);  color: var(--text-2); border-color: var(--border); }
.notice strong { font-weight: 650; }

/* ---------- list rows ----------
   Shared by devices, backups, the guardwall lists, the focus summary and the
   setup checklist. One row shape across the whole app, so a person learns it
   once. */

.row-list { display: flex; flex-direction: column; }

.acct-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.acct-row:first-child { border-top: 0; }
.acct-row .row-main { flex: 1 1 220px; min-width: 0; }

.acct-row .row-title {
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.4;
  color: var(--text);
}

.acct-row .row-sub {
  color: var(--text-3);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
  line-height: 1.5;
}

.acct-row .row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.acct-row .row-bar {
  height: 5px;
  margin-top: 8px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.acct-row .row-bar i {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--accent);
}

.acct-row .row-bar i.extension { background: var(--accent); }
.acct-row .row-bar i.android   { background: var(--green); }
.acct-row .row-bar i.web       { background: var(--amber); }
.acct-row .row-bar i.unknown   { background: var(--text-3); }
.acct-row .row-bar i.neutral   { background: var(--accent); }

/* ---------- theme choice ----------
   Three states, and it lives on the settings page only. */

.theme-choice {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.theme-choice button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

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

.theme-choice button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ---------- utilities ---------- */

.muted { color: var(--text-2); }
.small { font-size: 0.83rem; }
.stack { display: flex; flex-direction: column; gap: 0.9rem; }
.inline-actions { display: flex; gap: 0.65rem; flex-wrap: wrap; align-items: center; }
.tabular-nums { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---------- footer (marketing and legal pages) ---------- */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2.5rem;
  color: var(--text-2);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 850px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.1rem;
  letter-spacing: 0.02em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-links a { color: var(--text-2); }
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-slim {
  padding: 1.75rem 0;
}

.footer-slim .footer-bottom {
  border-top: 0;
  padding-top: 0;
  font-size: 0.85rem;
}

.footer-slim .footer-bottom a { color: var(--text-2); }
.footer-slim .footer-bottom nav { display: flex; gap: 1.5rem; }
.footer-slim .footer-links { flex-direction: row; gap: 1.5rem; }

/* ---------- prose pages (privacy, terms, refunds, welcome, checkout) ---------- */

.prose h2 { font-size: 1.3rem; margin: 2.25rem 0 0.7rem; }
.prose h3 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }
.prose p, .prose li { color: var(--text-2); line-height: 1.7; }
.prose p { margin-bottom: 0.9rem; }
.prose ul { margin: 0 0 0.9rem 1.25rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--accent); }
/* A button inside running text keeps its own colours. */
.prose a.btn-primary { color: #ffffff; }
.prose a.btn-secondary, .prose a.btn-ghost { color: var(--text); }
.prose strong { color: var(--text); }

.prose table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.prose th, .prose td {
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.prose th { color: var(--text); font-weight: 650; }
.prose td { color: var(--text-2); }
.table-scroll { overflow-x: auto; }
.doc-date { font-size: 0.85rem; color: var(--text-3); margin-top: 0.5rem; }

.page-pad {
  padding-top: 4rem;
  padding-bottom: 5rem;
}
