/* ============================================================
   SHAMURAI — design tokens
   Calm / Minimal / Premium / Personal
   ============================================================ */
:root{
  --bg:#FAF8F3;
  --surface:#F1EDE4;
  --surface-2:#EAE4D8;
  --text:#2B2A27;
  --text-soft:#6B675E;
  --accent:#4A6B4D;
  --accent-soft:#DDE6DC;
  --gold:#C9A24B;
  --line:#E2DCCE;
  --radius:18px;
  --radius-sm:10px;
  --shadow:0 8px 30px -12px rgba(43,42,39,0.15);
  --serif:'Fraunces', 'Vazirmatn', serif;
  --sans:'Inter', 'Vazirmatn', sans-serif;
  --fa:'Vazirmatn', 'Inter', sans-serif;
  --ease:cubic-bezier(.22,.61,.36,1);
}
html[data-theme="dark"]{
  --bg:#14161A;
  --surface:#1D2024;
  --surface-2:#25292E;
  --text:#ECEAE2;
  --text-soft:#9B9890;
  --accent:#7FA87F;
  --accent-soft:#243128;
  --gold:#D8B968;
  --line:#2E3237;
  --shadow:0 8px 30px -12px rgba(0,0,0,0.5);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--fa);
  overflow-x:hidden;
  transition:background .4s var(--ease), color .4s var(--ease);
  -webkit-font-smoothing:antialiased;
}
html[dir="ltr"] body{ font-family:var(--sans); }
h1,h2,h3{ font-family:var(--serif); font-weight:600; margin:0; letter-spacing:-0.01em; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3{ font-family:var(--fa); font-weight:700; }
p{ line-height:1.85; color:var(--text-soft); }
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
button{ font-family:inherit; cursor:pointer; }

::selection{ background:var(--accent-soft); color:var(--accent); }

/* ambient trail line running through the page — the signature element */
.trail-bg{
  position:absolute; top:0; left:50%; transform:translateX(-50%);
  width:100%; height:100%; z-index:0; pointer-events:none; opacity:.5;
}
.trail-path{
  fill:none; stroke:var(--line); stroke-width:.4; vector-effect:non-scaling-stroke;
}

/* ---------- nav ---------- */
.nav{
  position:sticky; top:0; z-index:50;
  background:color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.nav-inner{
  max-width:1100px; margin:0 auto; padding:14px 20px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.brand{ display:flex; align-items:center; gap:8px; }
.brand-mark{
  display:inline-flex; align-items:center; justify-content:center;
  width:30px; height:30px; border-radius:50%; background:var(--accent);
  color:var(--bg); font-size:15px; line-height:1;
}
.brand-logo{ width:30px; height:30px; border-radius:50%; object-fit:cover; }
.brand-name{ font-family:var(--serif); font-weight:600; font-size:1.05rem; letter-spacing:.02em; }
.nav-links{ display:none; gap:26px; font-size:.92rem; color:var(--text-soft); }
.nav-links a:hover{ color:var(--accent); }
@media(min-width:760px){ .nav-links{ display:flex; } }

.nav-controls{ display:flex; align-items:center; gap:10px; }
.icon-btn{
  width:36px; height:36px; border-radius:50%; border:1px solid var(--line);
  background:var(--surface); display:flex; align-items:center; justify-content:center;
  color:var(--text); transition:transform .3s var(--ease), background .3s;
}
.icon-btn:hover{ transform:rotate(20deg); }
.icon-btn svg{ width:17px; height:17px; }
html[data-theme="dark"] .icon-sun{ display:none; }
html[data-theme="dark"] .icon-moon{ display:block !important; }
.lang-btn{
  border:1px solid var(--line); background:var(--surface); color:var(--text);
  padding:7px 13px; border-radius:20px; font-size:.82rem; font-weight:600; letter-spacing:.03em;
  transition:background .3s, color .3s;
}
.lang-btn:hover{ background:var(--accent); color:var(--bg); border-color:var(--accent); }

/* ---------- hero ---------- */
.hero{
  position:relative; min-height:88vh; display:flex; align-items:flex-end;
  overflow:hidden;
}
.hero-media{ position:absolute; inset:0; }
.hero-img{ width:100%; height:100%; object-fit:cover; }
.hero-scrim{
  position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(20,22,26,.05) 0%, rgba(20,22,26,.55) 78%, rgba(20,22,26,.78) 100%);
}
.hero-content{
  position:relative; z-index:2; color:#F5F3EC; padding:0 24px 64px;
  max-width:720px; margin:0 auto; width:100%;
  animation:rise 1s var(--ease) both;
}
@keyframes rise{ from{ opacity:0; transform:translateY(18px);} to{opacity:1; transform:none;} }
.eyebrow{
  font-size:.78rem; letter-spacing:.14em; text-transform:uppercase;
  color:var(--gold); margin:0 0 10px; font-weight:600;
}
.hero .eyebrow{ color:#E9DDB8; }
.hero-title{ font-size:clamp(2.6rem,9vw,4.2rem); margin:0 0 10px; }
.hero-tagline{ font-size:clamp(1.05rem,3vw,1.3rem); color:#E7E4D8; margin:0 0 26px; max-width:38ch; }
.hero-day{
  display:inline-flex; align-items:center; gap:10px; margin-bottom:26px;
  background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.25);
  padding:7px 14px 7px 8px; border-radius:30px; font-size:.85rem; backdrop-filter:blur(6px);
}
html[dir="rtl"] .hero-day{ padding:7px 8px 7px 14px; }
.day-ring{ width:26px; height:26px; transform:rotate(-90deg); }
.ring-track{ fill:none; stroke:rgba(255,255,255,.25); stroke-width:3; }
.ring-fill{ fill:none; stroke:var(--gold); stroke-width:3; stroke-linecap:round;
  stroke-dasharray:119; stroke-dashoffset:119; transition:stroke-dashoffset 1s var(--ease); }
.btn-primary{
  display:inline-block; background:var(--accent); color:#fff; padding:13px 28px;
  border-radius:30px; font-weight:600; font-size:.95rem; transition:transform .25s var(--ease), box-shadow .25s;
  box-shadow:0 10px 24px -8px rgba(74,107,77,.55);
}
.btn-primary:hover{ transform:translateY(-2px); }

/* ---------- sections ---------- */
.section{ position:relative; z-index:1; max-width:1100px; margin:0 auto; padding:88px 22px; }
.section.alt{ background:var(--surface); border-radius:32px; max-width:1140px; }
.section-head{ margin-bottom:40px; max-width:640px; }
.section-head h2{ font-size:clamp(1.7rem,4vw,2.3rem); margin-bottom:10px; }
.section-sub{ margin:0; }

.reveal{ opacity:0; transform:translateY(24px); transition:opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in{ opacity:1; transform:none; }

/* journey */
.journey-groups{ display:flex; flex-direction:column; gap:36px; }
.journey-group-label{
  font-size:.8rem; color:var(--text-soft); letter-spacing:.08em; text-transform:uppercase;
  margin-bottom:14px; font-weight:600;
}
.day-rail{ display:flex; gap:14px; overflow-x:auto; padding-bottom:10px; scroll-snap-type:x proximity; }
.day-rail::-webkit-scrollbar{ height:5px; }
.day-rail::-webkit-scrollbar-thumb{ background:var(--line); border-radius:10px; }
.day-card{
  scroll-snap-align:start; flex:0 0 auto; width:230px; background:var(--surface);
  border:1px solid var(--line); border-radius:var(--radius); padding:18px;
  transition:transform .3s var(--ease), box-shadow .3s var(--ease);
}
html .section.alt .day-card{ background:var(--bg); }
.day-card:hover{ transform:translateY(-4px); box-shadow:var(--shadow); }
.day-card .day-num{ font-family:var(--serif); font-size:1.5rem; color:var(--accent); margin-bottom:4px; }
.day-card .day-title{ font-weight:600; margin-bottom:8px; font-size:.95rem; }
.day-card .day-meta{ font-size:.78rem; color:var(--text-soft); }
.day-card .post-count{
  display:inline-block; margin-top:10px; font-size:.74rem; padding:3px 9px;
  border-radius:20px; background:var(--accent-soft); color:var(--accent); font-weight:600;
}

/* cards grid (activities/challenges/projects/popular) */
.cards-grid{ display:grid; grid-template-columns:1fr; gap:18px; }
@media(min-width:640px){ .cards-grid{ grid-template-columns:repeat(2,1fr); } }
@media(min-width:960px){ .cards-grid{ grid-template-columns:repeat(3,1fr); } }
.card{
  background:var(--bg); border:1px solid var(--line); border-radius:var(--radius);
  overflow:hidden; transition:transform .35s var(--ease), box-shadow .35s var(--ease);
  display:flex; flex-direction:column;
}
.section.alt .card{ background:var(--surface); }
.card:hover{ transform:translateY(-5px); box-shadow:var(--shadow); }
.card-media{ aspect-ratio:16/10; background:var(--surface-2); overflow:hidden; }
.card-media img{ width:100%; height:100%; object-fit:cover; }
.card-body{ padding:18px 20px 20px; flex:1; display:flex; flex-direction:column; gap:8px; }
.card-title{ font-weight:600; font-size:1.02rem; }
.card-desc{ font-size:.88rem; margin:0; }
.card-foot{ margin-top:auto; display:flex; align-items:center; justify-content:space-between; font-size:.78rem; color:var(--text-soft); }
.star{ color:var(--gold); }
.badge{ font-size:.72rem; padding:3px 10px; border-radius:20px; font-weight:600; }
.badge.active{ background:var(--accent-soft); color:var(--accent); }
.badge.completed{ background:#EFE3C4; color:#8A6B1F; }
.badge.paused{ background:var(--surface-2); color:var(--text-soft); }
.progress-track{ height:5px; background:var(--surface-2); border-radius:10px; overflow:hidden; margin-top:6px; }
.progress-fill{ height:100%; background:var(--accent); border-radius:10px; transition:width .6s var(--ease); }

.about-text{ font-size:1.05rem; max-width:620px; }

.footer{ text-align:center; padding:50px 20px 70px; color:var(--text-soft); font-size:.85rem; }
.footer .brand-mark.small{ margin:0 auto 10px; }

/* newsletter */
.newsletter{ text-align:center; }
.newsletter-form{ display:flex; gap:10px; max-width:380px; margin:20px auto 0; }
.newsletter-form input{ flex:1; padding:12px 16px; border-radius:30px; border:1px solid var(--line); background:var(--surface); color:var(--text); }
.newsletter-form button{ background:var(--accent); color:#fff; border:none; padding:12px 20px; border-radius:30px; font-weight:600; }

/* modal */
.modal-backdrop{
  position:fixed; inset:0; background:rgba(20,20,18,.55); backdrop-filter:blur(4px);
  z-index:100; display:none; align-items:flex-end; justify-content:center;
}
.modal-backdrop:not([hidden]){ display:flex; }
@media(min-width:760px){ .modal-backdrop{ align-items:center; } }
.modal{
  background:var(--bg); width:100%; max-width:640px; max-height:88vh; overflow-y:auto;
  border-radius:24px 24px 0 0; padding:30px 26px 40px; position:relative;
  animation:slideup .4s var(--ease) both;
}
@media(min-width:760px){ .modal{ border-radius:24px; } }
@keyframes slideup{ from{ transform:translateY(30px); opacity:0;} to{transform:none; opacity:1;} }
.modal-close{
  position:absolute; top:16px; inset-inline-end:16px; width:34px; height:34px; border-radius:50%;
  border:1px solid var(--line); background:var(--surface); color:var(--text);
}
.modal-post-title{ font-size:1.4rem; margin:6px 0 6px; padding-inline-end:40px; }
.modal-meta{ font-size:.8rem; color:var(--text-soft); margin-bottom:18px; display:flex; gap:14px; flex-wrap:wrap; }
.modal-body-text{ white-space:pre-wrap; color:var(--text); line-height:2; }
.modal-body-text mark{ background:var(--accent-soft); color:var(--accent); padding:0 4px; border-radius:4px; }
.modal-media{ display:grid; gap:10px; margin:16px 0; grid-template-columns:1fr; }
.modal-media img, .modal-media video{ width:100%; border-radius:14px; }
.modal-actions{ display:flex; gap:10px; margin:22px 0 8px; }
.like-btn{
  display:flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--surface);
  padding:8px 16px; border-radius:30px; font-size:.85rem; font-weight:600; color:var(--text);
  transition:background .25s;
}
.like-btn:hover{ background:var(--accent-soft); color:var(--accent); }

/* comments */
.comments{ margin-top:26px; border-top:1px solid var(--line); padding-top:22px; }
.comments h4{ font-family:var(--sans); font-size:.95rem; margin-bottom:14px; }
.comment{ padding:12px 0; border-bottom:1px solid var(--line); }
.comment.reply{ margin-inline-start:24px; opacity:.92; }
.comment-head{ display:flex; justify-content:space-between; font-size:.82rem; margin-bottom:4px; }
.comment-name{ font-weight:600; }
.comment-name.admin{ color:var(--accent); }
.comment-date{ color:var(--text-soft); }
.comment-content{ font-size:.9rem; color:var(--text); margin:0 0 8px; }
.comment-reacts{ display:flex; gap:14px; font-size:.78rem; color:var(--text-soft); }
.comment-reacts button{ background:none; border:none; color:inherit; display:flex; align-items:center; gap:4px; }
.comment-reacts button:hover{ color:var(--accent); }
.comment-form{ display:flex; flex-direction:column; gap:8px; margin-top:16px; }
.comment-form input, .comment-form textarea{
  width:100%; padding:11px 14px; border-radius:12px; border:1px solid var(--line);
  background:var(--surface); color:var(--text); font-family:inherit; font-size:.9rem;
}
.comment-form textarea{ min-height:70px; resize:vertical; }
.comment-form button{
  align-self:flex-start; background:var(--accent); color:#fff; border:none;
  padding:10px 20px; border-radius:24px; font-weight:600; font-size:.85rem;
}

.empty-note{ color:var(--text-soft); font-size:.9rem; padding:20px 0; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
}
