/* ==========================================================
   AdStudioLab — base, layout & page sections
   Facebook-style light theme: blue #1877F2 on grey #F0F2F5
   ========================================================== */

:root {
  --blue: #1877F2;
  --blue-hover: #166FE5;
  --blue-press: #1464D6;
  --blue-soft: #E7F3FF;
  --link: #216FDB;
  --green: #42B72A;
  --green-hover: #36A420;

  --bg: #F0F2F5;
  --surface: #FFFFFF;
  --field: #F0F2F5;
  --hover: #F2F2F2;
  --secondary: #E4E6EB;
  --secondary-hover: #D8DADF;

  --text: #050505;
  --text-2: #65676B;
  --text-3: #8A8D91;
  --divider: #CED0D4;
  --divider-soft: #E4E6EB;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1);
  --shadow-3: 0 12px 28px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --header-h: 56px;
  --font: "Segoe UI Historic", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.34;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
img, svg, iframe { display: block; }
[hidden] { display: none !important; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--secondary);
  color: var(--text);
}

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: var(--radius-sm); }
::selection { background: var(--blue-soft); }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: #FFFFFF;
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 8px; }

.muted { color: var(--text-2); font-weight: 400; }

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

.divider { height: 1px; border: 0; background: var(--divider); margin: 20px 0; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.04);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }

.brand { display: flex; align-items: center; gap: 8px; }
.brand__badge { width: 40px; height: 40px; }
.brand__ring { transform-origin: 20px 20px; animation: spin 16s linear infinite; }
.brand__play { transform-origin: 21px 20px; animation: beat 2.4s var(--ease) infinite; }
.brand__name { color: var(--blue); font-size: 24px; font-weight: 800; letter-spacing: -0.8px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes beat { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.2); } }

.site-nav { display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 600; }
.site-nav > a:not(.btn) {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  transition: background 0.15s;
}
.site-nav > a:not(.btn):hover { background: var(--hover); color: var(--text); }
.site-nav .btn { margin-left: 8px; }

/* ---------------- Hero (login-page layout) ---------------- */
.hero { padding: 72px 0 64px; }
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 396px);
  align-items: center;
  gap: 48px;
}
.hero__brand { color: var(--blue); font-size: clamp(44px, 6vw, 60px); font-weight: 800; letter-spacing: -2px; line-height: 1; }
.hero__title {
  margin: 14px 0 12px;
  font-size: clamp(24px, 3vw, 28px);
  font-weight: 400;
  line-height: 1.25;
  color: var(--text);
}
.hero__lead { max-width: 540px; color: var(--text-2); font-size: 17px; line-height: 1.45; }

.hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
}
.hero-card > .btn--block { width: 100%; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
  margin-bottom: 14px;
}
.stats > div {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--field);
  text-align: center;
}
.stats dt { color: var(--text-2); font-size: 13px; }
.stats dd { color: var(--blue); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------------- Sections ---------------- */
.gallery-section { padding: 8px 0 72px; }
.section-head { margin-bottom: 16px; }
.section-head h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; line-height: 1.2; }
.section-head p { max-width: 640px; margin-top: 4px; color: var(--text-2); font-size: 15px; }

.results { margin: 16px 0 12px; color: var(--text-2); font-size: 14px; font-weight: 600; }

.standards { padding: 0 0 72px; }
.standards__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
}
.standards__grid li { padding: 20px; }
.panel__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}
.standards__grid h3 { margin-bottom: 4px; font-size: 17px; font-weight: 600; }
.standards__grid p { color: var(--text-2); font-size: 14px; line-height: 1.45; }

/* ---------------- Footer ---------------- */
.site-footer { padding-bottom: 24px; }
.cta-panel { padding: 48px 24px; text-align: center; }
.cta-panel h2 { max-width: 640px; margin: 0 auto; font-size: clamp(22px, 3vw, 30px); line-height: 1.25; font-weight: 700; }
.cta-panel p { max-width: 560px; margin: 10px auto 24px; color: var(--text-2); font-size: 16px; line-height: 1.45; }
.cta-panel__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
  color: var(--text-3);
  font-size: 12px;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .hero__lead { margin-inline: auto; }
  .hero-card { max-width: 396px; width: 100%; margin-inline: auto; }
  .standards__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .site-nav > a:not(.btn) { display: none; }
  .brand__name { font-size: 21px; }
  .hero { padding: 40px 0 40px; }
  .standards__grid { grid-template-columns: 1fr; }
  .cta-panel { padding: 36px 16px; }
  .site-footer__bottom { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
