/*
Theme Name: Nessundove
Theme URI: https://www.nessundove.com/
Author: AlgoFinance
Description: Tema urban-night per la community letteraria Nessundove.
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: nessundove
*/

:root {
  --nd-night: #24364c;
  --nd-night-deep: #162333;
  --nd-ink: #17191d;
  --nd-paper: #fff8e8;
  --nd-paper-2: #f5ead3;
  --nd-coral: #ff6655;
  --nd-lilac: #aa96e8;
  --nd-butter: #ffd768;
  --nd-mint: #bce3cf;
  --nd-white: #fffdf7;
  --nd-muted: #69717b;
  --nd-border: rgba(23, 25, 29, .16);
  --nd-shadow: 0 18px 50px rgba(10, 18, 28, .18);
  --nd-radius: 22px;
  --nd-max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--nd-ink);
  background: var(--nd-paper);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.nd-wrap { width: min(calc(100% - 40px), var(--nd-max)); margin-inline: auto; }
.nd-site-header {
  position: sticky; top: 0; z-index: 50;
  color: var(--nd-white); background: rgba(22, 35, 51, .94);
  backdrop-filter: blur(16px); border-bottom: 1px solid rgba(255,255,255,.1);
}
.nd-nav { min-height: 74px; display: flex; align-items: center; gap: 28px; }
.nd-logo {
  margin-right: auto; font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2.05rem); font-weight: 700; letter-spacing: -.04em;
}
.nd-logo span { color: var(--nd-coral); }
.nd-menu { display: flex; gap: 24px; align-items: center; }
.nd-menu ul { display: flex; list-style: none; gap: 24px; margin: 0; padding: 0; }
.nd-menu a { font-size: .92rem; font-weight: 700; }
.nd-menu a:hover, .nd-menu a:focus-visible { color: var(--nd-butter); }
.nd-nav-actions { display: flex; gap: 10px; align-items: center; }
.nd-button, .wp-element-button, button.nd-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 19px; border: 2px solid transparent; border-radius: 999px;
  background: var(--nd-coral); color: var(--nd-ink); font-weight: 800; cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.nd-button:hover, .nd-button:focus-visible { transform: translateY(-2px); box-shadow: 0 9px 24px rgba(255,102,85,.28); }
.nd-button--dark { background: var(--nd-ink); color: var(--nd-white); }
.nd-button--paper { background: var(--nd-paper); color: var(--nd-ink); border-color: var(--nd-ink); }
.nd-button--small { min-height: 38px; padding-inline: 15px; font-size: .85rem; }
.nd-hero {
  position: relative; overflow: hidden; color: var(--nd-white);
  background:
    radial-gradient(circle at 82% 18%, rgba(170,150,232,.28), transparent 25%),
    radial-gradient(circle at 70% 90%, rgba(255,102,85,.24), transparent 30%),
    var(--nd-night);
  padding: clamp(64px, 9vw, 118px) 0 72px;
}
.nd-hero::before {
  content: ""; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.8) .7px, transparent .7px);
  background-size: 12px 12px;
}
.nd-hero-grid { position: relative; display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(35px, 6vw, 88px); align-items: center; }
.nd-kicker { color: var(--nd-butter); font-size: .82rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 900; }
.nd-hero h1, .nd-section-title, .nd-card-title, .nd-prose h1 {
  font-family: Georgia, "Times New Roman", serif; letter-spacing: -.045em; line-height: .98;
}
.nd-hero h1 { max-width: 760px; margin: 18px 0 24px; font-size: clamp(3.2rem, 7vw, 6.6rem); }
.nd-hero-copy { max-width: 630px; color: rgba(255,255,255,.78); font-size: clamp(1.04rem, 1.7vw, 1.24rem); }
.nd-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.nd-collage { position: relative; min-height: 500px; }
.nd-collage-card {
  position: absolute; width: min(330px, 70%); padding: 24px; border: 2px solid var(--nd-ink);
  border-radius: 8px; background: var(--nd-paper); color: var(--nd-ink); box-shadow: 11px 13px 0 var(--nd-ink);
}
.nd-collage-card:nth-child(1) { top: 0; left: 5%; transform: rotate(-3deg); }
.nd-collage-card:nth-child(2) { top: 132px; right: 0; background: var(--nd-lilac); transform: rotate(2.5deg); }
.nd-collage-card:nth-child(3) { bottom: 6px; left: 16%; background: var(--nd-butter); transform: rotate(-1deg); }
.nd-collage-card .nd-label { display: inline-block; padding: 4px 9px; background: var(--nd-ink); color: white; font-size: .7rem; font-weight: 900; text-transform: uppercase; }
.nd-collage-card h3 { margin: 18px 0 8px; font: 700 1.45rem/1.05 Georgia, serif; }
.nd-collage-card p { margin: 0; font-size: .88rem; }
.nd-weekly {
  margin-top: 34px; padding: 17px 19px; border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px; background: rgba(255,255,255,.07);
}
.nd-weekly-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-weight: 800; }
.nd-progress { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.15); }
.nd-progress span { display: block; height: 100%; width: 66%; background: var(--nd-coral); }
.nd-section { padding: clamp(58px, 8vw, 100px) 0; }
.nd-section--white { background: var(--nd-white); }
.nd-section-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 34px; }
.nd-section-title { margin: 0; font-size: clamp(2.35rem, 5vw, 4.8rem); }
.nd-section-copy { max-width: 570px; color: var(--nd-muted); }
.nd-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.nd-card {
  display: flex; flex-direction: column; min-height: 330px; overflow: hidden;
  border: 1px solid var(--nd-border); border-radius: var(--nd-radius); background: var(--nd-white);
  transition: transform .2s ease, box-shadow .2s ease;
}
.nd-card:hover { transform: translateY(-5px); box-shadow: var(--nd-shadow); }
.nd-card-cover {
  min-height: 170px; padding: 22px; display: flex; align-items: end;
  background: linear-gradient(135deg, var(--nd-lilac), var(--nd-coral));
}
.nd-card:nth-child(3n+2) .nd-card-cover { background: linear-gradient(135deg, var(--nd-mint), var(--nd-night)); }
.nd-card:nth-child(3n+3) .nd-card-cover { background: linear-gradient(135deg, var(--nd-butter), var(--nd-coral)); }
.nd-card-cover span { padding: 5px 10px; border-radius: 99px; background: rgba(255,255,255,.86); font-weight: 800; font-size: .76rem; }
.nd-card-body { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.nd-card-title { margin: 0 0 8px; font-size: 1.75rem; }
.nd-meta { color: var(--nd-muted); font-size: .84rem; }
.nd-card-stats { display: flex; gap: 16px; margin-top: auto; padding-top: 22px; font-size: .82rem; font-weight: 700; }
.nd-empty { padding: 34px; border: 2px dashed var(--nd-border); border-radius: var(--nd-radius); text-align: center; color: var(--nd-muted); }
.nd-community-strip { overflow: hidden; padding: 16px 0; color: var(--nd-white); background: var(--nd-ink); }
.nd-ticker { display: flex; gap: 42px; white-space: nowrap; animation: ndTicker 26s linear infinite; }
.nd-ticker span::before { content: "✦"; margin-right: 12px; color: var(--nd-coral); }
@keyframes ndTicker { to { transform: translateX(-50%); } }
.nd-main { min-height: 65vh; padding: 58px 0 90px; }
.nd-prose { width: min(100% - 40px, 780px); margin-inline: auto; }
.nd-prose h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); }
.nd-prose p { font-family: Georgia, "Times New Roman", serif; font-size: 1.16rem; line-height: 1.85; }
.nd-story-header { color: var(--nd-white); background: var(--nd-night); padding: 72px 0; }
.nd-story-header h1 { max-width: 840px; margin: 12px 0; font: 700 clamp(3rem, 7vw, 6rem)/.95 Georgia, serif; letter-spacing: -.04em; }
.nd-chapter-list { display: grid; gap: 12px; margin-top: 32px; }
.nd-chapter-row { display: flex; justify-content: space-between; gap: 20px; padding: 18px 20px; border: 1px solid var(--nd-border); border-radius: 14px; background: white; }
.nd-form { display: grid; gap: 18px; padding: 28px; border: 1px solid var(--nd-border); border-radius: var(--nd-radius); background: var(--nd-white); }
.nd-form label { display: grid; gap: 7px; font-weight: 800; }
.nd-form input, .nd-form textarea, .nd-form select {
  width: 100%; padding: 13px 15px; border: 1px solid var(--nd-border); border-radius: 12px; background: white;
}
.nd-form textarea { min-height: 180px; resize: vertical; }
.nd-notice { margin-bottom: 20px; padding: 14px 17px; border-left: 5px solid var(--nd-coral); background: #fff0ed; }
.nd-dashboard-grid { display: grid; grid-template-columns: 270px 1fr; gap: 30px; }
.nd-panel { padding: 25px; border: 1px solid var(--nd-border); border-radius: var(--nd-radius); background: white; }
.nd-avatar { width: 80px; height: 80px; overflow: hidden; border-radius: 50%; }
.nd-site-footer { padding: 60px 0 28px; color: rgba(255,255,255,.78); background: var(--nd-night-deep); }
.nd-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.nd-site-footer h2 { color: white; font: 700 2rem/1 Georgia, serif; }
.nd-site-footer ul { list-style: none; padding: 0; }
.nd-legal { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; }

@media (max-width: 900px) {
  .nd-menu { display: none; }
  .nd-hero-grid, .nd-dashboard-grid { grid-template-columns: 1fr; }
  .nd-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .nd-collage { min-height: 460px; margin-top: 20px; }
  .nd-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .nd-wrap { width: min(calc(100% - 26px), var(--nd-max)); }
  .nd-nav-actions .nd-button--paper { display: none; }
  .nd-hero { padding-top: 54px; }
  .nd-hero h1 { font-size: clamp(3rem, 16vw, 4.7rem); }
  .nd-collage { min-height: 420px; }
  .nd-collage-card { width: 78%; }
  .nd-grid, .nd-footer-grid { grid-template-columns: 1fr; }
  .nd-section-head { display: block; }
  .nd-section-copy { margin-top: 15px; }
  .nd-chapter-row { align-items: start; flex-direction: column; }
}

