/* Homepage and About page. Colours come from the Bootstrap theme in app.css */

:root {
  --home-navy: #2C3E50;
  --home-teal: #18BC9C;
  --home-teal-dark: #128f77;
  --home-mist: #f4f6f6;
  --home-muted: #6b7780;
  --home-display: "Comfortaa", "Nunito Sans", sans-serif;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.home-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--home-teal-dark);
}


.site-banners-flush .alert:last-child {
  margin-bottom: 0;
}


/* ==== Hero ==== */

/* the whole photo is shown, with its edges faded into a band that matches the wall colour in the photo */
.home-hero {
  overflow: hidden;
  color: var(--home-navy);
}

/* each band is sampled from the wall at the left and right edges of its photo */
.home-hero-tfl {
  background: linear-gradient(90deg, #eef0f4 0%, #e6e8ec 55%, #dcdee2 100%);
}

.home-hero-us {
  background: linear-gradient(90deg, #eeeeeb 0%, #d6d6d3 55%, #d2d2cf 100%);
}

/* caps the photo's height on very wide screens */
.home-hero .container-fluid {
  max-width: 1600px;
}

.home-hero .row {
  align-items: center;
}

.home-hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 88%, transparent 100%);
}

.home-hero-text {
  padding-top: 32px;
  padding-bottom: 32px;
}

.home-hero h1 {
  font-family: var(--home-display);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 10px 0 16px;
  color: var(--home-navy);
}

.home-hero p {
  font-size: 1.2rem;
  margin-bottom: 26px;
  color: #4b5a66;
}

.home-hero-buttons .btn {
  margin: 0 8px 8px 0;
}

@media (max-width: 1199.98px) {
  .home-hero h1 {
    font-size: 2.5rem;
  }
}

/* stacked: photo full width on top, text underneath */
@media (max-width: 991.98px) {
  .home-hero-photo {
    padding-left: 0;
    padding-right: 0;
  }

  .home-hero-photo img {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .home-hero-text {
    padding-top: 24px;
    padding-bottom: 40px;
  }

  .home-hero h1 {
    font-size: 2.2rem;
  }

  .home-hero p {
    font-size: 1.05rem;
  }
}


/* ==== Sections ==== */

.home-section {
  padding: 64px 0;
}

.home-section-tight {
  padding: 40px 0 24px;
}

.home-section-mist {
  background: var(--home-mist);
}

.home-section-navy {
  background: var(--home-navy);
  color: #fff;
}

#video {
  scroll-margin-top: 50px; /* clear the fixed navbar */
}

.home-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
}

.home-section-head-center {
  justify-content: center;
}

.home-section-head h2 {
  font-family: var(--home-display);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.01em;
  margin: 0;
}

.home-section-head a {
  font-weight: 700;
  color: var(--home-teal-dark);
}


/* ==== Product and category cards ==== */

.home-card {
  display: block;
  color: inherit;
}

.home-card:hover,
.home-card:focus {
  color: inherit;
  text-decoration: none;
}

/* the dashed outline sits outside the photo, so the card needs room around it */
.home-card-img {
  position: relative;
  margin: 8px;
}

.home-card-img-inner {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: #e9eeee;
  aspect-ratio: 4 / 3;
}

.home-card-img-tall {
  aspect-ratio: 4 / 5;
}

.home-card-img-inner img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.home-card:hover .home-card-img-inner img {
  transform: scale(1.04);
}

/* light grey outline around the photo, swapped for the moving dashed line on hover */
.home-card-img::before {
  content: "";
  position: absolute;
  top: -8px;
  right: -8px;
  bottom: -8px;
  left: -8px;
  border: 1px solid #e3e7e9;
  pointer-events: none;
  transition: opacity 0.25s;
}

.home-card:hover .home-card-img::before,
.home-card:focus .home-card-img::before {
  opacity: 0;
}

/* dashed line that travels around the outside of the photo on hover */
.home-card-img::after {
  content: "";
  position: absolute;
  top: -8px;
  right: -8px;
  bottom: -8px;
  left: -8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
  background:
    linear-gradient(90deg, var(--home-teal) 50%, transparent 0) repeat-x top left / 14px 2px,
    linear-gradient(90deg, var(--home-teal) 50%, transparent 0) repeat-x bottom left / 14px 2px,
    linear-gradient(0deg, var(--home-teal) 50%, transparent 0) repeat-y top left / 2px 14px,
    linear-gradient(0deg, var(--home-teal) 50%, transparent 0) repeat-y top right / 2px 14px;
  animation: home-march 0.7s linear infinite paused;
}

.home-card:hover .home-card-img::after,
.home-card:focus .home-card-img::after {
  opacity: 1;
  animation-play-state: running;
}

@keyframes home-march {
  to { background-position: 14px 0, -14px 100%, 0 -14px, 100% 14px; }
}

.home-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--home-navy);
}

.home-badge-sale {
  background: #E74C3C;
}

.home-card-name {
  margin: 18px 8px 0;
  font-weight: 700;
  line-height: 1.3;
}

.home-category-name {
  font-family: var(--home-display);
  font-size: 1.2rem;
}

.home-card-category {
  margin: 2px 8px 0;
  font-size: 0.85rem;
  color: var(--home-muted);
}

.home-card-price {
  margin: 4px 8px 0;
  font-weight: 700;
}

.home-card-price del {
  margin-right: 6px;
  font-weight: 400;
  color: var(--home-muted);
}

.home-card-link {
  margin: 6px 8px 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--home-teal-dark);
}


/* ==== Products page ==== */

.home-page-head {
  padding-top: 16px;
  margin-bottom: 24px;
}

.home-page-head h1 {
  font-weight: 500;
  font-size: 2.6rem;
  letter-spacing: -0.02em;
  margin: 6px 0 0;
}

/* category tabs on the left, country dropdown on the right, on one ruled line */
.home-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid #e3e7e9;
  margin-bottom: 16px;
}

.home-tabs {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.home-tabs::-webkit-scrollbar {
  display: none;
}

.home-tabs a {
  flex: none;
  margin-right: 28px;
  padding: 10px 0 12px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
  color: var(--home-muted);
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.home-tabs a:hover {
  color: var(--home-navy);
  text-decoration: none;
}

.home-tabs a.active {
  color: var(--home-navy);
  border-bottom-color: var(--home-teal);
}

/* countries sit at the right hand end of the line */
.home-tabs-countries a {
  margin-right: 0;
  margin-left: 28px;
}

/* stacked: countries get their own line under the categories */
@media (max-width: 991.98px) {
  .home-tabs {
    width: 100%;
  }

  .home-tabs-countries {
    border-top: 1px solid #e3e7e9;
  }

  .home-tabs-countries a {
    margin-left: 0;
    margin-right: 28px;
  }
}

.home-result-count {
  margin: 0 0 20px;
  padding: 10px 16px;
  border-radius: 4px;
  background: var(--home-mist);
  font-size: 0.9rem;
  color: var(--home-muted);
}

@media (max-width: 767.98px) {
  .home-page-head h1 {
    font-size: 2rem;
  }
}


/* ==== Breadcrumbs ==== */

.home-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--home-navy);
}

.home-breadcrumbs li + li::before {
  content: "\203A";
  padding: 0 10px;
  color: var(--home-muted);
}

.home-breadcrumbs a {
  color: var(--home-muted);
}

.home-breadcrumbs a:hover {
  color: var(--home-teal-dark);
}

.home-page-head .home-breadcrumbs {
  margin-bottom: 4px;
}


/* ==== You may also like (product and basket pages) ==== */

.home-also-like {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid #e3e7e9;
}

/* the product, basket and products pages use the site's standard light text, so the cards drop the bold to match */
.home-also-like-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.home-also-like-head h4 {
  margin: 0;
}

/* room for the outline around the photos below the filter tabs */
.home-shop {
  padding-top: 12px;
}

.home-also-like .home-card-name,
.home-shop .home-card-name {
  font-weight: 500;
}

.home-also-like .home-card-price,
.home-shop .home-card-price {
  font-weight: inherit;
}


/* ==== Video ==== */

.home-video {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
}

.home-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}


/* ==== Testimonials ==== */

.home-quote {
  margin: 0;
}

.home-quote blockquote {
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.55;
}

.home-quote blockquote::before {
  content: "\201C";
  display: block;
  height: 32px;
  font-family: Georgia, serif;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--home-teal);
}

.home-quote figcaption {
  font-size: 0.9rem;
  opacity: 0.75;
}


/* ==== Why traintrackr ==== */

.home-trust > div {
  display: flex;
  align-items: flex-start;
}

.home-trust i,
.home-trust svg {
  flex: none;
  width: 24px;
  margin: 3px 12px 0 0;
  font-size: 1.2rem;
  color: var(--home-teal-dark);
}

.home-trust b,
.home-trust span {
  display: block;
}

.home-trust span {
  font-size: 0.9rem;
  color: var(--home-muted);
}


/* ==== Forms and contact boxes ==== */

.home-form {
  padding: 28px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #e3e7e9;
}

.home-form h3 {
  font-family: var(--home-display);
  font-weight: 700;
  font-size: 1.4rem;
}

.home-form p {
  color: var(--home-muted);
}


/* ==== About page ==== */

.home-about-intro {
  padding-top: 24px;
}

.home-about-title {
  font-family: var(--home-display);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 10px 0 16px;
}

.home-about-intro p {
  color: var(--home-muted);
  font-size: 1.05rem;
}

.home-about-photo {
  width: 100%;
  border-radius: 2px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

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

.home-person-photo {
  position: relative;
  width: 100%;
  max-width: 200px;
  margin: 12px auto 16px;
  aspect-ratio: 1;
}

.home-person-photo img,
.home-person-photo span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #e9eeee;
  color: #b5c0c0;
  font-size: 3rem;
}

/* rotating dashed circle around the outside of the photo */
.home-person-photo::after {
  content: "";
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  border: 2px dashed var(--home-teal);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s;
  animation: home-spin 14s linear infinite paused;
}

.home-person:hover .home-person-photo::after {
  opacity: 1;
  animation-play-state: running;
}

@keyframes home-spin {
  to { transform: rotate(360deg); }
}

.home-person-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.home-person-role {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--home-teal-dark);
}

.home-person p {
  margin: 6px auto 0;
  max-width: 28ch;
  color: var(--home-muted);
}

.home-email {
  display: inline-flex;
  align-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--home-navy);
  word-break: break-all;
}

.home-email i {
  margin-right: 10px;
  color: var(--home-teal-dark);
}

.home-socials a {
  display: inline-flex;
  align-items: center;
  margin: 0 8px 8px 0;
  padding: 9px 14px;
  border: 1px solid #e3e7e9;
  border-radius: 4px;
  font-weight: 700;
  color: var(--home-navy);
  transition: border-color 0.2s, color 0.2s;
}

.home-socials a:hover {
  border-color: var(--home-teal);
  color: var(--home-teal-dark);
  text-decoration: none;
}

.home-socials i {
  margin-right: 8px;
  font-size: 1.1rem;
}

@media (max-width: 767.98px) {
  .home-section {
    padding: 44px 0;
  }

  .home-section-head h2 {
    font-size: 1.6rem;
  }

  .home-about-title {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-card-img::after,
  .home-person-photo::after {
    animation: none;
  }

  .home-card-img-inner img {
    transition: none;
  }
}
