﻿:root {
  --bg: #f5f1eb;
  --surface: rgba(255, 255, 255, 0.74);
  --ink: #101828;
  --muted: #667085;
  --line: rgba(16, 24, 40, 0.1);
  --blue: #2446f5;
  --pink: #e11d87;
  --shadow-soft: 0 24px 80px rgba(36, 70, 245, 0.12);
  --shadow-card: 0 28px 70px rgba(12, 18, 42, 0.14);
  --radius-lg: 36px;
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: radial-gradient(circle at top left, rgba(225, 29, 135, 0.18), transparent 28%), radial-gradient(circle at top right, rgba(36, 70, 245, 0.18), transparent 30%), linear-gradient(180deg, #fcfaf7 0%, #f2efe8 100%);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.ambient, .noise { pointer-events: none; position: fixed; z-index: 0; }
.ambient { width: 28rem; height: 28rem; border-radius: 999px; filter: blur(120px); opacity: 0.6; }
.ambient-a { top: -6rem; right: -4rem; background: rgba(225, 29, 135, 0.24); }
.ambient-b { bottom: 18%; left: -8rem; background: rgba(36, 70, 245, 0.18); }
.ambient-c { top: 36%; right: 22%; background: rgba(124, 58, 237, 0.12); }
.noise {
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.45) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.45) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.18;
}
.site-header, main, .site-footer { position: relative; z-index: 1; }
.site-header {
  width: min(1200px, calc(100vw - 40px));
  margin: 24px auto 0;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 46px; height: 46px; border-radius: 14px; }
.brand-copy, .brand-name, .brand-note { display: block; }
.brand-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.03em; }
.brand-note { color: var(--muted); font-size: 0.92rem; }
.header-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.header-badges span {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}
main { width: min(1200px, calc(100vw - 40px)); margin: 44px auto 96px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 32px; align-items: center; }
.eyebrow { margin: 0 0 14px; color: var(--blue); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.16em; }
.hero h1, .section-head h2, .breakdown-copy h3, .principle-card h3 { margin: 0; font-family: var(--font-display); letter-spacing: -0.04em; }
.hero h1 { font-size: clamp(2.9rem, 5.2vw, 5.25rem); line-height: 0.98; max-width: 12ch; }
.hero-text { margin: 24px 0 0; max-width: 62ch; color: var(--muted); font-size: 1.06rem; line-height: 1.75; }
.hero-points { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-points span {
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(36, 70, 245, 0.14);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 24px rgba(12, 18, 42, 0.06);
  font-size: 0.95rem;
  font-weight: 700;
}
.hero-panel, .workspace, .analytics, .principle-card {
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-card);
}
.hero-panel { padding: 28px; border-radius: var(--radius-lg); }
.shortener-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
}
.shortener-shell input { width: 100%; min-width: 0; border: none; background: transparent; color: var(--ink); font-size: 1.06rem; outline: none; }
.shortener-shell input::placeholder { color: #98a2b3; }
.shorten-btn {
  border: none;
  padding: 18px 26px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--blue), var(--pink));
  color: white;
  font-weight: 800;
  letter-spacing: -0.02em;
  cursor: pointer;
  box-shadow: 0 20px 36px rgba(124, 58, 237, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.shorten-btn:hover, .shorten-btn:focus-visible { transform: translateY(-1px); box-shadow: 0 24px 44px rgba(124, 58, 237, 0.32); }
.form-feedback { margin: 16px 2px 0; min-height: 1.5em; color: var(--muted); font-size: 0.96rem; }
.form-feedback.is-error { color: #b42318; }
.form-feedback.is-success { color: #175cd3; }
.metric-row { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.metric-card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 249, 252, 0.82));
  border: 1px solid var(--line);
}
.metric-label, .analytics-label, .card-label { display: block; color: var(--muted); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.metric-card strong { display: block; margin-top: 10px; font-family: var(--font-display); font-size: 1.02rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(2rem, 3vw, 3rem); }
.section-note, .selected-link, .analytics-meta, .breakdown-copy p, .principle-card p, .site-footer p { color: var(--muted); line-height: 1.7; }
.workspace, .analytics { margin-top: 34px; padding: 28px; border-radius: var(--radius-lg); }
.links-list { display: grid; gap: 18px; }
.empty-state { padding: 34px; border-radius: 30px; border: 1px dashed rgba(36, 70, 245, 0.24); background: rgba(255, 255, 255, 0.62); }
.empty-state h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 1.4rem; }
.empty-state p { margin: 0; max-width: 50ch; color: var(--muted); }
.link-card {
  position: relative;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  color: white;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.link-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 42%); pointer-events: none; }
.link-card:hover, .link-card:focus-visible, .link-card.is-selected { transform: translateY(-2px); box-shadow: 0 34px 86px rgba(12, 18, 42, 0.22); }
.link-card.is-selected { border-color: rgba(255, 255, 255, 0.72); }
.link-card.theme-blue { background: linear-gradient(135deg, #0d1d8f, #1e3ae6 66%, #5b6df6); }
.link-card.theme-berry { background: linear-gradient(135deg, #6f0629, #9f1239 58%, #e11d87); }
.link-card.theme-indigo { background: linear-gradient(135deg, #24115a, #4338ca 56%, #8b5cf6); }
.card-top, .card-bottom, .card-stats, .card-actions { position: relative; z-index: 1; }
.card-top { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.card-title { margin: 0; font-family: var(--font-display); font-size: clamp(1.45rem, 2.5vw, 2rem); letter-spacing: -0.04em; }
.card-long { margin: 10px 0 0; max-width: 54ch; color: rgba(255, 255, 255, 0.78); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-actions { display: flex; align-items: center; gap: 10px; }
.action-btn { border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.08); color: white; padding: 12px 16px; border-radius: 16px; cursor: pointer; font-weight: 800; transition: background 160ms ease, transform 160ms ease; }
.action-btn:hover, .action-btn:focus-visible { background: rgba(255, 255, 255, 0.16); transform: translateY(-1px); }
.card-bottom { margin-top: 22px; display: flex; align-items: end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.card-chip-row, .card-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.chip, .stat-pill { padding: 10px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.08); font-size: 0.92rem; }
.analytics-head { align-items: center; }
.selected-link { max-width: 420px; text-align: right; }
.analytics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.analytics-card { padding: 22px; border-radius: 26px; background: rgba(255, 255, 255, 0.74); border: 1px solid var(--line); }
.analytics-value { display: block; margin-top: 14px; font-family: var(--font-display); font-size: clamp(1.45rem, 2.1vw, 1.9rem); letter-spacing: -0.04em; }
.breakdown-panel {
  margin-top: 22px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 20px;
  align-items: center;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(17, 29, 111, 0.96), rgba(124, 58, 237, 0.88));
  color: white;
}
.breakdown-copy .eyebrow { color: rgba(255, 255, 255, 0.72); }
.breakdown-copy p { color: rgba(255, 255, 255, 0.76); }
.breakdown-bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: center; }
.bar-row span { font-size: 0.94rem; font-weight: 700; }
.bar-track { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffffff, #ffb7dc); }
.principles { margin-top: 34px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.principle-card { padding: 26px; border-radius: 30px; }
.principle-card h3 { font-size: 1.35rem; }
.principle-card p { margin: 12px 0 0; }
.site-footer {
  width: min(1200px, calc(100vw - 40px));
  margin: 0 auto 44px;
  padding: 24px 8px 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(16, 24, 40, 0.08);
}
.footer-brand { font-size: 1rem; }
.footer-note { max-width: 520px; text-align: right; }
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(17, 29, 111, 0.96);
  color: white;
  box-shadow: 0 20px 50px rgba(12, 18, 42, 0.25);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
  z-index: 20;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (max-width: 1100px) {
  .hero, .breakdown-panel, .principles { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .selected-link, .footer-note { text-align: left; }
  .site-footer { align-items: start; flex-direction: column; }
}
@media (max-width: 860px) {
  .site-header, .section-head, .card-top, .card-bottom { flex-direction: column; align-items: start; }
  .site-header { border-radius: 30px; }
  .hero { gap: 24px; }
  .shortener-shell, .metric-row, .analytics-grid { grid-template-columns: 1fr; }
  .shorten-btn { width: 100%; }
  .selected-link { max-width: none; }
  .bar-row { grid-template-columns: 92px 1fr auto; }
}
@media (max-width: 560px) {
  .site-header, main, .site-footer { width: min(100vw - 24px, 100%); }
  .site-header { margin-top: 12px; padding: 16px; }
  main { margin-top: 28px; margin-bottom: 70px; }
  .hero h1 { font-size: 2.6rem; }
  .hero-panel, .workspace, .analytics, .principle-card { padding: 20px; border-radius: 24px; }
  .link-card { padding: 20px; border-radius: 24px; }
  .card-actions, .header-badges { width: 100%; }
  .action-btn { flex: 1 1 auto; text-align: center; }
  .toast { right: 12px; left: 12px; bottom: 12px; }
}
