/* ============================================
   SURF SHED — Rhode Island
   Clean, minimal, high-end surf rental site
   ============================================ */

@font-face {
  font-family: 'Haas Grot Disp R Light';
  src: url('../fonts/HaasGrotDispR-45Light.woff2') format('woff2'),
       url('../fonts/HaasGrotDispR-45Light.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'Haas Grot Disp R Roman';
  src: url('../fonts/HaasGrotDispR-55Roman.woff2') format('woff2'),
       url('../fonts/HaasGrotDispR-55Roman.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'Haas Grot Disp R Medium';
  src: url('../fonts/HaasGrotDispR-65Medium.woff2') format('woff2'),
       url('../fonts/HaasGrotDispR-65Medium.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'Haas Grot Disp R Bold';
  src: url('../fonts/HaasGrotDispR-75Bold.woff2') format('woff2');
  font-display: swap;
}

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

:root {
  --white: #ffffff;
  --cream: #f5f0e8;
  --light-gray: #e8e3db;
  --mid-gray: #888888;
  --dark-gray: #333333;
  --black: #000000;
  --teal: #387e8e;
  --orange: #d35d27;
  --haas-light: 'Haas Grot Disp R Light', Helvetica, Arial, sans-serif;
  --haas: 'Haas Grot Disp R Roman', Helvetica, Arial, sans-serif;
  --haas-medium: 'Haas Grot Disp R Medium', Helvetica, Arial, sans-serif;
  --haas-bold: 'Haas Grot Disp R Bold', Helvetica, Arial, sans-serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
}

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

body {
  font-family: var(--haas);
  background: var(--cream);
  color: var(--black);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ---- HEADER ---- */

.site-header {
  text-align: center;
  padding: 30px 20px 10px;
}

.logo {
  display: inline-block;
}

.logo img {
  height: 90px;
  width: auto;
}

/* ---- HOME PAGE ---- */

.home-page .site-header {
  position: relative;
  z-index: 2;
}

.home-page .main-nav {
  position: relative;
  z-index: 2;
  padding-bottom: 20px;
}

.home-page .site-footer {
  margin-top: 0;
}

.hero {
  position: relative;
  min-height: 68vh;
  background: url('../images/hero.jpg') center center / cover no-repeat;
  display: flex;
  align-items: flex-start;
  padding: 80px 40px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(245, 240, 232, 0.15) 0%,
    rgba(0, 0, 0, 0.08) 30%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 40px;
  text-align: center;
}

.hero-headline {
  font-family: var(--haas-medium);
  font-size: 2.4rem;
  font-weight: normal;
  color: var(--black);
  line-height: 1.15;
  margin-bottom: 28px;
}

.hero-text {
  font-family: var(--haas);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--black);
  margin-bottom: 36px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: 4px;
  background: var(--orange);
  color: var(--white);
  font-family: var(--haas);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.3s ease;
}

.hero-cta svg {
  flex-shrink: 0;
}

.hero-cta:hover {
  background: #b84d1f;
}

/* ---- MAIN NAV ---- */

.main-nav {
  text-align: center;
  padding: 0 40px 10px;
}

.main-nav ul {
  display: flex;
  justify-content: center;
  gap: 44px;
  list-style: none;
}

.main-nav a {
  font-family: var(--haas);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dark-gray);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: var(--teal);
}

.main-nav a.active {
  color: var(--dark-gray);
}

/* ---- CONTACT PAGE ---- */

.contact-page .site-footer {
  margin-top: 0;
}

.contact-hero {
  position: relative;
  min-height: 68vh;
  background: url('../images/hero.jpg') center center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
}

.contact-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(245, 240, 232, 0.15) 0%,
    rgba(0, 0, 0, 0.08) 30%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

.contact-form-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
}

.contact-heading {
  font-family: var(--haas-medium);
  font-size: 2.4rem;
  color: var(--black);
  margin-bottom: 32px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form input,
.contact-form textarea {
  font-family: var(--haas);
  font-size: 0.85rem;
  padding: 14px 16px;
  border-radius: 4px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--black);
  outline: none;
  transition: background 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--mid-gray);
}

.contact-form input:focus,
.contact-form textarea:focus {
  background: var(--white);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-submit {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  padding: 16px 28px;
  border-radius: 4px;
  background: var(--orange);
  color: var(--white);
  font-family: var(--haas);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-submit:hover {
  background: #b84d1f;
}

.contact-submit svg {
  flex-shrink: 0;
}

/* ---- FILTER BAR (secondary nav on surfboards page) ---- */

.filter-bar {
  border-top: 1px solid var(--light-gray);
  border-bottom: 1px solid var(--light-gray);
  padding: 0 40px;
  overflow-x: auto;
}

.filter-bar ul {
  display: flex;
  justify-content: center;
  gap: 40px;
  list-style: none;
  white-space: nowrap;
}

.filter-bar a {
  display: block;
  padding: 16px 0;
  font-family: var(--haas);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--mid-gray);
  text-decoration: none;
  position: relative;
  cursor: pointer;
  transition: color 0.3s ease;
}

.filter-bar a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.filter-bar a:hover,
.filter-bar a.active {
  color: var(--black);
}

.filter-bar a.active::after {
  transform: scaleX(1);
}

/* ---- BOARD GRID ---- */

.board-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 60px 40px;
}

.board-card {
  padding: 0 20px;
  opacity: 1;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
}

.board-card.hidden {
  display: none;
}

.board-image {
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--cream);
}

.board-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.board-card:hover .board-image img {
  transform: scale(1.03);
}

.board-info {
  padding: 20px 0 20px;
  min-height: 130px;
}

.board-name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.board-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  font-style: italic;
  color: var(--black);
}

.board-price {
  font-family: var(--haas-medium);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--teal);
  white-space: nowrap;
  flex-shrink: 0;
}

.board-desc {
  font-family: var(--haas);
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--mid-gray);
}

/* ---- BOARD HOVER RESERVE OVERLAY ---- */

.board-image {
  position: relative;
}

.board-overlay {
  position: absolute;
  inset: 0;
  background: rgba(211, 93, 39, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.board-card:hover .board-overlay {
  opacity: 1;
}

.board-card:hover .board-image img {
  transform: scale(1);
}

.board-reserve {
  display: inline-block;
  padding: 16px 40px;
  border-radius: 4px;
  background: var(--white);
  color: var(--orange);
  font-family: var(--haas-medium);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease;
}

.board-reserve:hover {
  background: var(--cream);
}

/* ---- BOARD GALLERY ---- */

.board-gallery img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.board-gallery img.gallery-active {
  opacity: 1;
}

.gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 3;
}

.gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease;
}

.gallery-dot.active {
  background: rgba(255, 255, 255, 0.95);
}

.board-overlay {
  z-index: 2;
}

/* ---- CHECKOUT PAGE ---- */

.checkout-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 40px 60px;
}

.checkout-board-summary {
  display: flex;
  gap: 28px;
  background: var(--white);
  padding: 28px;
  margin-bottom: 24px;
}

.checkout-board-image {
  width: 160px;
  height: 240px;
  flex-shrink: 0;
  overflow: hidden;
}

.checkout-board-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checkout-board-details {
  flex: 1;
}

.checkout-board-name {
  font-family: var(--haas-medium);
  font-size: 1.1rem;
  color: var(--black);
  margin-bottom: 4px;
}

.checkout-board-price {
  font-family: var(--haas);
  font-size: 0.85rem;
  color: var(--teal);
  display: block;
  margin-bottom: 12px;
}

.checkout-board-desc {
  font-family: var(--haas);
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--mid-gray);
}

.checkout-scheduler {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
  padding: 28px;
}

/* Calendar */
.calendar {
  padding-right: 28px;
  border-right: 1px solid var(--light-gray);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.cal-month-year {
  font-family: var(--haas-medium);
  font-size: 1rem;
  color: var(--black);
}

.cal-prev,
.cal-next {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--dark-gray);
  cursor: pointer;
  padding: 4px 10px;
  transition: color 0.2s ease;
}

.cal-prev:hover,
.cal-next:hover {
  color: var(--black);
}

.calendar-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 8px;
}

.calendar-days-header span {
  font-family: var(--haas);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mid-gray);
  padding: 6px 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 2px;
}

.cal-day {
  font-family: var(--haas);
  font-size: 0.82rem;
  padding: 10px 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--black);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: background 0.2s ease, color 0.2s ease;
}

.cal-day:hover:not(.past):not(.empty) {
  background: var(--light-gray);
}

.cal-day.past {
  color: var(--light-gray);
  cursor: default;
}

.cal-day.empty {
  cursor: default;
}

.cal-day.selected {
  background: var(--orange);
  color: var(--white);
}

/* Time picker */
.checkout-time {
  padding-left: 28px;
}

.selected-date-display {
  font-family: var(--haas-medium);
  font-size: 1rem;
  color: var(--black);
  margin-bottom: 8px;
}

.timezone-note {
  font-family: var(--haas);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mid-gray);
  margin-bottom: 20px;
}

.time-slots {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.time-slot {
  font-family: var(--haas);
  font-size: 0.85rem;
  padding: 16px 20px;
  border-radius: 4px;
  background: none;
  border: 1px solid var(--light-gray);
  color: var(--dark-gray);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.time-slot:hover {
  border-color: var(--mid-gray);
}

.time-slot.active {
  border-color: var(--teal);
  background: rgba(56, 126, 142, 0.06);
  color: var(--teal);
}

.reserve-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: 4px;
  background: var(--orange);
  color: var(--white);
  font-family: var(--haas);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

.reserve-btn:hover {
  background: #b84d1f;
}

.reserve-btn svg {
  flex-shrink: 0;
}

/* Checkout responsive */
@media (max-width: 700px) {
  .checkout-wrap {
    padding: 20px;
  }

  .checkout-board-summary {
    flex-direction: column;
  }

  .checkout-board-image {
    width: 100%;
    aspect-ratio: 2 / 3;
    height: auto;
  }

  .checkout-scheduler {
    grid-template-columns: 1fr;
  }

  .calendar {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 24px;
    margin-bottom: 24px;
  }

  .checkout-time {
    padding-left: 0;
  }
}

/* ---- RESERVATION FORM ---- */

.scheduler-error {
  font-family: var(--haas);
  font-size: 0.75rem;
  color: var(--orange);
  margin-top: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.scheduler-error.visible {
  opacity: 1;
}

.reservation-form {
  display: none;
  background: var(--white);
  padding: 36px 28px;
  margin-top: 2px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.reservation-form.visible {
  opacity: 1;
  transform: none;
}

.reservation-summary {
  display: flex;
  gap: 40px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--light-gray);
}

.res-summary-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.res-summary-label {
  font-family: var(--haas);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mid-gray);
}

.res-summary-value {
  font-family: var(--haas-medium);
  font-size: 0.9rem;
  color: var(--black);
}

.res-section-title {
  font-family: var(--haas);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--mid-gray);
  margin-bottom: 14px;
}

.res-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 36px;
}

.res-field input {
  width: 100%;
  font-family: var(--haas);
  font-size: 0.85rem;
  padding: 14px 16px;
  border-radius: 4px;
  border: 1px solid var(--light-gray);
  background: var(--cream);
  color: var(--black);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.res-field input::placeholder {
  color: var(--mid-gray);
}

.res-field input:focus {
  border-color: var(--teal);
  background: var(--white);
}

.contract-section {
  margin-bottom: 32px;
}

.contract-box {
  height: 220px;
  overflow-y: scroll;
  border: 1px solid var(--light-gray);
  padding: 20px 24px;
  font-family: var(--haas);
  font-size: 0.78rem;
  line-height: 1.85;
  color: var(--dark-gray);
  background: var(--cream);
  margin-bottom: 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--light-gray) transparent;
}

.terms-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-family: var(--haas);
  font-size: 0.85rem;
  color: var(--dark-gray);
  user-select: none;
}

.terms-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--teal);
  cursor: pointer;
}

.reserve-final-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: 4px;
  background: var(--orange);
  color: var(--white);
  font-family: var(--haas);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  margin-top: 28px;
  transition: background 0.3s ease, opacity 0.3s ease;
}

.reserve-final-btn:hover:not(:disabled) {
  background: #b84d1f;
}

.reserve-final-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

/* Confirmation screen */

.reservation-confirmed {
  text-align: center;
  padding: 48px 20px;
}

.confirmed-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.confirmed-title {
  font-family: var(--haas-medium);
  font-size: 1.4rem;
  color: var(--black);
  margin-bottom: 8px;
}

.confirmed-number {
  font-family: var(--haas);
  font-size: 0.8rem;
  color: var(--mid-gray);
  letter-spacing: 0.06em;
  margin-bottom: 36px;
}

.confirmed-details {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  gap: 10px 32px;
  text-align: left;
}

.confirmed-detail-label {
  font-family: var(--haas);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mid-gray);
  padding-top: 3px;
}

.confirmed-detail-value {
  font-family: var(--haas-medium);
  font-size: 0.9rem;
  color: var(--black);
}

.confirmed-note {
  margin-top: 32px;
  font-size: 0.78rem;
  color: var(--mid-gray);
  font-family: var(--haas);
}

@media (max-width: 700px) {
  .reservation-form {
    padding: 24px 20px;
  }

  .reservation-summary {
    flex-wrap: wrap;
    gap: 20px;
  }

  .res-fields {
    grid-template-columns: 1fr;
  }
}

/* ---- FOOTER ---- */

.site-footer {
  background: var(--black);
  color: var(--cream);
  padding: 60px 60px 40px;
  margin-top: 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto 40px;
}

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

.footer-col h4 {
  font-family: var(--haas);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}

.footer-col p {
  font-family: var(--haas);
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--cream);
}

.copyright {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--mid-gray);
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ---- RESPONSIVE ---- */

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

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding: 30px 20px 15px;
  }

  .logo img {
    height: 70px;
  }

  .hero {
    padding: 40px 24px;
    min-height: 55vh;
    align-items: flex-end;
  }

  .hero-content {
    padding-left: 0;
  }

  .hero-headline {
    font-size: 1.8rem;
  }

  .hero-text {
    font-size: 0.82rem;
  }

  .contact-hero {
    padding: 40px 24px;
    min-height: 55vh;
  }

  .contact-heading {
    font-size: 1.8rem;
  }

  .main-nav {
    padding: 0 20px 20px;
  }

  .main-nav ul {
    gap: 20px;
  }

  .filter-bar {
    padding: 0 20px;
  }

  .filter-bar ul {
    gap: 24px;
    justify-content: flex-start;
  }

  .board-grid {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }

  .board-card {
    padding: 0;
  }

  .board-info {
    padding: 16px 4px 20px;
  }

  .gallery-dot {
    width: 10px;
    height: 10px;
  }

  .site-footer {
    padding: 40px 20px 30px;
  }
}

/* Touch devices: Reserve button always visible as bottom bar */
@media (hover: none) {
  .board-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(211, 93, 39, 0.88) 0%, transparent 60%);
    align-items: flex-end;
    padding-bottom: 20px;
  }

  .board-reserve {
    background: transparent;
    color: var(--white);
    padding: 8px 0;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
  }

  .board-reserve:hover {
    background: transparent;
  }
}

.boards-loading {
  grid-column: 1 / -1;
  padding: 60px 0;
  text-align: center;
  color: #888;
  font-size: 13px;
  letter-spacing: .06em;
}
