/* =================================================================
   Danial Rassaf — rassaf.ir
   Static site stylesheet
   ================================================================= */

/* Drop your Montserrat.woff2 file (variable font, weights 100-900)
   into assets/fonts/ with exactly this filename — no code changes needed. */
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/Montserrat.woff2") format("woff2-variations"),
       url("/assets/fonts/Montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color tokens, sampled from the original brand */
  --maroon: #6e0b0b;
  --maroon-dark: #500707;
  --maroon-light: #8f1c1c;
  --ink: #262626;
  --ink-soft: #55555a;
  --grey-dark: #4a4a4a;
  --grey-darker: #3b3b3b;
  --grey-mid: #7a7a7a;
  --grey-light: #eeeeee;
  --grey-lighter: #f6f6f6;
  --white: #ffffff;
  --line: #e2e2e2;

  --font: "Montserrat", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1160px;
  --radius: 10px;
  --radius-sm: 6px;

  --shadow: 0 12px 28px rgba(20, 10, 10, 0.14);
  --shadow-sm: 0 4px 14px rgba(20, 10, 10, 0.10);

  --speed: 200ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
img, picture, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

:focus-visible {
  outline: 2px solid var(--maroon);
  outline-offset: 2px;
}

main { flex: 1 0 auto; }

body.nav-open {
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; }

/* ---------- Header placeholder (filled by include.js before paint via CSS) ---------- */
#site-header, #site-footer { flex-shrink: 0; }

/* ---------- Site header / nav ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 16px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav__logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.nav__logo-text {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  display: inline-block;
  padding: 10px 16px;
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink);
  border-bottom: 2px solid transparent;
  transition: color var(--speed) ease, border-color var(--speed) ease;
}

.nav__link:hover { color: var(--maroon); }

.nav__link[aria-current="page"] {
  color: var(--maroon);
  border-bottom-color: var(--maroon);
  font-weight: 600;
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--grey-lighter);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  transition: background var(--speed) ease;
  position: relative;
  z-index: 210;
}

.nav__toggle:hover { background: var(--grey-light); }

.nav__toggle-bars,
.nav__toggle-bars::before,
.nav__toggle-bars::after {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 260ms cubic-bezier(0.65, 0, 0.35, 1),
              opacity 200ms ease,
              background 200ms ease;
}

.nav__toggle-bars { position: relative; }
.nav__toggle-bars::before,
.nav__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav__toggle-bars::before { top: -6px; }
.nav__toggle-bars::after { top: 6px; }

.nav.is-open .nav__toggle { background: var(--maroon); }
.nav.is-open .nav__toggle-bars,
.nav.is-open .nav__toggle-bars::before,
.nav.is-open .nav__toggle-bars::after { background: var(--white); }
.nav.is-open .nav__toggle-bars { background: transparent; }
.nav.is-open .nav__toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav.is-open .nav__toggle-bars::after { top: 0; transform: rotate(-45deg); }

.nav__backdrop {
  display: none;
}

@media (max-width: 760px) {
  .nav__toggle { display: inline-flex; }

  .nav__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(20, 10, 10, 0.42);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms ease;
    z-index: 190;
  }

  .nav.is-open .nav__backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .nav__list {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(80vw, 320px);
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 100px 28px 40px;
    box-shadow: -18px 0 40px rgba(20, 10, 10, 0.16);
    transform: translateX(100%);
    transition: transform 320ms cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 200;
    overflow-y: auto;
  }

  .nav.is-open .nav__list {
    transform: translateX(0);
  }

  .nav__link {
    padding: 15px 16px;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
  }

  .nav__link[aria-current="page"] {
    background: var(--grey-lighter);
    border-bottom-color: transparent;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--grey-darker);
  color: #c9c9c9;
  padding: 28px 0;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer a { color: #e7e7e7; }
.site-footer a:hover { color: var(--white); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background var(--speed) ease, color var(--speed) ease, border-color var(--speed) ease, transform var(--speed) ease;
}

.btn:active { transform: translateY(1px); }

.btn--maroon {
  background: var(--maroon);
  color: var(--white);
}
.btn--maroon:hover { background: var(--maroon-dark); }

.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--outline:hover { border-color: var(--maroon); color: var(--maroon); }

.btn--ghost-light {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}
.btn--ghost-light:hover { background: rgba(255,255,255,0.16); }

/* ---------- Page header banner (About / Music / Contact / single song) ---------- */
.page-banner {
  background: var(--grey-lighter);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
}

.page-banner h1 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink-soft);
}
