/* valuroa.com landing. Shares its palette with the apps. */

:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --text: #191918;
  --text-2: #4a4945;
  --muted: #7a7973;
  --border: #e3e1da;
  --accent: #1f3d2b;
  --accent-soft: #e3ebe4;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "New York", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --surface: #1b1b1a;
    --text: #f0efeb;
    --text-2: #c9c8c2;
    --muted: #92918b;
    --border: #2b2b29;
    --accent: #a6c8b0;
    --accent-soft: #1f2d24;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header, .site-main, .site-footer {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.site-header { padding-top: calc(env(safe-area-inset-top, 0px) + 28px); padding-bottom: 8px; }
.wordmark {
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.site-main { flex: 1; padding-top: 48px; padding-bottom: 64px; }

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(38px, 7vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
}
.lede { margin: 0; max-width: 34em; color: var(--text-2); font-size: 18px; }

.apps { margin-top: 64px; }
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.app-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.app-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.app-card:hover { border-color: var(--accent); }
.app-card:active { transform: scale(0.995); }
.app-card__icon {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--accent); color: #f5f4f0;
  display: inline-flex; align-items: center; justify-content: center;
}
@media (prefers-color-scheme: dark) { .app-card__icon { color: #0f1a13; } }
.app-card__icon svg { width: 26px; height: 26px; }
.app-card__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.app-card__name { font-family: var(--font-serif); font-size: 24px; font-weight: 500; line-height: 1.1; }
.app-card__desc { color: var(--muted); font-size: 15px; line-height: 1.4; }
.app-card__arrow { color: var(--muted); font-size: 20px; }

.site-footer {
  padding-top: 20px;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 10px;
}

@media (max-width: 480px) {
  .site-main { padding-top: 32px; }
  .app-card { grid-template-columns: 46px 1fr; padding: 18px; }
  .app-card__icon { width: 46px; height: 46px; }
  .app-card__arrow { display: none; }
}

/* ---- sign-in ------------------------------------------------------------------------ */
.site-header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.who { color: var(--muted); font-size: 13px; display: inline-flex; gap: 12px; align-items: baseline; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--text); }

.signin { margin-top: 56px; }
.signin__card {
  max-width: 380px;
  display: flex; flex-direction: column; gap: 14px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input {
  font: inherit; color: inherit;
  min-height: 46px; padding: 10px 14px;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); outline: none;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.button {
  font: inherit; font-weight: 600; font-size: 15px;
  min-height: 48px; padding: 0 20px; margin-top: 4px;
  border-radius: 12px; border: 0;
  background: var(--accent); color: #f5f4f0; cursor: pointer;
}
@media (prefers-color-scheme: dark) { .button { color: #0f1a13; } }
.button:disabled { opacity: 0.6; cursor: default; }
.error { margin: 0; color: #a3372e; font-size: 14px; }
@media (prefers-color-scheme: dark) { .error { color: #e08a80; } }
[hidden] { display: none !important; }

/* No visible scrollbars, same as inside the apps. */
html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* An explicit choice in Settings beats the system preference, in both directions. */
:root[data-theme='light'] {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --text: #191918;
  --text-2: #4a4945;
  --muted: #7a7973;
  --border: #e3e1da;
  --accent: #1f3d2b;
  --accent-soft: #e3ebe4;
}
:root[data-theme='dark'] {
  --bg: #121211;
  --surface: #1b1b1a;
  --text: #f0efeb;
  --text-2: #c9c8c2;
  --muted: #92918b;
  --border: #2b2b29;
  --accent: #a6c8b0;
  --accent-soft: #1f2d24;
}

/* ---- settings page ------------------------------------------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 18px;
}
.card h2 { font-family: var(--font-serif); font-size: 21px; font-weight: 500; margin: 0 0 4px; }
.card > p.hint { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.stack > * + * { margin-top: 14px; }
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--accent-soft);
  border-radius: 12px;
}
.segmented button {
  font: inherit;
  font-size: 15px;
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}
.segmented button[aria-pressed='true'] { background: var(--surface); color: var(--text); font-weight: 600; }
.row-end { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.state { font-size: 13px; color: var(--muted); }
.btn-secondary {
  font: inherit; font-weight: 600; font-size: 15px;
  min-height: 46px; padding: 0 20px;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.btn-secondary:hover { border-color: var(--muted); }

/* ---- setup form and accounts ----------------------------------------------------------- */
.hint { margin: 0; color: var(--muted); font-size: 14px; }
.notice-line { color: var(--muted); font-size: 14px; margin: 14px 0 22px; max-width: 40em; }
.input-plain {
  font: inherit; color: inherit;
  min-height: 46px; padding: 10px 14px;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); outline: none;
}
.input-plain:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline .input-plain { flex: 1; min-width: 0; }

.account { padding: 14px 0; border-top: 1px solid var(--border); }
.account:first-child { border-top: 0; padding-top: 4px; }
.account__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.account__name { font-weight: 600; }
.account__user { color: var(--muted); font-size: 14px; }
.account__meta { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.account__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.account__panel { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.account .error { margin-top: 8px; }
.badge {
  font-size: 12px; font-weight: 600; line-height: 1.6;
  padding: 0 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.badge--muted { background: var(--border); color: var(--text-2); }
.btn-small {
  font: inherit; font-size: 14px; font-weight: 600;
  min-height: 36px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.btn-small:hover { border-color: var(--muted); }
.btn-small--primary { background: var(--accent); border-color: var(--accent); color: #f5f4f0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .btn-small--primary { color: #0f1a13; } }
:root[data-theme='dark'] .btn-small--primary { color: #0f1a13; }
.field .hint { font-size: 13px; font-weight: 400; color: var(--muted); }

/* App access: one toggle per app, on an account and in the new-account form. */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-toggle {
  font: inherit; font-size: 14px; font-weight: 600;
  min-height: 36px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); cursor: pointer;
}
.chip-toggle:hover { border-color: var(--muted); }
.chip-toggle[aria-pressed='true'] { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.chip-toggle[aria-pressed='true']::before { content: '\2713'; color: var(--accent); font-weight: 700; }
.account__apps { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.account__apps-label { font-size: 13px; color: var(--muted); }
