/* Opinable landing page (CMM-104, design CMM-103): the home page in each language (/, /pt, /es, /fr, /de).
   Standalone on purpose: the legal pages and 404 keep styles.css, whose element styles would fight this layout.
   Colours are the app's semantic tokens (apps/mobile/src/theme/palette.js), Light and Dark. System fonts only (no
   third-party requests, see styles.css). Mobile first: the Figma mobile frame (390) up to 959px, the desktop frame
   (1440, 1200 container) from 960px. */

:root {
  --surface-background: #f6f3ee;
  --surface-default: #ffffff;
  --text-primary: #17191f;
  --text-secondary: #4f4a43;
  --text-tertiary: #6e685f;
  --text-link: #17191f;
  --border-subtle: #efebe4;
  --border-default: #e4ded4;
  --border-focus: #17191f;
  --brand-primary: #17191f;
  --brand-subtle: #f3efe6;
  --category-fg: #4f4a43;
  --category-bg: #efebe4;
  --seal-changed-my-mind-fg: #0f7552;
  --seal-changed-my-mind-bg: #e8fbf3;
  --seal-changed-my-mind-border: #5eddae;
  /* Store badges: the app icon's fixed ink and paper (brand/icon-background, brand/on-icon), same in both themes. */
  --badge-bg: #17191f;
  --badge-bg-hover: #36322d;
  --badge-fg: #f3efe6;
  --badge-border: #17191f;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface-background: #12110f;
    --surface-default: #1a1816;
    --text-primary: #f6f3ee;
    --text-secondary: #cfc7ba;
    --text-tertiary: #a39c90;
    --text-link: #f6f3ee;
    --border-subtle: #211f1c;
    --border-default: #2b2824;
    --border-focus: #f3efe6;
    --brand-primary: #f3efe6;
    --brand-subtle: #2a2721;
    --category-fg: #cfc7ba;
    --category-bg: #211f1c;
    --seal-changed-my-mind-fg: #37d399;
    --seal-changed-my-mind-bg: #062b21;
    --seal-changed-my-mind-border: #0f7552;
    /* The ink badge sits on an ink page in Dark: border/strong keeps its edge visible. */
    --badge-border: #4f4a43;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--surface-background);
  color: var(--text-primary);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Icons: Lucide glyphs from the app's Icon set, 1.75 stroke, round caps and joins. */
.icon {
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.overline {
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* Brand lockup: symbol (brand/primary) and the outlined wordmark (text/primary), so no web font is needed. */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  text-decoration: none;
}

.lockup-symbol {
  width: 28px;
  height: 28px;
  color: var(--brand-primary);
  fill: currentColor;
}

.lockup-wordmark {
  width: 94px;
  height: 27px;
  fill: currentColor;
}

/* Language switcher: EN · PT · ES · FR · DE. */
.languages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.languages li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.languages li + li::before {
  content: '·' / '';
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 16px;
}

.languages a {
  display: inline-block;
  min-height: 24px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 22px;
  text-decoration: none;
}

.languages a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.languages a[aria-current='page'] {
  color: var(--text-primary);
  font-weight: 600;
}

/* Top bar */
.top {
  padding: 16px 0;
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top .languages {
  display: none;
}

/* Hero */
.hero {
  padding: 24px 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.hero h1 {
  font-size: 24px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: -0.4px;
}

.lead {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 24px;
}

.hero-preview {
  display: none;
}

/* Store badges, drawn after the official ones: logo, small line, store name. */
.badges {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 17px 9px 13px;
  border: 1px solid var(--badge-border);
  border-radius: 12px;
  background: var(--badge-bg);
  color: var(--badge-fg);
  text-decoration: none;
  white-space: nowrap;
}

.badge:hover {
  background: var(--badge-bg-hover);
}

.badge:focus-visible {
  border-radius: 12px;
}

.badge-logo {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: currentColor;
}

.badge-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}

.badge-small {
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

.badge-store {
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

/* How it works */
.how {
  padding: 24px 0;
}

.how .wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.how h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.rules {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rule {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.icon-badge {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-subtle);
  color: var(--text-primary);
}

.icon-badge .icon {
  width: 20px;
  height: 20px;
}

.icon-badge-large {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.icon-badge-large .icon {
  width: 24px;
  height: 24px;
}

.rule-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 15px;
  line-height: 22px;
}

.rule h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

.rule p {
  color: var(--text-secondary);
}

/* Light topics, sample takes and translation */
.more .wrap {
  display: flex;
  flex-direction: column;
}

.scope {
  padding: 8px 0;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--surface-default);
}

.card h2 {
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

.card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 22px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.samples {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 -4px;
  padding: 24px 0;
}

.translate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 24px 0;
}

.translate h2 {
  font-size: 17px;
  font-weight: 600;
  line-height: 22px;
}

.translate p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 24px;
}

/* Category Tag (app component): static label, category tint only. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--category-bg);
  color: var(--category-fg);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.tag .icon {
  width: 14px;
  height: 14px;
}

/* Seal Badge, small (Changed My Mind). */
.seal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid var(--seal-changed-my-mind-border);
  border-radius: 999px;
  background: var(--seal-changed-my-mind-bg);
  color: var(--seal-changed-my-mind-fg);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.seal .icon {
  width: 14px;
  height: 14px;
}

/* Take Card (app component), Open and Changed My Mind states. */
.take {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-default);
  border-radius: 16px;
  background: var(--surface-default);
}

.take-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.take-time {
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 16px;
}

.take-text {
  color: var(--text-primary);
  font-size: 19px;
  font-weight: 600;
  line-height: 25px;
  letter-spacing: -0.2px;
}

.take-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

/* When the row is too narrow the replies count drops to a second line (CMM-125 rule); the state never shrinks. */
.take-lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
  min-height: 24px;
}

.author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand-subtle);
  color: var(--brand-primary);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

.replies {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
}

.replies .icon {
  width: 16px;
  height: 16px;
}

.take-state {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  min-height: 24px;
  color: var(--text-link);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

/* Final call to action */
.cta {
  padding: 32px 0;
  background: var(--surface-default);
}

.cta .wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.cta h2 {
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
  letter-spacing: -0.2px;
}

.cta p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 22px;
}

/* Footer */
.footer {
  padding: 24px 0;
  background: var(--surface-default);
}

.footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer .wrap::before {
  content: '';
  height: 1px;
  background: var(--border-subtle);
}

/* Mobile order: divider, brand, links, languages, copyright (the brand and nav groups only matter on desktop). */
.footer-brand,
.footer-nav {
  display: contents;
}

.footer .lockup {
  align-self: flex-start;
}

.footer .copyright {
  order: 1;
}

.footer .lockup {
  gap: 10px;
}

.footer .lockup-symbol {
  width: 22px;
  height: 22px;
}

.footer .lockup-wordmark {
  width: 74px;
  height: 21px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 12px;
  line-height: 16px;
}

.links li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.links li + li::before {
  content: '·' / '';
  color: var(--text-tertiary);
}

.links a {
  display: inline-block;
  padding: 4px 0;
  color: var(--text-link);
  font-weight: 600;
  text-decoration: none;
}

.links a:hover {
  text-decoration: underline;
}

.copyright {
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 16px;
}

@media (min-width: 600px) {
  .wrap {
    padding: 0 40px;
  }

  .badges {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }

  .badge {
    gap: 10px;
    padding: 11px 21px 11px 15px;
  }

  .badge-logo {
    width: 24px;
    height: 24px;
  }

  .how {
    padding: 72px 0;
    background: var(--surface-default);
  }

  .how .wrap {
    align-items: center;
    gap: 32px;
  }

  .how h2 {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    font-size: 20px;
    font-weight: 600;
    line-height: 26px;
    letter-spacing: -0.2px;
    text-align: center;
  }

  .rules {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
  }

  .rule {
    flex-direction: column;
    gap: 12px;
    padding: 24px 20px;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    background: var(--surface-background);
  }

  .rule .icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .rule .icon-badge .icon {
    width: 24px;
    height: 24px;
  }

  .rule-text {
    gap: 12px;
  }

  .scope {
    padding-top: 32px;
  }
}

@media (min-width: 960px) {
  .top {
    padding: 28px 0;
  }

  .top .languages {
    display: flex;
    gap: 10px;
  }

  .top .languages li {
    gap: 10px;
  }

  .lockup {
    gap: 14px;
  }

  .lockup-symbol {
    width: 32px;
    height: 32px;
  }

  .lockup-wordmark {
    width: 108px;
    height: 31px;
  }

  .hero {
    padding: 80px 0;
  }

  .hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: center;
    gap: 56px;
  }

  .hero-copy {
    gap: 24px;
  }

  .hero h1 {
    font-size: 28px;
    line-height: 34px;
  }

  .hero h1 span {
    display: block;
  }

  .hero-preview {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

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

  .more {
    padding: 64px 0;
  }

  .more .wrap {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 24px;
  }

  .scope {
    padding: 0;
  }

  .samples {
    display: none;
  }

  .card,
  .translate {
    padding: 24px;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    background: var(--surface-default);
  }

  .card h2 {
    font-size: 17px;
  }

  .translate p {
    font-size: 15px;
    line-height: 22px;
  }

  .cta {
    padding: 80px 0;
  }

  .cta .wrap {
    align-items: center;
    text-align: center;
  }

  .cta h2 {
    font-size: 24px;
    font-weight: 700;
    line-height: 30px;
    letter-spacing: -0.4px;
  }

  .cta p {
    font-size: 16px;
    line-height: 24px;
  }

  .cta .badges {
    justify-content: center;
  }

  .footer {
    padding: 40px 0;
    background: var(--surface-background);
  }

  .footer .wrap {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
  }

  .footer .wrap::before {
    grid-column: 1 / -1;
  }

  .footer-brand,
  .footer-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-nav {
    align-items: flex-end;
    gap: 10px;
  }

  .footer .lockup {
    gap: 11px;
  }

  .footer .lockup-symbol {
    width: 24px;
    height: 24px;
  }

  .footer .lockup-wordmark {
    width: 81px;
    height: 23px;
  }
}
