/* Rubricator static site. Brand tokens mirror the app (lib/core/theme/app_colors.dart). */

@font-face {
  font-family: "Outfit";
  src: url("fonts/Outfit-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/Outfit-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/Outfit-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/Outfit-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* DT Nouveau has no Turkish letters: only used for the Latin-only wordmark. */
@font-face {
  font-family: "Nouveau";
  src: url("fonts/Nouveau-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f3f4;
  --surface: #ffffff;
  --text: #161a1d;
  --muted: #5b5f63;
  --primary: #ba181b;
  --primary-text: #ba181b;
  --on-primary: #ffffff;
  --border: rgba(22, 26, 29, 0.14);
  --soft: #f0ebd8;
  --focus: #1a5fd0;
  --radius: 14px;
  --maxw: 1080px;
  --prose: 70ch;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161a1d;
    --surface: #1f2428;
    --text: #f5f3f4;
    --muted: #b4b8bc;
    --primary: #ba181b;
    --primary-text: #ff7a7d;
    --border: rgba(245, 243, 244, 0.16);
    --soft: #2a2e31;
    --focus: #7fb0ff;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

main {
  flex: 1 0 auto;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary-text);
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}

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

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus {
  top: 0.75rem;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ---- header ---- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.brand-name {
  font-family: "Nouveau", "Outfit", serif;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  line-height: 1;
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.1rem;
  flex-wrap: wrap;
}
.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.35rem 0.15rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover {
  border-bottom-color: var(--border);
}
.nav a[aria-current="page"] {
  border-bottom-color: var(--primary);
}
.nav .lang-switch {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.92rem;
  font-weight: 600;
}

/* ---- hero ---- */
.hero {
  padding-block: clamp(2.5rem, 7vw, 5.5rem);
}
.hero .container {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero .container {
    grid-template-columns: 1.15fr 0.85fr;
  }
}
.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--primary-text);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  font-weight: 700;
}
h2 {
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  font-weight: 600;
  margin-top: 1.6em;
}
h3 {
  font-size: 1.15rem;
  font-weight: 600;
}
.lead {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 1.6rem;
}
.hero-art {
  display: grid;
  place-items: center;
  background: var(--soft);
  border-radius: 28px;
  padding: clamp(1.5rem, 5vw, 3rem);
}
.hero-art img {
  width: min(100%, 320px);
  border-radius: 20px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}
.btn:hover {
  filter: brightness(1.08);
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn.secondary:hover {
  border-color: var(--text);
}
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  filter: none;
}

/* ---- sections ---- */
.section {
  padding-block: clamp(2rem, 5vw, 3.5rem);
}
.section.alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.cards {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 1.4rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.1rem;
}
.section.alt .card {
  background: var(--bg);
}
.card h3 {
  margin-bottom: 0.4em;
}
.card p {
  margin: 0;
  color: var(--muted);
}

.note {
  background: var(--soft);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
}
.note p {
  margin: 0;
}

/* ---- long-form pages ---- */
.page {
  padding-block: clamp(2rem, 5vw, 3.5rem);
}
.prose {
  max-width: var(--prose);
}
.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1.05em;
}
.prose li {
  margin-bottom: 0.4em;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
  font-size: 0.97rem;
}
.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
.prose code {
  background: var(--soft);
  padding: 0.1em 0.35em;
  border-radius: 5px;
  font-size: 0.92em;
}
.table-wrap {
  overflow-x: auto;
}
.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  max-width: var(--prose);
  margin: 1.4rem 0;
}
.contact-box dt {
  font-weight: 600;
  margin-top: 0.8rem;
}
.contact-box dt:first-child {
  margin-top: 0;
}
.contact-box dd {
  margin: 0.15rem 0 0;
}

/* ---- Virgil page ---- */
.virgil > .prose {
  margin-bottom: 1.4rem;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 3vw, 1.6rem);
  max-width: 44rem;
}
.panel h2 {
  margin-top: 0;
  font-size: 1.35rem;
}
.tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}
.tab {
  font: inherit;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.tab[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.field {
  margin-bottom: 1rem;
}
.field label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.3rem;
}
.field-narrow {
  max-width: 16rem;
}
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
}
textarea {
  resize: vertical;
  min-height: 5.5rem;
}
input:disabled,
textarea:disabled,
select:disabled,
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.field.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.field.check input {
  margin-top: 0.35rem;
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
}
.field.check label {
  margin: 0;
  font-weight: 400;
}
.hint {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.35rem 0 0;
}
button.btn {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.link-button {
  font: inherit;
  background: none;
  border: 0;
  padding: 0.4rem 0.2rem;
  color: var(--primary-text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.actions {
  align-items: center;
}
.status {
  max-width: 44rem;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--soft);
  border-left: 4px solid var(--muted);
}
.status[data-kind="error"] {
  border-left-color: var(--primary);
}
.status[data-kind="ok"] {
  border-left-color: #2a8a4a;
}
.account-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.9rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}
#results-wrap {
  margin-top: 1.6rem;
}
#results-wrap h2:focus {
  outline: none;
}
.results {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.book {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}
.book img {
  flex: none;
  width: 72px;
  height: 108px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--soft);
}
.book h3 {
  margin: 0 0 0.15em;
}
.book p {
  margin: 0.25em 0 0;
}
.book-author {
  color: var(--muted);
  font-weight: 500;
}
.book-category {
  font-size: 0.85rem;
  color: var(--primary-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- footer ---- */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding-block: 1.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  justify-content: space-between;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
}
.site-footer a {
  color: var(--muted);
}
.site-footer a:hover {
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
