/* ====================================================
   FONT DEFINITIONS
   Load fonts before anything references them.
==================================================== */

@font-face {
  font-family: 'TiltNeon';
  src: url('/assets/fonts/Tilt_Neon/TiltNeon-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  unicode-range: U+0000-024F; /* Latin */
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn/Vazirmatn-RD-Regular.woff2')
    format('woff2');
  font-weight: 400;
  font-style: normal;
  unicode-range: U+0600-06FF; /* Persian / Arabic */
}

/* ====================================================
   ROOT VARIABLES
   Colors come from palette files.
==================================================== */

:root {
  --font-main: 'TiltNeon', 'Vazirmatn', sans-serif;

  /* Typography */
  --line-height: 1.6;

  /* Layout */
  --max-width: 1200px;
  --section-spacing: 3rem;

  /* Shape */
  --radius: 6px;
  --radius-lg: 10px;

  /* Depth system */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.16);
}

/* ====================================================
   RESET
==================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ====================================================
   BODY BASE
==================================================== */

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: var(--line-height);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ====================================================
   TYPOGRAPHY
==================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

h1 {
  letter-spacing: -0.02em;
}
h2 {
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  max-width: 65ch; /* improves readability */
}

/* ====================================================
   LINKS
==================================================== */

a {
  color: var(--accent-primary);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

/* ====================================================
   CONTAINER
==================================================== */

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

/* ====================================================
   INTERACTION FEEDBACK
   Makes the UI feel responsive and alive.
==================================================== */

button,
.card,
input,
a {
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.25s ease,
    transform 0.2s ease;
}

/* ====================================================
   BUTTONS
==================================================== */

button {
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--text-on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-heavy);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  box-shadow: var(--shadow-sm);
}

/* ====================================================
   FORMS
==================================================== */

input,
select,
textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  padding: 0.7rem 1rem;
  color: var(--text-primary);
  border-radius: var(--radius);
  font-size: 1rem;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

/* ====================================================
   CARDS
   Elevated surfaces with hover feedback.
==================================================== */

.card {
  background: var(--bg-tertiary);
  padding: 1.6rem;
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ====================================================
   ACCENT EMPHASIS
   Used sparingly for selected / active elements.
==================================================== */

.accent-glow {
  box-shadow: 0 0 0 3px var(--accent-bg);
}

/* ====================================================
   SECTIONS
==================================================== */

section {
  padding: var(--section-spacing) 0;
}

/* ====================================================
   UTILITIES
==================================================== */

.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}

/* ====================================================
   FOOTER
==================================================== */

.site-footer {
  background: var(--bg-secondary);
  padding: 2rem 1rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.site-footer p {
  color: var(--text-muted);
}

/* ====================================================
   RESPONSIVE DESIGN
==================================================== */

@media (max-width: 1024px) {
  :root {
    --section-spacing: 2.5rem;
  }
  .container {
    padding: 1.2rem;
  }
}

@media (max-width: 768px) {
  :root {
    --section-spacing: 2rem;
  }

  h1 {
    font-size: 1.6rem;
  }
  h2 {
    font-size: 1.4rem;
  }

  button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }
  body {
    font-size: 0.95rem;
  }
}
