/* ==========================================================================
   DOJ – Diary of Journeys · Travel & Customized Coordination page
   Page-only sections. Shared components (hero, section head, dark section,
   CTA arch) live in style.css; breakpoints mirror responsive.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.tc-hero .hero__copy { grid-column: 1 / span 9; }
.tc-hero .hero__aside { grid-column: 10 / -1; }
.tc-hero .hero__title { font-size: clamp(2.6rem, 1.3rem + 4.1vw, 5.25rem); }
.tc-hero .hero__media img { object-position: 50% 62%; }

/* --------------------------------------------------------------------------
   Overview
   -------------------------------------------------------------------------- */
.tc-intro__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  align-items: center;
}
.tc-intro__media { grid-column: 1 / span 6; }
.tc-intro__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.tc-intro__content { grid-column: 8 / -1; }
.tc-intro__statement {
  font-family: var(--ff-display);
  font-size: var(--fs-statement);
  font-weight: 500;
  line-height: 1.28;
  color: var(--c-espresso);
}
.tc-intro__statement em { font-style: italic; color: var(--c-gold); }
.tc-intro__note {
  margin-top: 1.75rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--c-champagne);
}

/* --------------------------------------------------------------------------
   Services – boarding-pass tickets with a perforated stub
   -------------------------------------------------------------------------- */
.tc-services { background: var(--c-paper); }
.tickets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2vw, 1.75rem);
}
/* drop-shadow (not box-shadow) so the shadow follows the notched outline */
.ticket { filter: drop-shadow(0 18px 22px rgba(48, 37, 28, 0.1)); }
.ticket__card {
  --stub: 5.25rem;
  --notch: 0.6rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--stub);
  height: 100%;
  background: var(--c-white);
  /* notches cut where the perforation meets the top and bottom edges */
  -webkit-mask:
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, transparent 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, transparent 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}
.ticket__main { padding: 2rem 1.75rem 2.25rem; }
.ticket__title {
  font-size: clamp(1.375rem, 1.2rem + 0.45vw, 1.625rem);
  line-height: 1.2;
}
.ticket__text {
  margin-top: 0.875rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}
.ticket__stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0 1.75rem;
  border-left: 1px dashed rgba(167, 125, 62, 0.5);
  background: var(--c-ivory);
}
.ticket__icon {
  display: grid;
  place-items: center;
  width: 2.875rem;
  height: 2.875rem;
  border: 1px solid var(--c-champagne);
  border-radius: 50%;
  color: var(--c-gold-deep);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.ticket__icon .icon { width: 1.3rem; height: 1.3rem; stroke-width: 1.3; }
.ticket:hover .ticket__icon { background: var(--c-champagne); color: var(--c-espresso); }
.ticket__num {
  font-family: var(--ff-display);
  font-size: 1.125rem;
  font-style: italic;
  color: var(--c-gold-deep);
}

/* --------------------------------------------------------------------------
   How it works – a dashed flight route, the plane travels as steps appear
   -------------------------------------------------------------------------- */
.js [data-reveal="route"] { opacity: 1; transform: none; }
.route { position: relative; }
.route::before {
  content: "";
  position: absolute;
  top: 1.75rem;
  left: 1.75rem;
  right: 1.25rem;
  border-top: 1px dashed rgba(196, 154, 82, 0.6);
  transform-origin: left center;
}
.route__stops {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
}
.route__stop { position: relative; }
.route__node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border: 1px solid rgba(196, 154, 82, 0.6);
  border-radius: 50%;
  background: var(--c-espresso);
  font-family: var(--ff-display);
  font-size: 1.3125rem;
  font-style: italic;
  font-weight: 500;
  color: var(--c-champagne);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.route__stop:hover .route__node { background: var(--c-champagne); color: var(--c-espresso); }
/* medium weight and a little larger: the regular Cormorant hairlines are too
   faint for small ivory text on the espresso background */
.route__text {
  max-width: 15rem;
  margin-top: 1.5rem;
  font-family: var(--ff-display);
  font-size: clamp(1.3125rem, 1.15rem + 0.45vw, 1.5rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.005em;
  color: var(--c-on-dark);
}
.route__plane {
  position: absolute;
  top: calc(1.75rem - 0.8rem);
  left: calc(100% - 1.6rem);
  width: 1.6rem;
  height: 1.6rem;
  color: var(--c-champagne);
}
.route__plane .icon {
  width: 100%;
  height: 100%;
  stroke-width: 1.3;
  transform: rotate(45deg); /* nose pointing along the route */
}

/* quick reveal: all five steps are readable within about a second */
.js .route::before {
  transform: scaleX(0);
  transition: transform 1.2s var(--ease-in-out) 0.1s;
}
.js .route.is-visible::before { transform: scaleX(1); }
.js .route__plane {
  opacity: 0;
  left: 1.75rem;
  transition: left 1.2s var(--ease-in-out) 0.1s, opacity 0.4s var(--ease) 0.1s;
}
.js .route.is-visible .route__plane { opacity: 1; left: calc(100% - 1.6rem); }
.js .route__stop {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  transition-delay: calc(var(--i) * 0.1s + 0.05s);
}
.js .route.is-visible .route__stop { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Who can use this service
   -------------------------------------------------------------------------- */
.tc-who__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  align-items: center;
}
.tc-who__content { grid-column: 1 / span 6; }
.tc-who__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2rem;
  margin-top: clamp(2.25rem, 4vw, 3rem);
}
.tc-who__list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--c-line);
  font-family: var(--ff-display);
  font-size: clamp(1.15rem, 1.05rem + 0.3vw, 1.3125rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--c-espresso);
}
.tc-who__list li:nth-last-child(-n + 2) { border-bottom: 1px solid var(--c-line); }
.tc-who__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--c-paper);
  color: var(--c-gold);
}
.tc-who__icon .icon { width: 1.25rem; height: 1.25rem; stroke-width: 1.3; }
.tc-who__media {
  grid-column: 8 / -1;
  margin-right: 1.5rem; /* room for the offset keyline */
}
.tc-who__media img {
  width: 100%;
  aspect-ratio: 700 / 540;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Legibility – medium weight for the small italic ticket numbers
   (regular Cormorant is too faint at this size)
   -------------------------------------------------------------------------- */
.ticket__num { font-weight: 500; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .tc-hero .hero__copy,
  .tc-hero .hero__aside { grid-column: 1 / -1; }

  .tc-intro__media,
  .tc-intro__content { grid-column: 1 / -1; }
  .tc-intro__media { margin: 0 1.5rem 3.5rem 0; }
  .tc-intro__content { max-width: 42rem; }

  .tickets { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .tc-who__content,
  .tc-who__media { grid-column: 1 / -1; }
  .tc-who__media { max-width: 36rem; margin-top: 3.5rem; }
}

@media (max-width: 860px) {
  /* vertical route */
  .route { padding-bottom: 3rem; }
  .route::before {
    top: 1.75rem;
    bottom: 1.6rem;
    left: 1.75rem;
    right: auto;
    border-top: 0;
    border-left: 1px dashed rgba(196, 154, 82, 0.6);
    transform-origin: center top;
  }
  .js .route::before { transform: scaleY(0); }
  .js .route.is-visible::before { transform: scaleY(1); }
  .route__stops {
    grid-template-columns: 1fr;
    row-gap: 1.75rem;
  }
  .route__stop {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    align-items: center;
    column-gap: 1.25rem;
  }
  .route__text { max-width: 28rem; margin-top: 0; }
  .route__plane,
  .js .route__plane,
  .js .route.is-visible .route__plane {
    top: auto;
    bottom: 0;
    left: calc(1.75rem - 0.8rem);
  }
  .route__plane .icon { transform: rotate(135deg); }
}

@media (max-width: 600px) {
  .tc-intro__media { margin-right: 0.875rem; }
  .tc-intro__note { padding-left: 1.125rem; }

  .tickets { grid-template-columns: 1fr; }
  .ticket__card { --stub: 4.5rem; }
  .ticket__main { padding: 1.75rem 1.375rem 2rem; }

  .route__stop { grid-template-columns: 3rem minmax(0, 1fr); column-gap: 1.125rem; }
  .route__node { width: 3rem; height: 3rem; font-size: 1.125rem; }
  .route::before { left: 1.5rem; top: 1.5rem; }
  .route__plane,
  .js .route__plane,
  .js .route.is-visible .route__plane { left: calc(1.5rem - 0.8rem); }

  .tc-who__list { grid-template-columns: 1fr; }
  .tc-who__list li:nth-last-child(2) { border-bottom: 0; }
  .tc-who__media { margin-right: 0.875rem; }
}
