/* ============================================================
   builds.tourdeai.cc — Summer Builds '26
   Vintage California-summer palette pulled from the hero:
   coral/salmon heading, dusty-teal ocean ground, sandy-cream
   card faces, warm gold accents, coral-terracotta links.
   ============================================================ */

:root {
  --bg: #2d4a47;            /* deep dusty teal — page + gallery (matches hero fade end) */
  --footer-bg: #1e3330;     /* matches gallery gradient's bottom — seamless footer */
  --card: #f2e6c8;          /* sandy cream — card faces + form fields */
  --card-border: #d8c39a;   /* sandy edge on cards/fields */
  --card-heading: #1e3330;  /* dark teal ink — headings on cream */
  --card-body: #33524d;     /* muted teal ink — body text on cream */
  --card-line: rgba(30, 51, 48, 0.18); /* hairline on cream */
  --terracotta: #c9482a;    /* deep coral-terracotta — links on cream */
  --gold: #e0a82e;          /* warm sandy gold — buttons, active filter */
  --gold-2: #f0bd4a;        /* gold hover */
  --gold-text: #1e3330;     /* dark teal text on gold */
  --heading: #f5ecd8;       /* sandy cream — headings, nav, labels on teal */
  --coral: #f0805f;         /* coral/salmon — hero heading */
  --body-text: #e8d8b8;     /* sandy cream — general body text on teal */
  --muted: #a9c4bd;         /* muted teal-cream — secondary text on teal */
  --line: rgba(245, 236, 216, 0.18); /* hairline on teal */
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body-text);
  font-family: "Barlow", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ------------------------------- Nav -------------------------------------- */

.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: transparent;
  border: none;
}

.nav-logo {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  color: var(--heading);
  white-space: nowrap;
}

.nav-cta { white-space: nowrap; }

/* ------------------------------ Buttons ----------------------------------- */

.btn {
  display: inline-block;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1rem;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s;
}

.btn-mustard {
  background: var(--gold);
  color: var(--gold-text);
  box-shadow: 0 6px 18px rgba(212, 160, 23, 0.28);
}
.btn-mustard:hover { background: var(--gold-2); transform: translateY(-2px); }

/* ------------------------------- Hero ------------------------------------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background-image: url("assets/hero.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Very gradual fade to the dusty-teal gallery: the image is fully untouched
   for the top 60% (cyclists + coastline clear of any tint), then dissolves
   through the lower portion into #4a7a75 — the exact colour the gallery
   gradient opens with, so the seam is invisible. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 55%,
    rgba(74, 122, 117, 0.25) 72%,
    rgba(74, 122, 117, 0.6) 86%,
    rgba(74, 122, 117, 0.9) 95%,
    #4a7a75 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Navbar floats cleanly over the raw hero image — no background or tint.
   The heading is pushed well down so it doesn't crowd the nav/CTA. */
.hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  padding: 22vh 20px 24vh;
}

.hero-title {
  font-family: "Pacifico", cursive;
  font-weight: 400;
  color: var(--coral);
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 1.05;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 4px 28px rgba(0, 0, 0, 0.55);
}

/* ------------------------------ Gallery ----------------------------------- */

.gallery {
  padding: 0 24px 96px;
  /* Full-bleed gradient continuing the hero's turquoise, darkening on scroll
     into the cards — no hard edge, a continuous colour journey. */
  background: linear-gradient(
    to bottom,
    #4a7a75 0%,
    #3d6460 25%,
    #2d4a47 60%,
    #1e3330 100%
  );
}

.section-title {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 900;
  letter-spacing: 0.06em;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: var(--heading);
  margin: 0 0 24px;
  text-align: center;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.filter {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  color: var(--heading);
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.15s;
}
.filter:hover { border-color: var(--gold); }
.filter.active {
  background: var(--gold);
  color: var(--gold-text);
  border-color: var(--gold);
}

.gallery-status {
  text-align: center;
  color: var(--muted);
  min-height: 1.2em;
  margin: 0 0 24px;
}

.grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

/* ------------------------------- Cards ------------------------------------ */

.card {
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s;
}
.card:hover { transform: translateY(-4px); border-color: #a07f50; }

.card-shot {
  aspect-ratio: 16 / 10;
  background: #dcc9a0; /* sandy placeholder if the preview fails to load */
  position: relative;
}
.card-shot img { width: 100%; height: 100%; object-fit: cover; }
.card-shot.shot-failed::after {
  content: "preview unavailable";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: var(--card-body);
}

.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.card-title {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 1.4rem;
  line-height: 1.1;
  margin: 2px 0 0;
  color: var(--card-heading);
}

.card-desc { margin: 0; color: var(--card-body); font-size: 0.96rem; }

.card-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--card-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.builder { color: var(--card-body); font-size: 0.92rem; }
.view-link {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.92rem;
  color: var(--terracotta);
  white-space: nowrap;
}
.view-link:hover { text-decoration: underline; }

/* ------------------------------ Submit page ------------------------------- */

.submit-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 72px 24px 110px;
}

.submit-title {
  font-family: "Pacifico", cursive;
  font-weight: 400;
  color: var(--heading);
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  text-align: center;
  margin: 0 0 10px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.submit-copy {
  text-align: center;
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 40px;
}

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.field[hidden] { display: none; }

.field label {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--heading);
}

.field input,
.field textarea,
.field select {
  font-family: "Barlow", sans-serif;
  font-size: 1rem;
  color: var(--card-heading);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 12px 14px;
  transition: border-color 0.15s;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(42, 26, 8, 0.55); }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
}
.field textarea { resize: vertical; min-height: 120px; }

.submit-btn { width: 100%; font-size: 1.15rem; padding: 15px; margin-top: 8px; }

.form-feedback {
  text-align: center;
  font-size: 1.05rem;
  margin-top: 20px;
  padding: 16px;
  border-radius: 10px;
}
.form-feedback.success {
  color: var(--card-heading);
  background: rgba(242, 230, 200, 0.92);
  border: 1px solid var(--card-border);
}
.form-feedback.error {
  color: #ffe2d6;
  background: rgba(240, 128, 95, 0.2);
  border: 1px solid rgba(240, 128, 95, 0.5);
}

.back-link {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
}
.back-link:hover { color: var(--gold-2); }
.back-link[hidden] { display: none; }

/* ------------------------------- Footer ----------------------------------- */

.site-footer {
  background: var(--footer-bg);
  text-align: center;
  padding: 30px 20px;
  color: var(--muted);
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}

/* ----------------------------- Responsive --------------------------------- */

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav { gap: 10px; padding: 12px 16px; }
}

@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .hero { min-height: 90vh; }
}
