/* Se-Guru home page (apps/landing). Self-contained: the palette and type scale
   follow DESIGN.md of the cockpit ("A Biblioteca do Sábio"): parchment in tonal
   layers, forest ink for action, lamp teal for hover and focus, and the gold
   reserved to the one mark that tells of a protection. Light by default, dark
   under [data-theme="dark"] on <html>, set by theme-init.js. */

:root {
  color-scheme: light;

  --ln-bg: oklch(0.981059 0.010704 76.6);
  --ln-raised: oklch(0.954586 0.016452 79.351);
  --ln-overlay: oklch(0.925207 0.021113 79.091);
  --ln-line: oklch(0.860997 0.021481 79.081);

  --ln-ink: oklch(0.196514 0.005068 173.816);
  --ln-faded: oklch(0.502685 0.01036 179.268);

  --ln-action: oklch(0.312245 0.056586 180.17);
  --ln-action-hover: oklch(0.477088 0.081808 192.507);
  --ln-on-action: oklch(0.981059 0.010704 76.6);
  --ln-focus: oklch(0.477088 0.081808 192.507);

  --ln-mint: oklch(0.938726 0.031267 171.357);
  --ln-on-mint: oklch(0.312245 0.056586 180.17);

  --ln-gold: oklch(0.8153 0.1473 83.42);
  --ln-on-gold: oklch(0.196514 0.005068 173.816);

  --ln-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --ln-radius-md: 8px;
  --ln-radius-lg: 10px;
  --ln-radius-xl: 14px;
  --ln-radius-2xl: 18px;

  --ln-wrap: 1080px;
}

[data-theme="dark"] {
  color-scheme: dark;

  --ln-bg: oklch(0.223872 0.022613 180.899);
  --ln-raised: oklch(0.265 0.022 181);
  --ln-overlay: oklch(0.305 0.022 181);
  --ln-line: oklch(0.36 0.02 181);

  --ln-ink: oklch(0.955 0.008 80);
  --ln-faded: oklch(0.77 0.012 180);

  --ln-action: oklch(0.8 0.085 182);
  --ln-action-hover: oklch(0.86 0.075 180);
  --ln-on-action: oklch(0.223872 0.022613 180.899);
  --ln-focus: oklch(0.8 0.085 182);

  --ln-mint: oklch(0.3 0.04 171);
  --ln-on-mint: oklch(0.92 0.045 171);
}

/* ---------------------------------------------------------
   Base
   --------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--ln-font);
  font-size: 1rem;
  line-height: 1.625;
  color: var(--ln-ink);
  background: var(--ln-bg);
  -webkit-font-smoothing: antialiased;
}

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

img,
svg {
  display: block;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}

.ln-wrap {
  width: 100%;
  max-width: var(--ln-wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.ln-skip {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 8px 16px;
  border-radius: var(--ln-radius-md);
  background: var(--ln-action);
  color: var(--ln-on-action);
  transform: translateY(-200%);
  z-index: 100;
}

.ln-skip:focus-visible {
  transform: none;
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.ln-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 8px 16px;
  border: 0;
  border-radius: var(--ln-radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 120ms ease, color 120ms ease;
}

.ln-btn--primary {
  background: var(--ln-action);
  color: var(--ln-on-action);
}

.ln-btn--primary:hover,
.ln-btn--primary:focus-visible {
  background: var(--ln-action-hover);
}

.ln-btn--quiet {
  background: var(--ln-raised);
  color: var(--ln-ink);
}

.ln-btn--quiet:hover,
.ln-btn--quiet:focus-visible {
  background: var(--ln-overlay);
}

.ln-btn--large {
  height: 44px;
  padding: 10px 22px;
  font-size: 1rem;
}

/* ---------------------------------------------------------
   Top bar
   --------------------------------------------------------- */
.ln-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ln-bg);
  border-bottom: 1px solid var(--ln-line);
}

.ln-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.ln-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--ln-radius-md);
}

.ln-brand__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.ln-brand__name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ln-nav__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ln-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--ln-line);
  border-radius: var(--ln-radius-md);
  background: var(--ln-raised);
  color: var(--ln-faded);
  transition: background-color 120ms ease, color 120ms ease;
}

.ln-theme-toggle:hover,
.ln-theme-toggle:focus-visible {
  background: var(--ln-overlay);
  color: var(--ln-ink);
}

.ln-theme-toggle__sun {
  display: none;
}

[data-theme="dark"] .ln-theme-toggle__sun {
  display: block;
}

[data-theme="dark"] .ln-theme-toggle__moon {
  display: none;
}

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

.ln-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 48px;
}

.ln-hero__text {
  max-width: 36rem;
}

.ln-hero__title {
  font-size: clamp(2rem, 1.3rem + 2.2vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.ln-hero__lede {
  margin-top: 20px;
  font-size: 1.125rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.ln-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.ln-hero__note {
  margin-top: 24px;
  max-width: 30rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ln-faded);
}

.ln-hero__figure {
  display: flex;
  justify-content: center;
}

.ln-hero__sage {
  height: clamp(20rem, 30vw, 26rem);
  width: auto;
}

/* ---------------------------------------------------------
   Sections
   --------------------------------------------------------- */
.ln-section {
  padding: 56px 0;
}

.ln-section--raised {
  background: var(--ln-raised);
}

.ln-section__title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.ln-section__lede {
  margin-top: 8px;
  max-width: 36rem;
  color: var(--ln-faded);
  text-wrap: pretty;
}

/* Steps */
.ln-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 32px;
}

.ln-step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: var(--ln-mint);
  color: var(--ln-on-mint);
  font-size: 0.9375rem;
  font-weight: 600;
}

.ln-step__title {
  margin-top: 16px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

.ln-step__text {
  margin-top: 6px;
  font-size: 0.9375rem;
  color: var(--ln-faded);
  text-wrap: pretty;
}

/* Cards */
.ln-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.ln-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--ln-line);
  border-radius: var(--ln-radius-xl);
  background: var(--ln-bg);
}

.ln-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--ln-radius-lg);
  background: var(--ln-mint);
  color: var(--ln-on-mint);
}

.ln-card__title {
  margin-top: 16px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

.ln-card__text {
  margin-top: 6px;
  font-size: 0.9375rem;
  color: var(--ln-faded);
  text-wrap: pretty;
}

/* The sample notice under the lede, as the cockpit shows a protection: the one
   gold mark on the page, with the sentence that says what was protected. */
.ln-notice {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid var(--ln-line);
  border-radius: var(--ln-radius-lg);
  background: var(--ln-bg);
  font-size: 0.9375rem;
}

.ln-protection-mark {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--ln-gold);
  color: var(--ln-on-gold);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.33;
}

/* Managers */
.ln-managers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

.ln-panel-card {
  padding: 24px;
  border: 1px solid var(--ln-line);
  border-radius: var(--ln-radius-xl);
  background: var(--ln-raised);
}

.ln-panel-card__title {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

.ln-panel-card__list {
  margin-top: 12px;
}

.ln-panel-card__list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--ln-line);
  font-size: 0.9375rem;
}

.ln-panel-card__list li::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--ln-action);
  transform: translateY(-1px);
}

/* Closing */
.ln-section--closing {
  padding-top: 0;
}

.ln-closing {
  padding: 40px 32px;
  border-radius: var(--ln-radius-2xl);
  background: var(--ln-mint);
  color: var(--ln-on-mint);
  text-align: center;
}

.ln-closing__title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.ln-closing__text {
  max-width: 36rem;
  margin: 12px auto 24px;
  text-wrap: pretty;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.ln-footer {
  border-top: 1px solid var(--ln-line);
}

.ln-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 24px;
  padding-bottom: 24px;
  font-size: 0.875rem;
  color: var(--ln-faded);
}

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

/* ---------------------------------------------------------
   Narrow widths
   --------------------------------------------------------- */
@media (max-width: 1023px) {
  .ln-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .ln-hero {
    padding-top: 32px;
  }

  .ln-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .ln-hero__figure {
    order: -1;
  }

  .ln-hero__sage {
    height: 14rem;
  }

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

  .ln-hero__actions {
    justify-content: center;
  }

  .ln-hero__note {
    margin-left: auto;
    margin-right: auto;
  }

  .ln-section {
    padding: 40px 0;
  }

  .ln-steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .ln-managers {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .ln-closing {
    padding: 32px 24px;
  }
}

@media (max-width: 479px) {
  .ln-wrap {
    padding: 0 16px;
  }

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

  .ln-hero__actions .ln-btn {
    flex: 1 1 100%;
  }
}
