/* ============================================================
   PeptideLore — Shared Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:wght@300;400;500&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- Variables ---------- */
:root {
  --bg:        #080d18;
  --surface:   #0f1624;
  --surface2:  #161f30;
  --border:    #1e2d45;
  --accent:    #00c9a7;
  --accent2:   #f0a500;
  --accent3:   #7c6af5;
  --text:      #dde4f0;
  --muted:     #6b7f9e;
  --danger:    #e05c5c;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius:    8px;
  --radius-lg: 16px;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --transition: 0.22s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: #fff;
  font-weight: 600;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.1rem; }
p  { color: var(--text); }

.mono { font-family: var(--font-mono); font-size: 0.88em; }
.accent  { color: var(--accent); }
.accent2 { color: var(--accent2); }
.muted   { color: var(--muted); }

/* ---------- Layout ---------- */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,13,24,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  gap: 24px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: #fff;
  background: var(--surface2);
}
.nav-right { display: flex; align-items: center; gap: 12px; }

/* Language toggle */
.lang-toggle {
  display: flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 500;
}
.lang-toggle button {
  background: none;
  border: none;
  color: var(--muted);
  padding: 5px 11px;
  cursor: pointer;
  transition: all var(--transition);
}
.lang-toggle button.active {
  background: var(--accent);
  color: #000;
}

/* Hamburger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
  }
  .nav-burger { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 0 10px;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(0,201,167,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(124,106,245,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,201,167,0.1);
  border: 1px solid rgba(0,201,167,0.25);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-title { margin-bottom: 20px; }
.hero-title em {
  font-style: italic;
  color: var(--accent);
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: var(--font-body);
}
.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover { background: #00e8c0; color: #000; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
}
.card:hover {
  border-color: rgba(0,201,167,0.35);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.card-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 8px;
}
.card-desc { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 500;
  margin-top: 16px;
}
.card-link:hover { color: #fff; }

/* Card grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Section Titles ---------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 12px;
}
.section-title { margin-bottom: 12px; }
/* .section-desc { color: var(--muted); max-width: 560px; margin-bottom: 40px; } */

.section-desc { color: var(--muted); margin-bottom: 20px; }

/* ---------- Tag / Badge ---------- */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.tag-accent { background: rgba(0,201,167,0.1); color: var(--accent); border-color: rgba(0,201,167,0.25); }
.tag-amber  { background: rgba(240,165,0,0.1); color: var(--accent2); border-color: rgba(240,165,0,0.25); }
.tag-purple { background: rgba(124,106,245,0.1); color: var(--accent3); border-color: rgba(124,106,245,0.25); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th {
  background: var(--surface2);
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}
td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}
tr:hover td { background: var(--surface2); }
.seq { font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent); letter-spacing: 0.04em; }

/* ---------- Inputs ---------- */
.input-wrap { position: relative; }
input[type=text], input[type=email], textarea, select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 16px;
  outline: none;
  transition: border-color var(--transition);
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input.mono-input { font-family: var(--font-mono); letter-spacing: 0.06em; }
label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
select option { background: var(--surface); }

/* ---------- Result Box ---------- */
.result-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 20px;
}
.result-box .result-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 4px; }
.result-box .result-value { font-family: var(--font-mono); font-size: 1.5rem; color: var(--accent); font-weight: 500; }

/* ---------- Peptide of the Day ---------- */
.potd {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(0,201,167,0.06) 100%);
  border: 1px solid rgba(0,201,167,0.2);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
@media (max-width: 640px) { .potd { grid-template-columns: 1fr; } }
.potd-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 8px; }
.potd-name { font-family: var(--font-display); font-size: 2rem; color: #fff; margin-bottom: 4px; }
.potd-seq { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); margin-bottom: 16px; }
.potd-fact { color: var(--muted); font-size: 0.95rem; line-height: 1.7;}
.potd-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.potd-stat { text-align: center; }
.potd-stat-val { font-family: var(--font-display); font-size: 1.6rem; color: var(--accent2); display: block; }
.potd-stat-key { font-size: 0.75rem; color: var(--muted); }

/* ---------- Stats strip ---------- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 48px 0;
}
@media (max-width: 640px) { .stats-strip { grid-template-columns: repeat(2, 1fr); } }
.stats-strip-item {
  background: var(--surface);
  padding: 28px 24px;
  text-align: center;
}
.stats-strip-val {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}
.stats-strip-key { font-size: 0.82rem; color: var(--muted); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { font-family: var(--font-display); font-size: 1.4rem; color: #fff; margin-bottom: 10px; }
.footer-brand span { color: var(--accent); }
.footer-desc { color: var(--muted); font-size: 0.88rem; line-height: 1.7; }
.footer-col-title { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 14px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--muted); font-size: 0.9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--accent); }

/* ---------- Divider ---------- */
.divider { height: 1px; background: var(--border); margin: 48px 0; }

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 18px 24px;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-text {
  flex: 1;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  min-width: 260px;
}
.cookie-text a { color: var(--accent); }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.cookie-btn-accept {
  background: var(--accent); color: #000; border: none;
  padding: 9px 22px; border-radius: var(--radius);
  font-size: 0.88rem; font-weight: 600; cursor: pointer;
  font-family: var(--font-body); transition: background var(--transition);
  white-space: nowrap;
}
.cookie-btn-accept:hover { background: #00e8c0; }
.cookie-btn-decline {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); padding: 9px 18px;
  border-radius: var(--radius); font-size: 0.88rem;
  cursor: pointer; font-family: var(--font-body);
  transition: all var(--transition); white-space: nowrap;
}
.cookie-btn-decline:hover { color: var(--text); border-color: var(--text); }

/* ---------- Scroll animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible { opacity: 1; transform: none; }

/* ---------- Floating dots bg decoration ---------- */
.dots-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.dot {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.08;
  animation: float 8s infinite ease-in-out;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-18px); }
}

/* ---------- Disclaimer ---------- */
.disclaimer {
  background: rgba(240,165,0,0.06);
  border: 1px solid rgba(240,165,0,0.2);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 32px;
}
.disclaimer-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* ---------- Search bar ---------- */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
}
.search-bar input { flex: 1; }
.search-bar select { width: auto; min-width: 160px; }

/* ---------- Highlight ---------- */
mark { background: rgba(0,201,167,0.18); color: var(--accent); border-radius: 2px; padding: 0 2px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 28px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { opacity: 0.4; }

/* ---------- Tool panel ---------- */
.tool-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.tool-panel h3 { margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 16px; }
