/* ============================================================
   TROVE — Design System
   Marketplace tài sản số (stock + graphics)
   Style: clean/minimal + editorial, trustworthy blue
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Neutrals — cool-tinted */
  --bg:        oklch(0.992 0.004 250);
  --surface:   #ffffff;
  --surface-2: oklch(0.975 0.006 252);
  --ink:       oklch(0.23 0.022 264);
  --ink-2:     oklch(0.46 0.018 264);
  --ink-3:     oklch(0.62 0.014 264);
  --line:      oklch(0.915 0.008 260);
  --line-2:    oklch(0.95 0.006 260);

  /* Trustworthy blue */
  --blue:        oklch(0.53 0.165 256);
  --blue-strong: oklch(0.46 0.165 256);
  --blue-deep:   oklch(0.30 0.10 262);
  --blue-ink:    oklch(0.22 0.07 264);
  --blue-tint:   oklch(0.955 0.028 256);
  --blue-tint-2: oklch(0.92 0.05 256);

  /* Harmonious placeholder tints (same chroma/lightness, varied hue) */
  --t-blue:   oklch(0.90 0.055 256);
  --t-teal:   oklch(0.90 0.055 196);
  --t-violet: oklch(0.90 0.055 296);
  --t-amber:  oklch(0.90 0.055 76);
  --t-rose:   oklch(0.90 0.055 16);
  --t-green:  oklch(0.90 0.055 146);

  /* Type */
  --sans: 'Schibsted Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Radius + shadow */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --shadow-sm: 0 1px 2px oklch(0.4 0.03 264 / 0.06), 0 2px 6px oklch(0.4 0.03 264 / 0.05);
  --shadow:    0 4px 14px oklch(0.4 0.03 264 / 0.08), 0 12px 36px oklch(0.4 0.03 264 / 0.07);
  --shadow-lg: 0 18px 60px oklch(0.35 0.04 264 / 0.16);

  --maxw: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

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

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--blue-tint-2); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 28px; }
.wrap-wide { max-width: 1400px; margin-inline: auto; padding-inline: 28px; }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow-muted { color: var(--ink-3); }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.04; color: var(--ink); }
.display {
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  font-size: clamp(2.6rem, 6.5vw, 5.6rem);
  text-wrap: balance;
}
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--ink-2); line-height: 1.55; text-wrap: pretty; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .16s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px oklch(0.53 0.165 256 / 0.28); }
.btn-primary:hover { background: var(--blue-strong); box-shadow: 0 10px 26px oklch(0.53 0.165 256 / 0.34); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-3); background: var(--surface); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; transform: translateY(-1px); }
.btn-white { background: #fff; color: var(--blue-ink); }
.btn-white:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

/* ---------- Pills / chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); transition: all .16s ease; white-space: nowrap;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 5px 10px; border-radius: 6px;
  background: var(--blue-tint); color: var(--blue-strong);
}

/* ---------- Header / Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: oklch(0.992 0.004 250 / 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 26px; height: 70px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 21px; letter-spacing: -0.04em; }
.logo-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--blue); position: relative; flex: none;
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.18);
}
.logo-mark::after {
  content: ""; position: absolute; inset: 7px 7px auto auto; width: 8px; height: 8px;
  border-radius: 2px; background: #fff; top: 6px; right: 6px;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  padding: 9px 13px; border-radius: 8px; transition: all .15s ease; white-space: nowrap;
}
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-search {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 8px 0 16px; height: 44px; transition: border-color .15s ease, box-shadow .15s ease;
}
.nav-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-tint); }
.nav-search input { flex: 1; border: none; outline: none; background: none; font-size: 14.5px; color: var(--ink); height: 100%; }
.nav-search input::placeholder { color: var(--ink-3); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; color: var(--ink-2);
  transition: all .15s ease;
}
.icon-btn:hover { border-color: var(--ink-3); color: var(--ink); }

/* ---------- Footer ---------- */
.footer { background: var(--blue-ink); color: oklch(0.86 0.02 260); margin-top: 0; }
.footer a { color: oklch(0.78 0.02 260); font-size: 14px; transition: color .15s ease; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; padding: 72px 0 56px; }
.footer h4 { font-size: 12px; font-family: var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: oklch(0.62 0.03 260); margin-bottom: 18px; font-weight: 500; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-bottom { border-top: 1px solid oklch(0.4 0.04 264 / 0.4); padding: 26px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 13px; color: oklch(0.62 0.03 260); }

/* ---------- Asset card / placeholder tile ---------- */
.tile {
  position: relative; border-radius: var(--r); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile-ph {
  position: relative; width: 100%; height: 100%;
  display: grid; place-items: center; overflow: hidden;
}
/* striped placeholder — signals "drop real asset here" */
.tile-ph::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    -45deg, transparent 0 11px, oklch(1 0 0 / 0.35) 11px 12px);
  opacity: 0.6;
}
.tile-label {
  position: relative; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
  color: oklch(0.32 0.04 264 / 0.6); background: oklch(1 0 0 / 0.55);
  padding: 4px 9px; border-radius: 5px; backdrop-filter: blur(2px);
}
.tile-over {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 12px; opacity: 0; transition: opacity .2s ease;
  background: linear-gradient(to top, oklch(0.2 0.05 264 / 0.55), transparent 55%);
}
.tile:hover .tile-over { opacity: 1; }
.tile-tag {
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: #fff; background: oklch(0.2 0.05 264 / 0.5); padding: 4px 8px; border-radius: 5px; backdrop-filter: blur(3px);
}
.tile-fav {
  width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--ink);
  display: grid; place-items: center; border: none;
}
.tile-fav:hover { color: var(--blue); }

/* real media inside tiles */
.tile-media { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--surface-2); }
.tile-media img, .tile-media video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.tile:hover .tile-media img, .tile:hover .tile-media video { transform: scale(1.05); }
.vbadge {
  position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: #fff;
  background: oklch(0.2 0.05 264 / 0.55); padding: 4px 8px; border-radius: 5px; backdrop-filter: blur(3px);
}
.vbadge .dot { width: 6px; height: 6px; border-radius: 50%; background: oklch(0.7 0.18 16); }

/* tint variants */
.ph-blue   { background: var(--t-blue); }
.ph-teal   { background: var(--t-teal); }
.ph-violet { background: var(--t-violet); }
.ph-amber  { background: var(--t-amber); }
.ph-rose   { background: var(--t-rose); }
.ph-green  { background: var(--t-green); }

/* ---------- Section helpers ---------- */
.section { padding: 88px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.section-head p { color: var(--ink-2); margin-top: 8px; max-width: 46ch; }

/* ---------- Utility ---------- */
.muted { color: var(--ink-2); }
.divider { height: 1px; background: var(--line); border: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .section { padding: 64px 0; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .wrap, .wrap-wide { padding-inline: 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-search { display: none; }
}
