/* ==========================================================================
   StoculMeu public pages (public_base.html): landing, login, register,
   password reset — flashxcode.com layout language on the sm-ui.css tokens.
   ========================================================================== */

/* No Bootstrap on public pages: the reset it would have provided */
*, *::before, *::after { box-sizing: border-box; }
:where(.sm-public) :where(h1, h2, h3, p, ul) { margin-top: 0; }
:where(.sm-public) :where(img, svg) { display: inline-block; max-width: 100%; vertical-align: middle; }
.sm-public button, .sm-public input { font: inherit; }

.sm-public { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.sm-public main { flex: 1 0 auto; }
.sm-wrap { width: min(1200px, 100% - 2 * clamp(16px, 2.6vw, 40px)); margin-inline: auto; }
.sm-header--public .sm-header__in { padding: 0; }
.sm-header--public .sm-actions { margin-left: auto; gap: 8px; }
.sm-brand--sm { font-size: .95rem; }
.sm-brand--sm img { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- buttons */
.sm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px;
  border: 0; border-radius: var(--radius-pill); font-size: 1rem; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  cursor: pointer; transition: background-color var(--dur-fast), transform 80ms, box-shadow var(--dur-fast), filter var(--dur-fast); }
.sm-btn:active { transform: scale(.97); }
.sm-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.sm-btn .lyc { width: 18px; height: 18px; }
.sm-btn--primary { background: var(--accent); color: #fff !important; }
.sm-btn--primary:hover { background: var(--accent-hover); }
.sm-btn--quiet { background: var(--surface); color: var(--text) !important; }
.sm-btn--quiet:hover { background: var(--surface-sunken); }
.sm-btn--outline { background: transparent; color: var(--text) !important; box-shadow: inset 0 0 0 1px var(--line-strong); }
.sm-btn--outline:hover { background: var(--surface); }
.sm-btn--sm { min-height: 36px; padding: 8px 16px; font-size: .9375rem; }
.sm-btn--block { width: 100%; }
.sm-btn[disabled] { opacity: .65; cursor: wait; }
.sm-btn .sm-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .4); border-top-color: #fff; animation: sm-spin .7s linear infinite; }
@keyframes sm-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- type */
.sm-display { margin: 0; font-size: clamp(2.6rem, 1.5rem + 5vw, 5.25rem); line-height: 1.02; font-weight: 700; letter-spacing: -.045em; text-wrap: balance; }
.sm-h1 { margin: 0; font-size: clamp(2.25rem, 1.6rem + 3vw, 3.75rem); line-height: 1.05; font-weight: 700; letter-spacing: -.04em; text-wrap: balance; }
.sm-h2 { margin: 0; font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3rem); line-height: 1.08; font-weight: 700; letter-spacing: -.035em; text-wrap: balance; }
.sm-lead { margin: 0; font-size: clamp(1.1rem, 1rem + .45vw, 1.35rem); line-height: 1.45; color: var(--text-secondary); letter-spacing: -.016em; text-wrap: pretty; }
.sm-gradient { background: linear-gradient(100deg, var(--accent) 10%, color-mix(in srgb, var(--accent) 45%, #8f5bff) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.sm-public .sm-eyebrow { margin-bottom: 14px; font-size: .875rem; }

/* ---------------------------------------------------------------- auth: intro + card */
.sm-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(2rem, 1rem + 5vw, 6rem);
  align-items: center; padding-block: clamp(2.5rem, 1rem + 6vw, 6.5rem); }
.sm-auth__logo { width: 72px; height: 72px; margin: 0 0 22px; object-fit: contain; }
.sm-auth__intro .sm-lead { margin-top: 18px; max-width: 34ch; }
.sm-auth__points { display: grid; gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.sm-auth__points li { display: flex; align-items: center; gap: 12px; color: var(--text-secondary); font-size: .975rem; }
.sm-auth__points .sm-tile { --tile: 34px; }
.sm-auth__card { padding: clamp(24px, 1rem + 2vw, 36px); border-radius: var(--radius-lg); background: var(--surface-raised);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.sm-auth__card h2 { margin: 0 0 6px; font-size: 1.375rem; font-weight: 700; letter-spacing: -.025em; }
.sm-auth__card > p.sm-sub { margin: 0 0 22px; color: var(--text-secondary); font-size: .95rem; }
@media (max-width: 900px) {
  .sm-auth { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 28px; padding-block: 2rem 3rem; }
  .sm-auth__intro .sm-lead { margin-inline: auto; }
  .sm-auth__logo { margin-inline: auto; width: 60px; height: 60px; }
  .sm-auth__points { display: none; }
  .sm-auth__card { width: 100%; max-width: 440px; text-align: left; }
}

/* fields */
.sm-field { margin-bottom: 16px; }
.sm-field label { display: block; margin-bottom: 7px; font-size: .875rem; font-weight: 500; color: var(--text); }
.sm-input { display: block; width: 100%; min-height: 50px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface-raised); color: var(--text); font: inherit; font-size: 1rem;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.sm-input::placeholder { color: var(--text-tertiary); }
.sm-input:hover { border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.sm-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.sm-input-wrap { position: relative; }
.sm-input-wrap .sm-input { padding-right: 50px; }
.sm-eye { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); width: 36px; height: 36px; display: inline-flex;
  align-items: center; justify-content: center; border: 0; border-radius: 50%; background: none; color: var(--text-tertiary); }
.sm-eye:hover { background: var(--surface); color: var(--text); }
.sm-eye .lyc { width: 19px; height: 19px; }
.sm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 20px; font-size: .9rem; }
.sm-check { display: inline-flex; align-items: center; gap: 9px; color: var(--text-secondary); cursor: pointer; user-select: none; }
.sm-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.sm-link-accent { color: var(--accent) !important; font-weight: 550; }
.sm-link-accent:hover { text-decoration: underline; }
.sm-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--text-tertiary); font-size: .8125rem; }
.sm-divider::before, .sm-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sm-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface-raised); color: var(--text) !important;
  font-size: 1rem; font-weight: 600; transition: background-color var(--dur-fast); }
.sm-google:hover { background: var(--surface); }
.sm-google img { width: 20px; height: 20px; }
.sm-form-foot { margin: 20px 0 0; text-align: center; color: var(--text-secondary); font-size: .9375rem; }
.sm-alert { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: .9rem; line-height: 1.45; background: var(--accent-soft); color: var(--accent); }
.sm-alert .lyc { width: 18px; height: 18px; margin-top: 1px; }
.sm-alert--danger { background: var(--danger-soft); color: var(--danger); }
.sm-alert--warning { background: var(--warning-soft); color: var(--warning); }
.sm-alert--success { background: var(--success-soft); color: var(--success); }

/* ---------------------------------------------------------------- landing */
.sm-hero { padding-block: clamp(3.5rem, 2rem + 8vw, 8.5rem) clamp(2.5rem, 1.5rem + 4vw, 4.5rem); text-align: center; }
.sm-hero .sm-display { max-width: 15ch; margin: 0 auto; }
.sm-hero .sm-lead { max-width: 42ch; margin: 22px auto 0; }
.sm-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.sm-chip { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 26px; padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text-secondary); font-size: .875rem; font-weight: 550; }
.sm-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.sm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: clamp(3rem, 2rem + 4vw, 5rem); }
.sm-stat { padding: 22px 20px; border-radius: var(--radius-md); background: var(--surface); text-align: left; }
.sm-stat b { display: block; font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; }
.sm-stat span { display: block; margin-top: 2px; color: var(--text-secondary); font-size: .9rem; }
@media (max-width: 760px) { .sm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.sm-section { padding-block: clamp(3.5rem, 2rem + 6vw, 7rem); }
.sm-section--band { background: var(--surface); }
.sm-section__head { max-width: 760px; margin: 0 auto clamp(2.25rem, 1.5rem + 3vw, 4rem); text-align: center; }
.sm-section__head .sm-lead { margin-top: 16px; }

.sm-grid { display: grid; gap: 16px; }
.sm-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sm-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 980px) { .sm-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sm-grid--3, .sm-grid--2 { grid-template-columns: minmax(0, 1fr); } }

.sm-tile { --tile: 46px; flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--tile); height: var(--tile);
  border-radius: calc(var(--tile) * .28); color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent));
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 60%, transparent), inset 0 1px 0 rgb(255 255 255 / .25); }
.sm-tile .lyc { width: 46%; height: 46%; stroke-width: 1.8; }
.sm-tile--soft { color: var(--accent); background: var(--accent-soft); box-shadow: none; }

.sm-feature { padding: 28px; border-radius: var(--radius-lg); background: var(--surface-raised); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.sm-section--band .sm-feature { border-color: transparent; }
.sm-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.sm-feature h3 { margin: 18px 0 8px; font-size: 1.1875rem; font-weight: 650; letter-spacing: -.02em; }
.sm-feature > p { margin: 0; color: var(--text-secondary); font-size: .975rem; line-height: 1.5; }
.sm-feature ul { display: grid; gap: 9px; margin: 18px 0 0; padding: 0; list-style: none; }
.sm-feature li { display: flex; gap: 9px; align-items: flex-start; font-size: .925rem; }
.sm-feature li .lyc { width: 17px; height: 17px; margin-top: 2px; color: var(--success); }
.sm-feature--row { display: flex; gap: 18px; align-items: flex-start; }
.sm-feature--row h3 { margin-top: 2px; }
.sm-step-n { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.sm-cta { margin-top: clamp(2.5rem, 2rem + 3vw, 4.5rem); padding: clamp(2.25rem, 1.5rem + 4vw, 4.5rem); border-radius: var(--radius-lg);
  text-align: center; color: #f5f5f7; background: radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--accent) 45%, #1d1d1f) 0%, #111214 70%); }
.sm-cta .sm-h2 { color: #fff; }
.sm-cta p { max-width: 46ch; margin: 14px auto 28px; color: rgb(245 245 247 / .78); font-size: 1.05rem; line-height: 1.5; }

/* footer */
.sm-foot { margin-top: auto; border-top: 1px solid var(--line); }
.sm-foot__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding-block: 28px; }
.sm-foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.sm-foot nav a, .sm-foot__copy { color: var(--text-secondary); font-size: .875rem; }
.sm-foot nav a:hover { color: var(--text); }

/* reveal */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
  [data-reveal].is-in { opacity: 1; transform: none; }
}

@media (max-width: 991.98px) {
  .sm-header--public .sm-links { display: none !important; }
}
@media (max-width: 480px) {
  .sm-hide-xs { display: none !important; }
  .sm-hero__actions .sm-btn { width: 100%; }
}

/* ---------------------------------------------------------------- legal / long-form text */
.sm-legal { padding-block: clamp(2.5rem, 1.5rem + 5vw, 5.5rem) clamp(3rem, 2rem + 4vw, 6rem); }
.sm-legal__head { max-width: 760px; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.sm-legal__updated { margin: 14px 0 0; color: var(--text-secondary); }
.sm-legal__grid { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: start; }
.sm-legal__toc { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 2px; }
.sm-legal__toc p { margin: 0 0 8px 12px; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-tertiary); }
.sm-legal__toc a { padding: 7px 12px; border-radius: 10px; color: var(--text-secondary); font-size: .9rem; }
.sm-legal__toc a:hover { color: var(--text); background: var(--surface); }
.sm-prose { font-size: 1.0625rem; line-height: 1.65; color: var(--text); }
.sm-prose p, .sm-prose ul { margin: 0 0 1.1em; }
.sm-prose p, .sm-prose li { color: color-mix(in srgb, var(--text) 82%, var(--bg)); }
.sm-prose ul { padding-left: 1.25em; list-style: disc; }
.sm-prose li { margin-bottom: .5em; }
.sm-prose li::marker { color: var(--text-tertiary); }
.sm-prose strong { color: var(--text); font-weight: 600; }
.sm-prose h2 { margin: 2.4em 0 .7em; font-size: 1.375rem; font-weight: 700; letter-spacing: -.025em; scroll-margin-top: calc(var(--header-h) + 24px); }
.sm-prose h2:first-of-type { margin-top: 1.6em; }
.sm-prose a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
@media (max-width: 900px) {
  .sm-legal__grid { grid-template-columns: minmax(0, 1fr); }
  .sm-legal__toc { display: none; }
}
