/* Landing Gallery — AGENTS_42 messaging + compact redesign */
:root {
  --ink: #2A2421;
  --ink-soft: #4A423C;
  --muted: #7A716A;
  --line: #E8E0D8;
  --cream: #FFF9F5;
  --white: #FFFFFF;
  --accent: var(--primary,#2F6F68);
  --accent-hover: #245852;
  --accent-soft: #E7F2F0;
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1120px;
  --shadow: 0 14px 40px rgba(42, 36, 33, .08);
  --shadow-hover: 0 20px 50px rgba(47, 111, 104, .14);
  --header-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body.gallery-page {
  font-family: Manrope, system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(47, 111, 104, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(196, 139, 122, 0.08) 0%, transparent 42%),
    var(--cream);
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
}
body.gallery-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(42, 36, 33, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
h1, h2, h3, .logo { font-family: "Space Grotesk", system-ui, sans-serif; letter-spacing: -0.03em; font-weight: 650; }
a { color: inherit; text-decoration: none; }
.container { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; position: relative; z-index: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .75rem 1.15rem; border-radius: 999px; font-weight: 600; font-size: .88rem;
  border: 1px solid transparent; cursor: pointer; transition: .2s ease; font-family: inherit; background: transparent;
}
.btn-red { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(47,111,104,.25); }
.btn-red:hover { background: var(--accent-hover); }
.btn-outline { background: rgba(255,255,255,.85); border-color: var(--line); color: var(--ink-soft); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(224,224,224,.85);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { font-weight: 700; font-size: 1.1rem; display: inline-flex; align-items: center; gap: .5rem; }
.logo img { width: 56px; height: 56px; border-radius: 0; }
.logo-text {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
}
.logo-text-main { color: var(--ink); }
.logo-text-ai { color: var(--accent); }
.nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: .88rem; font-weight: 600; }
.nav a:hover, .nav a.active { color: var(--accent); }
.header-actions { display: flex; gap: .5rem; align-items: center; }
.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon i { font-size: 1rem; }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; }

.gallery-header-compact {
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(8px);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1.2rem;
  min-height: 120px; padding: 1.1rem 0;
}
.header-left h1 { font-size: 1.85rem; margin-bottom: .25rem; }
.header-left p { color: var(--muted); font-size: .9rem; }
.header-left p.gallery-hint {
  max-width: 42rem;
  line-height: 1.5;
  padding: .65rem .9rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--ink-soft);
}
.header-left p.gallery-hint strong { color: var(--accent); }
.header-right { display: flex; gap: 1.2rem; }
.stat-inline { text-align: center; }
.stat-value {
  display: block; font-family: Manrope, system-ui, sans-serif;
  font-size: 1.4rem; font-weight: 700; color: var(--accent); line-height: 1.1;
}
.stat-label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.header-left p strong { color: var(--ink-soft); font-weight: 700; }

.gallery-license-banner {
  border-bottom: 1px solid var(--line);
  background: var(--accent-soft);
}
.gallery-license-banner p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .55rem;
  padding: .7rem 0;
  font-size: .88rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.gallery-license-banner i { color: var(--accent); }
.gallery-license-banner a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.gallery-license-banner a:hover { color: var(--accent-hover); }

.gallery-filters-sticky {
  position: sticky; top: var(--header-h); z-index: 40;
  background: rgba(255,249,245,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.filters-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(240px, 1.4fr);
  align-items: end;
  gap: .85rem;
  width: 100%;
  padding: .75rem 0;
}
.filter-field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 0;
  width: 100%;
}
.filter-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.filter-field select {
  width: 100%;
  height: 44px;
  padding: 0 .9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:var(--bg-card,#fff);
  color: var(--ink);
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237A716A' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  padding-right: 2.2rem;
}
.filter-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47,111,104,.12);
}
.filter-search-field { min-width: 0; }
.filter-search {
  position: relative; display: flex; align-items: center; width: 100%;
}
.filter-search i { position: absolute; left: .85rem; color: var(--muted); font-size: .85rem; pointer-events: none; }
.filter-search input {
  width: 100%; height: 44px;
  padding: 0 .9rem 0 2.35rem;
  border: 1px solid var(--line);
  border-radius: 12px; background:var(--bg-card,#fff); font: inherit; font-size: .88rem;
}
.filter-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47,111,104,.12);
}

.gallery-grid { padding: 1.2rem 0 3rem; }
.grid-toolbar { display: flex; justify-content: flex-end; margin-bottom: .7rem; }
.grid-count { font-family: Manrope, system-ui, sans-serif; font-size: .9rem; color: var(--muted); font-weight: 600; }

.landings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.landing-card {
  display: flex;
  flex-direction: column;
  background:var(--bg-card,#fff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  opacity: 0;
  transform: translateY(16px);
}
.landing-card.in-view { opacity: 1; transform: translateY(0); }
.landing-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(47,111,104,.3);
}

/* Desktop site scaled to card; preview = full cover (16:9) */
.card-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
  flex-shrink: 0;
}
.card-preview iframe.card-site {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  border: 0;
  transform-origin: 0 0;
  pointer-events: none;
  overflow: hidden;
}

.card-badges {
  display: flex; gap: .35rem; flex-wrap: wrap;
  margin-bottom: .55rem;
}
.badge {
  font-size: .68rem; font-weight: 700; padding: .22rem .5rem; border-radius: 999px;
  background: var(--cream); color: var(--ink-soft); border: 1px solid var(--line);
}
.badge-structure { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge-structure--maison { background: #F3E8FF; color: #7A3E9D; }
.badge-structure--atelier { background: #E8F1FF; color: #355F9D; }
.badge-structure--premium { background: #FFF4D6; color: #8A6A12; }
.badge-structure--selling { background: #FFE8E0; color: #B03A1E; }
.badge-structure--classic { background: var(--accent-soft); color: var(--accent); }
.badge-structure--services { background: #E7F6F0; color: #1F7A4D; }
.badge-structure--masters { background: #FCE7F3; color: #9D174D; }
.badge-structure--portfolio { background: #111; color: #F5F5F5; }
.badge-structure--story { background: #F5F0E8; color: #6B5E54; }
.badge-structure--minimal { background: #EEE; color:var(--text-secondary,#555); }
.badge-structure--mobile { background: #E0F2FE; color: #0369A1; }
.badge-structure--split { background: #ECFDF5; color: #047857; }

.btn-card-compare {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background:var(--bg-card,#fff); color: var(--muted);
  cursor: pointer; display: inline-grid; place-items: center;
}
.btn-card-compare[aria-pressed="true"],
.landing-card.is-compare .btn-card-compare {
  background: var(--accent-soft); color: var(--accent); border-color: var(--accent);
}
.landing-card.is-compare { outline: 2px solid rgba(47,111,104,.35); }

.compare-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px rgba(0,0,0,.08); backdrop-filter: blur(10px);
}
.compare-bar[hidden] { display: none !important; }
.compare-bar-inner {
  width: min(1120px, calc(100% - 2rem)); margin: 0 auto;
  padding: .75rem 0; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap;
}
.compare-label { font-weight: 700; color: var(--ink); font-size: .88rem; }
.compare-slots { display: flex; gap: .5rem; flex: 1; flex-wrap: wrap; }
.compare-chip {
  padding: .35rem .7rem; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent); font-size: .78rem; font-weight: 650;
}
.compare-modal {
  position: fixed; inset: 0; z-index: 80; background: rgba(20,18,16,.55);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.compare-modal[hidden] { display: none !important; }
.compare-modal-panel {
  width: min(1200px, 100%); height: min(86vh, 900px); background:var(--bg-card,#fff);
  border-radius: 18px; overflow: hidden; position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
.compare-modal-close {
  position: absolute; top: .7rem; right: .7rem; z-index: 2;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.92); cursor: pointer;
}
.compare-frames {
  display: grid; grid-template-columns: 1fr 1fr; height: 100%;
}
.compare-frames iframe { width: 100%; height: 100%; border: 0; border-right: 1px solid var(--line); }
.compare-frames iframe:last-child { border-right: 0; }
@media (max-width: 800px) {
  .compare-frames { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .compare-frames iframe { border-right: 0; border-bottom: 1px solid var(--line); }
}
.badge-demo {
  background: #F3EDE7;
  color: #6B5E54;
  border-color: transparent;
  font-weight: 600;
}
.badge-price {
  background: #FFF3E8; color: #9A5B2E; border-color: #F0D6C0;
}
.badge-selected {
  background: #E5F5EE; color: #1F7A4D; border-color: #B8E0CC;
}
.landing-card.is-selected {
  border-color: #2F9B6A;
  box-shadow: 0 14px 36px rgba(47, 155, 106, .18);
}
.landing-card.is-selected .btn-card-secondary {
  background: #E5F5EE; border-color: #2F9B6A; color: #1F7A4D;
}

.card-body {
  padding: .9rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
  font-weight: 650;
  margin-bottom: .35rem;
  line-height: 1.25;
  color: var(--ink);
}
.card-tagline {
  font-size: .84rem;
  color: var(--muted);
  margin-bottom: .45rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.9em;
  flex: 1;
}
.card-license-note {
  font-size: .72rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: .75rem;
  letter-spacing: .01em;
}
.card-actions { display: flex; gap: .45rem; margin-top: auto; flex-wrap: wrap; }
.btn-card-primary, .btn-card-secondary {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .55rem .7rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid transparent;
  text-decoration: none;
  text-align: center;
}
.btn-card-primary { background: var(--accent); color: #fff; }
.btn-card-primary:hover { background: var(--accent-hover); }
.btn-card-secondary { background:var(--bg-card,#fff); border-color: var(--line); color: var(--ink-soft); }
.btn-card-secondary:hover { border-color: var(--accent); color: var(--accent); }

.site-footer {
  border-top: 1px solid var(--line); padding: 1.2rem 0 1.6rem;
  background: rgba(255,255,255,.6);
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .88rem; color: var(--muted); }
.footer-inner a { color: var(--accent); font-weight: 600; }
.footer-pricing { color: var(--ink-soft); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(20, 18, 16, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; backdrop-filter: blur(4px);
}
.modal-overlay[hidden] { display: none !important; }
.modal {
  width: min(440px, 100%);
  background:var(--bg-card,#fff); border-radius: 22px; padding: 1.5rem 1.35rem 1.35rem;
  position: relative; box-shadow: 0 24px 60px rgba(0,0,0,.2);
  border: 1px solid var(--line);
}
.modal-close {
  position: absolute; right: .9rem; top: .9rem; border: 0; background: var(--cream);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: var(--ink-soft);
}
.modal-header { text-align: center; margin-bottom: 1rem; }
.modal-icon {
  width: 48px; height: 48px; margin: 0 auto .7rem; border-radius: 14px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 1.2rem;
}
.modal-header h2 { font-size: 1.35rem; margin-bottom: .3rem; }
.modal-header p { color: var(--muted); font-size: .88rem; }
.modal-preview-mini {
  background: var(--cream); border: 1px solid var(--line); border-radius: 14px;
  padding: .85rem 1rem; margin-bottom: 1rem;
}
.mini-label { font-size: .7rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.mini-name { font-family: "Space Grotesk", sans-serif; font-weight: 650; font-size: 1.05rem; margin-top: .15rem; }
.mini-tagline { font-size: .84rem; color: var(--muted); }
.modal-form .form-group { margin-bottom: .75rem; }
.modal-form label { display: block; font-size: .78rem; font-weight: 700; margin-bottom: .3rem; color: var(--ink-soft); }
.modal-form input, .modal-form textarea {
  width: 100%; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 12px;
  font: inherit; background:var(--bg-card,#fff);
}
.modal-note { margin-top: .7rem; font-size: .72rem; color: var(--muted); text-align: center; }

.toast {
  position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: .75rem 1.15rem; border-radius: 999px;
  font-size: .88rem; font-weight: 600; z-index: 90; box-shadow: var(--shadow);
}
.toast[hidden] { display: none !important; }

@media (max-width: 960px) {
  .landings-grid { grid-template-columns: repeat(2, 1fr); }
  .filters-row { grid-template-columns: 1fr 1fr; }
  .filter-search-field { grid-column: 1 / -1; }
  .header-right { display: none; }
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; position: absolute; right: 1rem; top: 72px; background:var(--bg-card,#fff); padding: 1rem; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 640px) {
  .landings-grid { grid-template-columns: 1fr; }
  .header-left h1 { font-size: 1.45rem; }
  .filters-row { grid-template-columns: 1fr; }
  .filter-search-field { grid-column: auto; }
}
