/* =========================================================
   history.css
   Parley Rum – Historical Significance

   This file styles ONLY the history page.
   base.css still controls global things like buttons and tiles.
   ========================================================= */


/* =========================================================
   Optional: “active page” nav styling
   NOTE: This only works if JavaScript adds .is-active to the correct link.
   ========================================================= */
.nav a.is-active{
  background: rgba(43,122,120,.14);
  color: var(--text);
  border: 1px solid rgba(43,122,120,.18);
}


/* =========================================================
   Masthead / hero
   ========================================================= */
.masthead{ padding-top: 34px; }

.mast-grid{
  padding: 22px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  align-items: stretch;
}

/* The small “kicker” label above the headline */
.kicker{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(201,150,46,.16);
  width: fit-content;
  margin-bottom: 12px;
}

.mast-copy h1{
  margin-top: 2px;
  margin-bottom: 10px;
}

/* Badges under the intro paragraph */
.mast-badges{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 10px;
}

.badge{
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.62);
  color: rgba(43,27,15,.80);
}

/* Button row */
.mast-cta{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* Slight tweak for ghost buttons (overrides base.css button background) */
.btn-ghost{
  background: rgba(255,255,255,.55);
}
.btn-ghost:hover{
  background: rgba(255,255,255,.75);
}

/* Right-side images in the masthead */
.mast-media{
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}

.mast-img{
  border-radius: var(--r-lg);
  border: 1px solid var(--stroke);
  box-shadow: var(--sh-soft);
  background-size: cover;
  background-position: center;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}

/* Adds sheen and subtle dark gradient over images */
.mast-img::after{
  content:"";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 320px at 40% 10%, rgba(255,255,255,.18), transparent 55%),
    linear-gradient(180deg, rgba(0,0,0,.00), rgba(0,0,0,.10));
  pointer-events: none;
}

.mast-img-2{ background-position: 55% 50%; }


/* =========================================================
   Rope divider (decorative)
   ========================================================= */
.rope-divider{
  margin-top: 18px;
}

.rope-line{
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(120,80,30,.20);
  background:
    linear-gradient(90deg, rgba(0,0,0,.00), rgba(0,0,0,.06), rgba(0,0,0,.00)),
    repeating-linear-gradient(
      90deg,
      rgba(201,150,46,.10) 0 10px,
      rgba(208,122,45,.14) 10px 20px
    );
  position: relative;
  box-shadow: 0 10px 22px rgba(0,0,0,.10);
}

.rope-line::before{
  content:"";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(43,27,15,.10) 0 6px,
      rgba(255,255,255,.12) 6px 12px
    );
  mix-blend-mode: multiply;
  opacity: .55;
}


/* =========================================================
   3-up grid (used in the intro tile section)
   ========================================================= */
.grid-3{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}


/* =========================================================
   Timeline section
   ========================================================= */
.timeline-wrap{ padding-top: 20px; }

.timeline-head{
  padding: 18px 18px 14px;
  margin-bottom: 16px;
}

.timeline{
  display: grid;
  gap: 14px;
}

/* Each timeline row/card */
.t-item{
  padding: 16px;
  display: grid;
  grid-template-columns: 54px 1.25fr .9fr;
  gap: 14px;
  align-items: center;
  position: relative;
}

/* Vertical rope line behind the roman numerals */
.t-item::before{
  content:"";
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(201,150,46,.0) 0 10px,
      rgba(201,150,46,.45) 10px 18px,
      rgba(208,122,45,.55) 18px 26px
    );
  opacity: .55;
}

/* Roman numeral icon */
.t-icon{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  display: grid;
  place-items: center;
  font-weight: 1000;
  letter-spacing: .04em;
  background: rgba(208,122,45,.16);
  box-shadow: 0 10px 18px rgba(0,0,0,.10);
  position: relative;
  z-index: 1;
}

.t-content h3{ margin-bottom: 6px; }

.t-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag{
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.55);
  color: rgba(43,27,15,.80);
}

.t-media{
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--stroke);
  box-shadow: var(--sh-soft);
  background: rgba(255,255,255,.35);
}

.t-media img{
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  filter: saturate(1.02) contrast(1.03);
}

/* Alternate layout (image and text swap sides) */
.t-item.is-reverse{
  grid-template-columns: 54px .9fr 1.25fr;
}
.t-item.is-reverse .t-media{ order: 2; }
.t-item.is-reverse .t-content{ order: 3; }


/* =========================================================
   Image band section
   ========================================================= */
.image-band{ padding-top: 10px; }

.band{
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}

.band-media{
  height: 500px;
  background-size: cover;
  background-position:  top 50%;
  position: relative;
}

.band-media::after{
  content:"";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 340px at 20% 10%, rgba(255,255,255,.20), transparent 58%),
    linear-gradient(180deg, rgba(0,0,0,.00), rgba(0,0,0,.12));
  pointer-events: none;
}

.band-copy{
  padding: 18px;
}

/* The 3 callout boxes under “Why this history matters” */
.callouts{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.callout{
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: rgba(255,255,255,.58);
  padding: 12px;
}

.callout-title{
  font-weight: 1000;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 6px;
  color: rgba(43,27,15,.90);
}


/* =========================================================
   Closing section
   ========================================================= */
.closing-card{
  padding: 22px;
}


/* =========================================================
   Responsive rules
   ========================================================= */
@media (max-width: 980px){
  .mast-grid{ grid-template-columns: 1fr; }
  .mast-media{ grid-template-rows: 220px 220px; }

  .grid-3{ grid-template-columns: 1fr; }
  .callouts{ grid-template-columns: 1fr; }

  .t-item,
  .t-item.is-reverse{
    grid-template-columns: 54px 1fr;
  }

  .t-item::before{ left: 30px; }

  .t-media{
    grid-column: 1 / -1;
  }
  .t-item.is-reverse .t-media{ order: 4; }
}

/* Accessibility: if someone prefers reduced motion, disable smooth scrolling */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior: auto; }
}
