/* Clean Slate Templates: video showcase (homepage) and the study template pages.
   Loaded after styles.css. Each template page sets its own colours on <body> with
   --t-dark, --t-accent, --t-text, --t-soft, --t-btn and --t-btn-ink. */

/* ---------- Video player (shared) ---------- */

.vplayer {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #111;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
  isolation: isolate;
}
.vplayer video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}
.vplayer .v-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  transform-origin: left;
  transform: scaleX(0);
  pointer-events: none;
}
.v-sound {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}
.v-sound:hover { background: rgba(17, 17, 17, 0.8); }
.v-sound svg { width: 18px; height: 18px; flex: none; }
.v-sound .on { display: none; }
.v-sound[aria-pressed="true"] .on { display: block; }
.v-sound[aria-pressed="true"] .off { display: none; }
.v-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4.5rem;
  height: 4.5rem;
  margin: -2.25rem 0 0 -2.25rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.v-play svg { width: 1.6rem; height: 1.6rem; margin-left: 0.2rem; }
.v-play:hover { transform: scale(1.06); }
.vplayer.playing .v-play { opacity: 0; pointer-events: none; transform: scale(0.8); }
.vplayer :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- Homepage: "See them in action" ---------- */

.showcase {
  --sc-bg: #1C1B1F;
  position: relative;
  padding: 4.5rem 0 4.75rem;
  background: var(--sc-bg);
  color: #f3f4ef;
  transition: background-color 0.8s ease;
  overflow: hidden;
}
/* a faint ruled-paper texture, so the band still belongs to the page */
.showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 1.95rem, rgba(255, 255, 255, 0.045) 1.95rem, rgba(255, 255, 255, 0.045) 2rem);
  pointer-events: none;
}
.showcase .wrap { position: relative; }
.showcase-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
.showcase-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.showcase-head p { margin: 0; color: rgba(243, 244, 239, 0.7); }
.showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem);
  gap: 1.75rem;
  align-items: start;
}
.sc-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sc-tab {
  position: relative;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.2rem 0.85rem;
  align-items: center;
  width: 100%;
  padding: 0.85rem 0.95rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.sc-tab:hover { background: rgba(255, 255, 255, 0.08); }
.sc-tab img { grid-row: span 2; width: 3rem; height: 3rem; }
.sc-tab b { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; line-height: 1.2; }
.sc-tab span { font-size: 0.85rem; line-height: 1.35; color: rgba(243, 244, 239, 0.65); }
.sc-tab[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--tab-accent, #fff);
}
.sc-tab .tab-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--tab-accent, #fff);
  transform-origin: left;
  transform: scaleX(0);
}
.sc-tab[aria-selected="false"] .tab-bar { transform: scaleX(0) !important; }
.sc-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: 1.25rem;
}
.sc-foot p { margin: 0; color: rgba(243, 244, 239, 0.75); }
.sc-foot p strong { color: #fff; font-weight: 700; }
.button-light {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border-radius: 6px;
  background: #f3f4ef;
  color: #1e2226;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.button-light:hover { color: #1e2226; transform: translateX(3px); }

@media (max-width: 900px) {
  .showcase-grid { grid-template-columns: 1fr; }
  .sc-tabs {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }
  .sc-tabs li { flex: 0 0 min(15rem, 72%); scroll-snap-align: start; }
  .sc-tab { height: 100%; }
}
@media (max-width: 640px) {
  .showcase { padding: 3.25rem 0 3.5rem; }
  .showcase-head { display: block; }
  .showcase-head p { margin-top: 0.4rem; }
  .v-sound { right: 0.6rem; bottom: 0.6rem; padding: 0.35rem 0.7rem 0.35rem 0.55rem; font-size: 0.8rem; }
}

/* the "watch them" link under the hero button */
.hero-watch {
  display: inline-block;
  margin: var(--line) 0 0 1.25rem;
  color: var(--pencil);
  font-weight: 700;
  text-decoration: none;
}
.hero-watch:hover { color: var(--graphite); text-decoration: underline; }
.motion .hero .hero-watch { opacity: 0; transform: translateY(10px); transition: opacity 0.7s ease 0.75s, transform 0.7s var(--ease-out) 0.75s; }
.motion .hero.go .hero-watch { opacity: 1; transform: none; }
@media (max-width: 460px) { .hero-watch { display: block; margin-left: 0; margin-top: 1rem; } }

/* ---------- Template pages ---------- */

.tp-hero {
  position: relative;
  padding: 0 0 4rem;
  background: var(--t-dark);
  color: var(--t-text);
  overflow: hidden;
}
.tp-band {
  height: clamp(7rem, 16vw, 12rem);
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.25) 45%, var(--t-dark) 96%), var(--t-cover);
  background-size: cover;
  background-position: center 30%;
}
.tp-hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: 2.5rem 3.5rem;
  align-items: center;
  margin-top: clamp(-3.5rem, -5vw, -1.5rem);
  position: relative;
}
.tp-crumb {
  margin: 0 0 1.25rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}
.tp-crumb a { color: rgba(255, 255, 255, 0.75); }
.tp-crumb a:hover { color: #fff; }
.tp-icon { width: 5.5rem; height: 5.5rem; margin-bottom: 1.25rem; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35)); }
.tp-hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.tp-tag {
  margin: 0.9rem 0 0;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--t-tag);
}
.tp-lede {
  margin: 1rem 0 0;
  max-width: 32rem;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.78);
}
.tp-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.75rem;
}
.tp-price {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
  font-variant-numeric: lining-nums;
}
.tp-price small { display: block; margin-top: 0.3rem; font-family: var(--sans); font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); }
.button-t {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.35rem;
  border-radius: 8px;
  background: var(--t-btn);
  color: var(--t-btn-ink);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.button-t:hover { color: var(--t-btn-ink); transform: translateY(-2px); filter: brightness(1.06); }
.button-t svg { width: 1rem; height: 1rem; }
.tp-soon {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tp-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}
.tp-facts li::before { content: "✓"; margin-right: 0.4rem; color: var(--t-tag); font-weight: 700; }

/* features */
.tp-features { padding: 5rem 0 2rem; }
.tp-section-head { max-width: 40rem; margin: 0 0 3rem; }
.tp-section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.tp-section-head p { margin: 0.6rem 0 0; color: var(--pencil); }
.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 2rem 4rem;
  align-items: center;
  margin-bottom: 5.5rem;
}
.feature.rev { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.feature.rev .f-copy { order: 2; }
.f-icon { width: 4rem; height: 4rem; }
.f-label {
  display: block;
  margin-top: 1.1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t-accent);
}
.f-copy h3 {
  margin: 0.45rem 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.f-copy p { margin: 0.85rem 0 0; color: var(--pencil); max-width: 30rem; }
.f-visual {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  padding-right: clamp(4rem, 12vw, 9rem);
  border-radius: 18px;
  background: var(--t-soft);
}
.f-visual.no-phone { padding-right: clamp(1.25rem, 3vw, 2.25rem); }
.f-shot {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 50px -28px rgba(30, 34, 38, 0.55), 0 0 0 1px rgba(30, 34, 38, 0.06);
}
.f-shot img { width: 100%; }
.f-shot.tall { max-height: 26rem; }
.f-spot {
  position: absolute;
  border-radius: 6px;
  box-shadow: 0 0 0 3px var(--t-accent), 0 0 0 999px rgba(21, 34, 29, 0.16);
}
.f-phone {
  position: absolute;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: -1.5rem;
  width: clamp(7rem, 17vw, 11.5rem);
  max-height: 85%;
  overflow: hidden;
  border: 6px solid var(--t-dark);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 40px -18px rgba(30, 34, 38, 0.6);
}
.f-phone img { width: 100%; }

/* scroll-in for features */
.motion .feature .f-shot { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.9s var(--ease-out); }
.motion .feature .f-phone { opacity: 0; transform: translateY(60px) rotate(4deg); transition: opacity 0.7s ease 0.15s, transform 0.9s var(--ease-out) 0.15s; }
.motion .feature.in .f-shot, .motion .feature.in .f-phone { opacity: 1; transform: none; }

/* good to know */
.tp-know {
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
}
.tp-know ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tp-know li { padding-left: 1.6rem; position: relative; color: var(--graphite); }
.tp-know li::before { content: "✓"; position: absolute; left: 0; color: var(--t-accent); font-weight: 700; }
.tp-know li span { display: block; color: var(--pencil); font-size: 0.95rem; }

/* closing call to action */
.tp-cta {
  padding: 3.5rem 0;
  background: var(--t-dark);
  color: var(--t-text);
}
.tp-cta .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}
.tp-cta h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 3.4vw, 2.25rem); line-height: 1.15; }
.tp-cta p { margin: 0.4rem 0 0; color: rgba(255, 255, 255, 0.7); }

/* more for revision */
.tp-more { padding: 4rem 0 4.5rem; }
.tp-more .grid { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }

@media (max-width: 900px) {
  .tp-hero .wrap { grid-template-columns: 1fr; }
  .feature, .feature.rev { grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 4rem; }
  .feature.rev .f-copy { order: 0; }
  .tp-know ul { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .f-visual { padding-right: 5.5rem; }
  .f-phone { width: 6.5rem; border-width: 4px; border-radius: 16px; }
}

/* the study shelf holds four templates, so let it sit four across on wide screens */
@media (min-width: 1000px) {
  .shelf-study .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.25rem 1.5rem; }
}
