/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background-image: url('bg.jpg');
  background-attachment: fixed;
  background-size: cover;
  background-position: 0% 100%;
  background-repeat: repeat;
  background-color: #f5f2ed;
}

body {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  color: rgb(0, 0, 0);
  -webkit-font-smoothing: antialiased;
}

a {
  color: #111;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* === Header === */
header {
  padding: 30px 0;
  background: transparent;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.logo {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  font-family: 'Source Serif 4', serif;
}

.logo:hover {
  text-decoration: none;
}

nav {
  display: flex;
  gap: 24px;
}

nav a {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.4px;
  color: rgb(0, 0, 0);
  text-decoration: none;
}

nav a.active {
  font-weight: 700;
  text-decoration: none;
}

nav a:hover {
  text-decoration: none;
}

/* === Main === */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === Hero === */
.hero {
  padding: 60px 0 48px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 16px;
  font-family: 'Source Serif 4', serif;
}

.subtitle {
  font-size: 18px;
  font-weight: 300;
  color: rgb(0, 0, 0);
  line-height: 1.5;
}

.updated {
  margin-top: 16px;
  font-size: 14px;
  color: #999;
}

/* === Filters === */
.filters {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding: 16px 0;
  margin-bottom: 8px;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  background: rgb(255, 255, 255);
  border: none;
  padding: 8px 14px;
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  letter-spacing: 0.3px;
  cursor: pointer;
  color: rgb(0, 0, 0);
  transition: all 0.15s ease;
  flex: 1;
  white-space: nowrap;
}

.search-wrap {
  position: relative;
  margin-bottom: 8px;
}

.search-bar {
  display: block;
  width: 100%;
  background: rgb(255, 255, 255);
  border: none;
  padding: 14px 20px;
  padding-right: 44px;
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  color: rgb(0, 0, 0);
  outline: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.search-clear {
  display: none;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 22px;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.search-clear.visible {
  display: block;
}

.search-clear:hover {
  color: #333;
}

.search-bar::placeholder {
  color: #aaa;
}

.search-bar:focus {
  background: rgb(255, 255, 255);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

.filter-btn.active {
  font-weight: 700;
  background: rgb(0, 0, 0);
  color: rgb(255, 255, 255);
}

/* === Call Cards === */
.calls-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: transparent;
  margin-bottom: 24px;
}

.call-card + .call-card {
  border-top: none;
}

.section-header {
  font-size: 32px;
  font-weight: 400;
  color: rgb(0, 0, 0);
  padding: 48px 0 12px;
  font-family: 'Source Serif 4', serif;
}

.section-header:first-child {
  padding-top: 48px;
}

.call-card {
  background: transparent;
  padding: 20px 0;
}

.call-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
  font-family: 'Source Serif 4', serif;
}

.call-title a {
  color: rgb(0, 0, 0);
  text-decoration: none;
}

.call-title a:hover {
  text-decoration: underline;
}

.call-deadline {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 400;
  padding: 5px 10px;
  border-radius: 3px;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1;
  letter-spacing: 0.3px;
}

.call-deadline.ending {
  background: #A650A7;
  color: white;
}

.call-deadline.urgent {
  background: #FF5257;
  color: white;
}

.call-deadline.soon {
  background: #FF5257;
  color: white;
}

.call-deadline.normal {
  background: #FFC600;
  color: rgb(0, 0, 0);
}

.call-deadline.rolling {
  background: #007AFF;
  color: white;
}

.call-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 3px;
  background: #e5e5e5;
  color: #444;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0.3px;
}

.pin-icon {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

.meta-tag.call-prize {
  font-weight: 700;
  color: rgb(255, 255, 255);
  background: rgb(0, 0, 0);
}

.call-description {
  font-size: 16px;
  font-weight: 300;
  color: rgb(0, 0, 0);
  line-height: 1.6;
}

/* === Empty State === */
.empty-state {
  padding: 48px 0;
  text-align: center;
  color: #999;
  font-size: 14px;
}

/* === Closed badge === */
.call-deadline.closed {
  background: #8C8B8C;
  color: white;
}

/* === Submit Section === */
.submit-section {
  padding: 0 0 48px;
}

.submit-hero {
  padding: 60px 0 32px;
  max-width: 640px;
}

.submit-hero h1 {
  font-size: 48px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 16px;
  font-family: 'Source Serif 4', serif;
}

.submit-section h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  font-family: 'Source Serif 4', serif;
}

.submit-intro {
  font-size: 14px;
  font-weight: 300;
  color: #666;
  margin-bottom: 32px;
}

.submit-form {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.submit-form input,
.submit-form select,
.submit-form textarea {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 300;
  padding: 10px 12px;
  border: 1px solid #ccc;
  background: #fff;
  color: #111;
  outline: none;
  transition: border-color 0.15s ease;
}

.submit-form input:focus,
.submit-form select:focus,
.submit-form textarea:focus {
  border-color: #111;
}

.submit-form input::placeholder,
.submit-form textarea::placeholder {
  color: #aaa;
}

.submit-form select {
  appearance: none;
  cursor: pointer;
}

.submit-form textarea {
  resize: vertical;
  min-height: 60px;
}

.submit-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 400;
  padding: 12px 28px;
  background: #111;
  color: #f5f2ed;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
  align-self: flex-start;
}

.submit-btn:hover {
  opacity: 0.8;
}

/* === Footer === */
.about-section {
  padding: 60px 0;
  text-align: center;
}

.about-section p {
  font-size: 14px;
  font-weight: 300;
  color: rgb(0, 0, 0);
}

.about-section .disclaimer {
  font-size: 12px;
  color: #999;
  margin-bottom: 16px;
}

.follow {
  margin-top: 8px;
}

/* === Responsive === */
@media (max-width: 640px) {
  main {
    padding: 0 16px;
  }

  /* Fix iOS fixed background */
  html {
    background-image: none;
  }

  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bg.jpg');
    background-size: cover;
    background-position: 0% 100%;
    z-index: -1;
  }

  /* Search bar */
  .search-bar {
    font-size: 14px;
    padding: 12px 16px;
  }

  /* Header */
  .header-inner {
    padding: 0 16px;
  }

  nav {
    gap: 16px;
  }

  .logo {
    font-size: 18px;
  }

  /* Hero */
  .hero {
    padding: 36px 0 24px;
  }

  .hero h1,
  .submit-hero h1 {
    font-size: 36px;
    line-height: 1.2;
    margin-bottom: 12px;
  }

  .subtitle,
  .submit-intro {
    font-size: 14px;
  }

  .submit-hero {
    padding: 36px 0 24px;
  }

  /* Filters - horizontal scroll on mobile, edge to edge */
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding: 12px 16px;
    margin-left: -16px;
    margin-right: -16px;
    margin-bottom: 4px;
    scrollbar-width: none;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex: 0 0 auto;
    font-size: 14px;
  }

  /* Cards */
  .call-card {
    padding: 18px 0;
  }

  .section-header {
    font-size: 26px;
    padding-top: 20px;
  }

  .call-title {
    font-size: 20px;
    line-height: 1.3;
  }

  .call-description {
    font-size: 14px;
  }

  /* Submit form */
  .submit-form {
    max-width: 100%;
  }

  .submit-form input,
  .submit-form select,
  .submit-form textarea {
    font-size: 14px;
    padding: 12px;
  }

  .submit-btn {
    width: 100%;
    text-align: center;
    padding: 14px 28px;
    font-size: 14px;
  }

  /* Footer */
  .about-section {
    padding: 32px 0;
  }

  .about-section p {
    font-size: 13px;
  }
}

/* Extra small screens */
@media (max-width: 380px) {
  .hero h1,
  .submit-hero h1 {
    font-size: 28px;
  }

  .call-title {
    font-size: 18px;
  }

  nav a {
    font-size: 13px;
  }
}
/* cache bust */
