/* ── Fonts ── */

@font-face {
  font-family: 'Qomra';
  src:
    url('./fonts/qomra_regular.woff2') format('woff2'),
    url('./fonts/qomra_regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Reset & Base ── */

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

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  --bg: #ebe5db;
  --sidebar-bg: #f6f4ef;
  --sidebar-border: #ddd7cb;
  --rule: #ddd7cb;
  --sidebar-rule: #d4cec2;

  font-family: 'Newsreader', Georgia, serif;
  background-color: var(--bg);
  color: #1a1a19;
  line-height: 1.75;
}

/* ── Layout ── */

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}

/* ── Typography ── */

h1, h2, h3 {
  font-family: 'Newsreader', Georgia, serif;
  text-transform: lowercase;
  font-weight: 700;
  line-height: 1.2;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: #3a7569;
  text-decoration: underline;
  text-decoration-color: rgba(58, 117, 105, 0.3);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.2s;
}

a:hover {
  text-decoration-color: #3a7569;
}

/* ── Header ── */

.header {
  margin-bottom: 3.5rem;
}

.contest-name {
  width: fit-content;
  margin-bottom: 0.6rem;
}

.contest-name-arabic {
  display: inline-block;
  font-family: 'Reem Kufi', sans-serif;
  font-weight: 400;
  font-size: 2.8rem;
  color: #8c8780;
  opacity: 0.55;
  line-height: 1;
  white-space: nowrap;
  transform-origin: left center;
  -webkit-text-stroke: 0.3px #8c8780;
  paint-order: stroke fill;
  will-change: transform;
}

.contest-name-english {
  font-size: 3.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-transform: lowercase;
}

.tagline {
  font-size: 1.05rem;
  color: #555;
  font-style: italic;
  margin-bottom: 0.75rem;
}

/* ── Why This Exists ── */

.why-exists {
  max-width: 700px;
  margin-bottom: 3.5rem;
}

.why-exists p {
  color: #3d3c3a;
}

/* ── Hero (two-column) ── */

.hero {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3.5rem;
  align-items: start;
  margin-bottom: 0.5rem;
}

.hero-prompt {
  margin-bottom: 0;
}

/* ── The Prompt ── */

.prompt-question {
  font-size: 1.3rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.5;
  border-left: 3px solid #3a7569;
  padding-left: 1.25rem;
  margin-bottom: 2rem;
  color: #1a1a19;
}

.prompt-guidance p {
  color: #3d3c3a;
}

.prompt-aside {
  margin-top: 1.5rem;
  color: #3d3c3a;
}

/* ── Section Labels ── */

.section-label {
  font-family: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a756e;
  margin-bottom: 1.25rem;
}

/* ── Sidebar ── */

.hero-sidebar {
  position: sticky;
  top: 2rem;
  background: var(--sidebar-bg);
  border: 1px solid var(--sidebar-border);
  border-radius: 8px;
  padding: 1.75rem;
}

.sidebar-block {
  margin-bottom: 1.25rem;
}

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--sidebar-rule);
  margin: 1.25rem 0;
}

/* ── Prizes (sidebar) ── */

.prize-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.75rem;
}

.prize-table tr {
  border-bottom: 1px solid var(--sidebar-rule);
}

.prize-table tr:last-child {
  border-bottom: none;
}

.prize-table td {
  padding: 0.6rem 0;
}

.prize-table td:first-child {
  font-family: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: #666;
}

.prize-table td:last-child {
  text-align: right;
  font-weight: 700;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.prize-note {
  color: #777;
  font-style: italic;
  font-size: 0.82rem;
  line-height: 1.5;
}

/* ── Key Details (sidebar) ── */

.key-details {
  display: grid;
  gap: 0.65rem;
}

.key-details dt {
  font-family: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8c8780;
  margin-bottom: 0.1rem;
}

.key-details dd {
  font-size: 0.92rem;
  color: #333;
  line-height: 1.4;
}

/* ── Preview Note ── */

.sidebar-preview-note {
  font-family: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  font-style: italic;
  color: #8c8780;
  text-align: center;
  line-height: 1.5;
  margin-top: 1rem;
}

/* ── Submit Button ── */

.submit-btn {
  display: block;
  width: 100%;
  text-align: center;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: #3a7569;
  padding: 0.7rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.2s;
  letter-spacing: 0.01em;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.submit-btn:hover {
  background: #2e5f55;
  color: #fff;
  text-decoration: none;
}

.sidebar-nominate {
  text-align: center;
  color: #777;
  font-style: italic;
  font-size: 0.82rem;
  line-height: 1.5;
}

.sidebar-nominate a {
  color: #3a7569;
}

/* ── Details (narrower column below hero) ── */

.details {
  max-width: 700px;
}

/* ── Guidelines ── */

.guidelines dl {
  display: grid;
  gap: 1.25rem;
}

.guidelines dt {
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.guidelines dd {
  color: #3d3c3a;
}

/* ── Judging Criteria ── */

.judging-criteria {
  list-style: none;
  margin-top: 0.75rem;
  margin-left: 0.1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--rule);
  display: grid;
  gap: 0.45rem;
}

.judging-criteria li {
  color: #3d3c3a;
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ── Not Looking For ── */

.not-looking-for p {
  color: #3d3c3a;
}

/* ── Who's Behind This ── */

.behind p {
  color: #3d3c3a;
}

/* ── Divider ── */

.divider {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

/* ── Footer ── */

.footer {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  text-align: center;
}

.footer-quote {
  font-style: italic;
  color: #666;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-meta {
  font-family: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  color: #8c8780;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

.footer-meta a {
  color: #8c8780;
  text-decoration-color: rgba(140, 135, 128, 0.35);
}

.footer-meta a:hover {
  color: #3a7569;
  text-decoration-color: #3a7569;
}

/* ── Thanks Page ── */

.thanks-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding-top: 0;
}

.thanks-page .header {
  margin-bottom: 4rem;
}

.header-link {
  color: inherit;
  text-decoration: none;
}

.header-link:hover {
  text-decoration: none;
  color: #3a7569;
}

.thanks-content {
  max-width: 520px;
}

.thanks-message {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.thanks-detail {
  color: #3d3c3a;
  margin-bottom: 1rem;
}

.thanks-back {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: #8c8780;
  text-decoration-color: rgba(140, 135, 128, 0.35);
}

.thanks-back:hover {
  color: #3a7569;
  text-decoration-color: #3a7569;
}

/* ── Responsive ── */

@media (max-width: 820px) {
  .page {
    padding: 3.5rem 1.25rem 3rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-sidebar {
    position: static;
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    padding: 1.5rem 1.25rem;
    background: var(--sidebar-bg);
  }

  .contest-name-english {
    font-size: 2.6rem;
  }

  .contest-name-arabic {
    font-size: 2rem;
  }

  .prompt-question {
    font-size: 1.15rem;
  }

  .prompt-guidance p {
    margin-bottom: 1.5rem;
  }

  .details {
    max-width: 100%;
  }

  .divider {
    margin: 2.5rem 0;
  }
}

@media (max-width: 400px) {
  .page {
    padding: 2.5rem 1rem 2rem;
  }

  .contest-name-english {
    font-size: 2rem;
  }

  .contest-name-arabic {
    font-size: 1.5rem;
  }

  .hero-sidebar {
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 1.5rem 1rem;
  }
}
