/* delidec.com · shared site assets · v5.3
   ----------------------------------------------------------
   Loaded by every public page. Holds:
     - Cookie consent modal (GDPR-compliant, default-deny)
     - Site-wide share-intent buttons
     - Beehiiv newsletter signup form
     - Persistent "manage cookies" footer link
   Brand variables are inherited from each page's <style>;
   this file only adds new selectors.
*/

/* ============== COOKIE MODAL ============== */
.cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 11, 10, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
.cc-overlay.cc-show { display: flex; }
.cc-overlay.cc-show .cc-modal { animation: cc-in .25s cubic-bezier(0.16,1,0.3,1); }

@keyframes cc-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.cc-modal {
  width: 100%;
  max-width: 560px;
  background: #0F1A18;
  color: #E8F3EE;
  border: 1px solid #1F2D27;
  border-radius: 14px;
  box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(79, 224, 168, 0.08);
  padding: 28px 32px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.cc-eyebrow {
  font-size: 10px; letter-spacing: 0.20em; text-transform: uppercase;
  color: #4FE0A8; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.cc-eyebrow::before { content: '★'; }

.cc-modal h2 {
  font-size: 22px; font-weight: 700; line-height: 1.2;
  margin-bottom: 12px; letter-spacing: -0.01em;
}
.cc-modal h2 em { font-style: normal; color: #4FE0A8; }

.cc-modal p {
  font-size: 13px; line-height: 1.55;
  color: #A8B6AF; margin-bottom: 20px;
}
.cc-modal p a { color: #4FE0A8; text-decoration: underline; }

.cc-cats {
  display: flex; flex-direction: column; gap: 10px;
  margin: 20px 0;
}
.cc-cat {
  border: 1px solid #1F2D27;
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.01);
  transition: border-color .15s;
}
.cc-cat:hover { border-color: rgba(79, 224, 168, 0.32); }

.cc-cat-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.cc-cat-name {
  font-size: 13px; font-weight: 600; color: #E8F3EE;
  display: flex; align-items: center; gap: 8px;
}
.cc-cat-name small {
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #5C6B65; font-weight: 500;
}
.cc-cat-desc {
  font-size: 12px; line-height: 1.55; color: #A8B6AF;
  margin-top: 6px;
}

/* toggle switch */
.cc-toggle {
  position: relative; display: inline-block;
  width: 38px; height: 22px;
  flex-shrink: 0;
}
.cc-toggle input { opacity: 0; width: 0; height: 0; }
.cc-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #1A2A26;
  border: 1px solid #1F2D27;
  border-radius: 22px;
  transition: background .2s;
}
.cc-slider::before {
  content: ''; position: absolute;
  height: 14px; width: 14px;
  left: 3px; bottom: 3px;
  background: #5C6B65;
  border-radius: 50%;
  transition: transform .2s, background .2s;
}
.cc-toggle input:checked + .cc-slider {
  background: rgba(79, 224, 168, 0.18);
  border-color: #4FE0A8;
}
.cc-toggle input:checked + .cc-slider::before {
  transform: translateX(15px);
  background: #4FE0A8;
}
.cc-toggle input:disabled + .cc-slider {
  cursor: not-allowed; opacity: 0.6;
  background: rgba(79, 224, 168, 0.10);
}

.cc-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 8px;
}
.cc-btn {
  flex: 1; min-width: 120px;
  padding: 12px 16px;
  border: 1px solid #1F2D27;
  background: transparent;
  color: #E8F3EE;
  border-radius: 8px;
  font-family: inherit;
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .14s;
}
.cc-btn:hover { border-color: #4FE0A8; color: #4FE0A8; }
.cc-btn.cc-primary {
  background: #4FE0A8; color: #050B0A;
  border-color: #4FE0A8;
}
.cc-btn.cc-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -8px rgba(79, 224, 168, 0.5);
  color: #050B0A;
}

.cc-foot {
  margin-top: 18px;
  font-size: 10px; letter-spacing: 0.10em; text-transform: uppercase;
  color: #5C6B65;
  text-align: center;
}
.cc-foot a { color: #5C6B65; text-decoration: none; }
.cc-foot a:hover { color: #4FE0A8; }

/* persistent re-open link (sits in footer of each page) */
.cc-relink {
  cursor: pointer;
  color: #5C6B65;
  text-decoration: none;
  font-size: inherit;
  letter-spacing: inherit;
}
.cc-relink:hover { color: #4FE0A8; }

/* ============== SHARE BUTTONS ============== */
.share-row {
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
}
.share-row .lbl {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #5C6B65; margin-right: 4px;
}
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid #1F2D27;
  border-radius: 6px;
  background: rgba(15, 26, 24, 0.6);
  color: #A8B6AF;
  font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase;
  font-family: inherit;
  text-decoration: none;
  transition: all .14s;
  cursor: pointer;
}
.share-btn:hover {
  border-color: #4FE0A8;
  color: #4FE0A8;
  text-decoration: none;
}
.share-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.share-btn.copy.copied {
  background: rgba(79, 224, 168, 0.10);
  border-color: #4FE0A8;
  color: #4FE0A8;
}

/* ============== NEWSLETTER SIGNUP ============== */
.newsletter {
  border: 1px solid #1F2D27;
  border-radius: 12px;
  background: #0F1A18;
  padding: 28px 32px;
  font-family: 'JetBrains Mono', monospace;
}
.newsletter .nl-eyebrow {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: #4FE0A8; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.newsletter .nl-eyebrow::before { content: '★'; }
.newsletter h3 {
  font-size: 20px; font-weight: 700; line-height: 1.25;
  color: #E8F3EE; margin-bottom: 10px;
}
.newsletter h3 em { font-style: normal; color: #4FE0A8; }
.newsletter p {
  font-size: 13px; line-height: 1.55;
  color: #A8B6AF; margin-bottom: 18px;
}
.newsletter form {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.newsletter input[type="email"] {
  flex: 1 1 220px;
  padding: 12px 14px;
  background: #050B0A;
  border: 1px solid #1F2D27;
  border-radius: 8px;
  color: #E8F3EE;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .14s;
}
.newsletter input[type="email"]:focus { border-color: #4FE0A8; }
.newsletter input[type="email"]::placeholder { color: #5C6B65; }
.newsletter button[type="submit"] {
  padding: 12px 22px;
  background: #4FE0A8;
  color: #050B0A;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .14s;
}
.newsletter button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -8px rgba(79, 224, 168, 0.5);
}
.newsletter .nl-note {
  font-size: 10px; letter-spacing: 0.04em;
  color: #5C6B65; margin-top: 14px; margin-bottom: 0;
}
.newsletter.nl-success form { display: none; }
.newsletter.nl-success .nl-success-msg { display: block; }
.nl-success-msg {
  display: none;
  padding: 16px 18px;
  border: 1px solid #4FE0A8;
  border-radius: 8px;
  background: rgba(79, 224, 168, 0.08);
  color: #4FE0A8;
  font-size: 13px; line-height: 1.55;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 540px) {
  .cc-modal { padding: 22px 20px; border-radius: 10px; }
  .cc-modal h2 { font-size: 18px; }
  .cc-actions { flex-direction: column; }
  .cc-btn { width: 100%; }
  .newsletter { padding: 22px 20px; }
  .newsletter form { flex-direction: column; }
  .newsletter button[type="submit"] { width: 100%; }
}

/* ============== HARD-CAP HEADING SIZES ON NARROW VIEWPORTS ==============
   Prevents oversized monospace H1s from dominating mobile screens or
   word-wrapping awkwardly. Page-specific styles can still override.
*/
@media (max-width: 420px) {
  body h1 { font-size: 32px !important; line-height: 1.08 !important; }
  body h2 { font-size: 22px !important; line-height: 1.18 !important; }
  body .lede, body p { hyphens: none; overflow-wrap: break-word; word-break: normal; }
}
