/* ============================================================
   Lenovo FIFA Media Concierge — prototype UI
   Editorial press-office design system. Lenovo red accent,
   FWC26 "Smarter" gradient hero, Archivo + Newsreader pairing.
   ============================================================ */

:root {
  color-scheme: light;
  --red: #e2231a;
  --red-dark: #b81b14;
  --ink: #111116;
  --ink-soft: #3b3b44;
  --muted: #6c6c78;
  --paper: #ffffff;
  --bg: #ffffff;
  --line: #e6e6ea;
  --line-soft: #f1f1f4;
  --dark: #0c0c10;
  --dark-2: #17171d;
  --gold: #c8a24a;
  --sans: 'Archivo', ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --shadow: 0 24px 60px rgba(20, 14, 30, 0.10);
  --shadow-sm: 0 8px 24px rgba(20, 14, 30, 0.07);
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.container { width: min(var(--maxw), calc(100% - 48px)); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Persistent prototype signal ---------- */
.proto-bar {
  background: var(--dark);
  color: #cfcfd6;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  text-align: center;
  padding: 7px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.proto-bar::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--red);
  border-radius: 2px;
  margin-right: 9px;
  transform: translateY(0.5px);
}

/* ---------- Top bar / nav ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 12, 16, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar-inner {
  width: min(var(--maxw), calc(100% - 48px));
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 24px;
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 34px; width: auto; display: block; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav-link {
  text-decoration: none;
  color: #b9b9c2;
  font-size: 14.5px; font-weight: 600;
  letter-spacing: 0.01em;
  padding: 8px 14px; border-radius: 999px;
  transition: color .18s, background .18s;
}
.nav-link:hover { color: #fff; }
.nav-link.is-active { color: #fff; background: rgba(255, 255, 255, 0.10); }
.nav-toggle {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: #fff; border-radius: 2px; }

/* ---------- Views ---------- */
.view { display: none; }
.view.is-active { display: block; animation: fade .4s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.eyebrow {
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px; font-weight: 800;
  margin: 0 0 14px;
}

.section-pad { padding: 64px 0 96px; }
.section-title {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 16px; max-width: 16ch;
}
.section-lede {
  font-size: 18px; line-height: 1.55; color: var(--ink-soft);
  max-width: 64ch; margin: 0 0 40px;
}

/* ---------- Ask: hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(10,8,16,0.35) 0%, rgba(10,8,16,0.78) 100%),
    url('/assets/pattern-smarter.png') center/cover no-repeat,
    #1a1330;
  color: #fff;
  overflow: hidden;
}
.hero-inner {
  width: min(var(--maxw), calc(100% - 48px));
  margin: 0 auto;
  padding: 92px 0 104px;
  max-width: 920px;
}
.hero .eyebrow { color: #ff6a60; }
.hero h1 {
  font-size: clamp(34px, 5.4vw, 62px);
  line-height: 1.03; letter-spacing: -0.025em;
  margin: 0 0 22px; max-width: 18ch; font-weight: 800;
}
.hero .lede {
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.55; color: rgba(255, 255, 255, 0.82);
  max-width: 60ch; margin: 0;
}

/* one orchestrated page-load reveal */
.reveal > * { opacity: 0; transform: translateY(14px); animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards; }
.reveal > :nth-child(1) { animation-delay: .05s; }
.reveal > :nth-child(2) { animation-delay: .16s; }
.reveal > :nth-child(3) { animation-delay: .28s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal > * { animation: none; opacity: 1; transform: none; }
  .view.is-active { animation: none; }
}

/* ---------- Ask: conversation ---------- */
.ask-stage { padding: 44px 0 88px; max-width: 880px; }
.ask-head h2 { font-size: 26px; letter-spacing: -0.01em; margin: 0 0 4px; }
.ask-head .muted { margin: 0 0 18px; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 26px; }
.chip {
  font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  color: var(--ink-soft); background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 15px; cursor: pointer;
  transition: border-color .18s, color .18s, transform .12s;
}
.chip:hover { border-color: var(--red); color: var(--red); transform: translateY(-1px); }

.conversation {
  display: flex; flex-direction: column; gap: 18px;
  margin-bottom: 20px; min-height: 120px;
}
.msg { display: flex; }
.msg-user { justify-content: flex-end; }
.bubble {
  background: var(--ink); color: #fff;
  padding: 12px 16px; border-radius: 16px 16px 4px 16px;
  max-width: 78%; font-size: 15px; line-height: 1.5;
}

.answer-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: 4px 16px 16px 16px;
  padding: 22px 24px; max-width: 92%;
  box-shadow: var(--shadow-sm);
}
.answer-text {
  font-family: var(--serif);
  font-size: 18.5px; line-height: 1.62;
  color: var(--ink); margin: 0; white-space: pre-wrap;
}
.citation {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.citation-label {
  display: block;
  font-size: 11px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.citation-links { display: flex; flex-direction: column; gap: 6px; }
.citation-link {
  color: var(--red-dark); font-weight: 600; font-size: 14.5px;
  text-decoration: none; width: max-content;
  border-bottom: 1px solid transparent; transition: border-color .15s;
}
.citation-link::before { content: "↗"; margin-right: 7px; color: var(--red); font-weight: 700; }
.citation-link:hover { border-bottom-color: var(--red-dark); }
.answer-standing {
  margin: 14px 0 0; font-size: 12.5px; color: var(--muted);
  font-style: italic; font-family: var(--serif);
}

/* handoff / route state */
.answer-card.handoff { border-left-color: var(--gold); background: #fffdf7; }
.handoff-tag {
  display: inline-block; font-size: 11px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #8a6d1f; background: #f6eccf; border-radius: 999px;
  padding: 4px 10px; margin-bottom: 12px;
}
.answer-card.error { border-left-color: var(--muted); }
.handoff-btn {
  margin-top: 16px;
  font-family: var(--sans); font-size: 14px; font-weight: 700;
  color: #fff; background: var(--ink);
  border: 0; border-radius: 10px; padding: 11px 18px; cursor: pointer;
  transition: background .18s, transform .12s;
}
.handoff-btn::after { content: " →"; }
.handoff-btn:hover { background: #000; transform: translateY(-1px); }

/* typing indicator */
.typing { display: flex; }
.typing-dots {
  display: inline-flex; gap: 5px; padding: 16px 20px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 4px 16px 16px 16px;
}
.typing-dots span {
  width: 7px; height: 7px; border-radius: 50%; background: #c4c4cd;
  animation: blink 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* ask form */
.ask-form { display: flex; gap: 10px; }
.ask-enquiry-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin: 18px 0 0; padding: 16px 18px;
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 14px; background: #fffdf7;
}
.ask-enquiry-cta p { margin: 0; color: var(--ink-soft); font-size: 14.5px; line-height: 1.45; }
.ask-enquiry-cta strong { color: var(--ink); }
.ask-enquiry-cta a {
  flex-shrink: 0; color: var(--red-dark); font-weight: 800; font-size: 14px;
  text-decoration: none; border-bottom: 1px solid transparent;
}
.ask-enquiry-cta a:hover { border-bottom-color: var(--red-dark); }
.ask-form input {
  flex: 1; font-family: var(--sans); font-size: 15.5px;
  border: 1px solid var(--line); background: var(--paper);
  border-radius: 12px; padding: 14px 16px; color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
.ask-form input:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(226, 35, 26, 0.12);
}
.ask-form button {
  font-family: var(--sans); font-weight: 700; font-size: 15px;
  color: #fff; background: var(--red); border: 0;
  border-radius: 12px; padding: 0 26px; cursor: pointer;
  transition: background .18s;
}
.ask-form button:hover { background: var(--red-dark); }
.ask-form button:disabled { opacity: .6; cursor: default; }
.standing-line {
  margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center;
}

/* ---------- Press releases ---------- */
.release-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.release-card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px; text-decoration: none;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.release-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow);
  border-color: #d3d3da;
}
.release-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.release-date { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.release-status {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 999px;
}
.release-status.full { color: #1c6b3a; background: #e6f4ec; }
.release-status.link { color: #5b5b66; background: #f0f0f3; }
.release-title {
  font-size: 19px; line-height: 1.28; letter-spacing: -0.01em;
  margin: 0 0 12px; color: var(--ink);
}
.release-summary {
  font-family: var(--serif); font-size: 15.5px; line-height: 1.55;
  color: var(--ink-soft); margin: 0 0 20px; flex: 1;
}
.release-cta {
  font-size: 13.5px; font-weight: 700; color: var(--red-dark);
}
.release-cta::after { content: " ↗"; }
.load-error { grid-column: 1 / -1; text-align: center; padding: 30px; color: var(--muted); }

/* ---------- Enquiry ---------- */
.enquiry-layout {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; align-items: start;
}
.enquiry-form { display: flex; flex-direction: column; gap: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field {
  display: flex; flex-direction: column; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
}
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 15px; font-weight: 400;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  transition: border-color .18s, box-shadow .18s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(226, 35, 26, 0.12);
}
.check {
  display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: start;
  font-size: 14px; color: var(--ink-soft); font-weight: 500;
}
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--red); }
.privacy-note {
  font-size: 12.5px; line-height: 1.55; color: var(--muted);
  background: var(--line-soft); border-radius: 10px; padding: 14px 16px; margin: 0;
}
.enquiry-form > button {
  align-self: flex-start;
  font-family: var(--sans); font-weight: 700; font-size: 15px;
  color: #fff; background: var(--red); border: 0;
  border-radius: 12px; padding: 13px 28px; cursor: pointer;
  transition: background .18s;
}
.enquiry-form > button:hover { background: var(--red-dark); }
.enquiry-form > button:disabled { opacity: .6; cursor: default; }
.form-result { font-size: 14.5px; font-weight: 600; margin-top: 4px; }
.form-result.success { color: #1c6b3a; }
.form-result.error { color: var(--red-dark); }

.enquiry-aside {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px; padding: 26px;
}
.enquiry-aside h3 { margin: 0 0 14px; font-size: 17px; }
.enquiry-aside ul { margin: 0 0 16px; padding-left: 18px; }
.enquiry-aside li { font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); margin-bottom: 8px; }

/* ---------- About ---------- */
.about-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 36px;
}
.about-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px; padding: 26px;
}
.about-card h3 { margin: 0 0 12px; font-size: 18px; }
.about-card p { margin: 0; font-family: var(--serif); font-size: 16px; line-height: 1.6; color: var(--ink-soft); }
.about-card a { color: var(--red-dark); font-weight: 600; }
.disclaimer {
  background: #fff4f3; border: 1px solid #f3cdc9;
  border-radius: 16px; padding: 22px 26px;
  font-size: 15px; line-height: 1.6; color: #6d1713; max-width: 80ch;
}
.disclaimer strong { color: #8a1610; }
.disclaimer a { color: var(--red-dark); font-weight: 700; }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: #9b9ba6; margin-top: 40px; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 36px 0; flex-wrap: wrap;
}
.footer-mark { height: 30px; width: auto; opacity: .95; }
.footer-note { margin: 0; font-size: 12.5px; line-height: 1.5; letter-spacing: 0.02em; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--dark); padding: 10px 24px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: none;
  }
  .nav.open { display: flex; }
  .nav-link { padding: 12px 14px; border-radius: 10px; }
  .nav-toggle { display: flex; }
  .release-grid, .about-grid { grid-template-columns: 1fr; }
  .enquiry-layout { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hero-inner { padding: 64px 0 72px; }
  .answer-card, .bubble { max-width: 100%; }
  .ask-enquiry-cta { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Admin page (admin.html / admin.js) — separate protected route.
   Kept simple and self-contained; do not link from public IA.
   ============================================================ */
.shell { width: min(900px, calc(100% - 48px)); margin: 0 auto; padding: 56px 0; }
.shell .hero { background: none; color: var(--ink); padding: 0; margin-bottom: 28px; }
.shell .hero h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.05; letter-spacing: -0.02em; margin: 8px 0 14px; max-width: none; font-weight: 800; }
.shell .lede { font-size: 18px; color: var(--ink-soft); max-width: 60ch; }
.shell .notice {
  margin-top: 18px; border: 1px solid #f0c8c5; background: #fff4f3;
  color: #6d1713; padding: 14px 16px; border-radius: 14px;
}
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 18px; padding: 24px; box-shadow: var(--shadow-sm);
}
.card-head h2 { margin: 0 0 4px; font-size: 20px; }
.card-head p { margin: 0 0 16px; color: var(--muted); }
.row { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.secondary {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; font-family: var(--sans); font-weight: 600;
}
.admin-card .chat-form { display: flex; gap: 10px; margin: 8px 0 4px; }
.admin-card .chat-form input {
  flex: 1; font-family: var(--sans); font-size: 15px;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
}
.admin-card .chat-form button {
  font-family: var(--sans); font-weight: 700; color: #fff; background: var(--red);
  border: 0; border-radius: 10px; padding: 0 22px; cursor: pointer;
}
.result { margin-top: 12px; color: var(--ink-soft); font-weight: 600; }
.admin-list { margin-top: 10px; }
.admin-item { border-top: 1px solid var(--line); padding: 14px 0; display: grid; gap: 5px; }
.admin-item:first-child { border-top: 0; }
.admin-item strong { font-size: 15px; }
.admin-item span { font-size: 14px; color: var(--ink-soft); }
.badge {
  display: inline-block; width: max-content;
  background: #f1f5f9; border: 1px solid #dbe3ef; color: #334155;
  border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600;
}
