/*
 * Top (landing) page styles for Hiroshi Tanita Photography.
 * Page-specific layer only — chrome (header/nav/mobile/footer) lives in
 * css/site-chrome.css. Prefix: t-  (shared tokens from css/tokens.css).
 * Faithful port of "Top Prototype.dc.html".
 */

/* ------------------------------------------------------------------ *
 * keyframes (from the prototype)
 * ------------------------------------------------------------------ */
@keyframes kenburnsA { from { transform: scale(1); }        to { transform: scale(1.07) translateX(-1%); } }
@keyframes kenburnsB { from { transform: scale(1); }        to { transform: scale(1.07) translateX(1%); } }
@keyframes heroIn    { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dotFill   { from { transform: scaleX(0); }       to { transform: scaleX(1); } }

/* ------------------------------------------------------------------ *
 * HERO carousel
 * ------------------------------------------------------------------ */
.t-hero {
  position: relative;
  height: clamp(460px, 74vh, 720px);
  overflow: hidden;
  background: #000; /* dip-to-black transition の黒地 */
}

/* slides layer */
.t-hero-slides { position: absolute; inset: 0; }

.t-hero-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  z-index: 0;
  /* dip-to-black: 各スライドは黒地(#000)へ/からフェード。JS が
     「フェードアウト → 黒を挟む → フェードイン」を .8s ずつ順に駆動する。 */
  transition: opacity .8s ease;
}
.t-hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

/* image fills slightly beyond the frame so Ken Burns never reveals an edge */
.t-hero-img {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  display: block;
}
/* Ken Burns は is-active ではなく .is-kb で制御する（JS が付与）。こうすると
   切替時に出て行くスライドから is-active を外してもズームが解除されず、原寸へ
   スナップで戻らない。入ってくるスライドだけ JS が .is-kb を貼り直して原寸から
   ズームし直す。forwards で終端(1.07)を保持。 */
.t-hero-img.is-kb { animation: 7.5s ease-out forwards var(--kb, kenburnsA); }

/* gradient scrim for legibility */
.t-hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(rgba(0, 0, 0, .14), transparent 28%, transparent 62%, rgba(0, 0, 0, .36));
}

/* centered brand block */
.t-hero-center {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 20px);
  text-align: center;
  pointer-events: none;
  padding: 0 24px;
}
.t-hero-logo {
  height: clamp(78px, 10vw, 104px);
  width: auto;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, .5));
  animation: 1.1s var(--ease-out) .15s both heroIn;
}
.t-hero-name {
  color: #fff;
  font-size: clamp(17px, 2.2vw, 23px);
  letter-spacing: .55em;
  text-indent: .55em;
  font-weight: 400;
  animation: 1.1s var(--ease-out) .35s both heroIn;
}
.t-hero-tagline {
  color: rgba(255, 255, 255, .72);
  font-weight: 300;
  font-size: clamp(10px, 1.15vw, 12px);
  letter-spacing: .44em;
  text-indent: .44em;
  animation: 1.1s var(--ease-out) .55s both heroIn;
}

/* nav arrows */
.t-hero-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  z-index: 4;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: rgba(255, 255, 255, .55);
  font-size: 20px;
  font-weight: 300;
  user-select: none;
  transition: color .3s;
}
.t-hero-arrow:hover { color: rgba(255, 255, 255, .9); }
.t-hero-arrow--left  { left: 0;  justify-content: flex-start; padding-left: 14px; }
.t-hero-arrow--right { right: 0; justify-content: flex-end;   padding-right: 14px; }

/* dots */
.t-hero-dots {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.t-hero-dot {
  width: 30px;
  height: 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.t-hero-dot-bar {
  position: relative;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, .28);
  overflow: hidden;
}
/* active dot gets a 5s left-to-right progress fill (= autoplay interval) */
.t-hero-dot.is-active .t-hero-dot-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: left center;
  animation: 5s linear forwards dotFill;
}

/* bottom-left dynamic caption */
.t-hero-caption {
  position: absolute;
  bottom: 18px;
  left: 18px;
  z-index: 4;
  color: rgba(255, 255, 255, .6);
  font-size: 10px;
  letter-spacing: .22em;
  pointer-events: none;
}

/* ------------------------------------------------------------------ *
 * shared section chrome
 * ------------------------------------------------------------------ */
.t-section {
  padding: clamp(44px, 6vw, 60px) clamp(20px, 4.5vw, 48px) 0;
}
.t-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}
.t-head-title {
  color: var(--c-light);
  font-size: 13px;
  letter-spacing: .4em;
}
.t-head-all {
  color: rgba(var(--c-light-rgb), .55);
  font-size: 10px;
  letter-spacing: .14em;
  text-decoration: none;
  transition: color .3s, letter-spacing .3s;
}
.t-head-all:hover {
  color: var(--c-light);
  letter-spacing: .2em;
}

/* ------------------------------------------------------------------ *
 * GALLERY section — full-bleed 2x2 promo tiles (Claude Design, 2026-07-10)
 * ------------------------------------------------------------------ */
.t-gallery.t-section {
  padding-left: clamp(12px, 1.5vw, 16px);
  padding-right: clamp(12px, 1.5vw, 16px);
}
.t-gallery .t-head {
  padding: 0 clamp(8px, 3vw, 32px);
}

.t-promo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 720px) {
  .t-promo-grid { grid-template-columns: 1fr; }
}

.t-promo-tile {
  position: relative;
  color: var(--c-light);
  text-decoration: none;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
@media (min-width: 721px) {
  .t-promo-tile { aspect-ratio: 15 / 8; }
}
.t-promo-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .28);
  transition: background .6s;
}
.t-promo-tile:hover::after { background: rgba(0, 0, 0, .14); }

.t-promo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.1s var(--ease-out);
}
.t-promo-tile:hover .t-promo-img { transform: scale(1.05); }

.t-promo-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.t-promo-title {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 400;
  letter-spacing: .12em;
}
.t-promo-sub {
  margin: 0;
  font-family: var(--font-jp);
  font-weight: 300;
  font-size: clamp(12px, 1.1vw, 14px);
  letter-spacing: .12em;
  line-height: 1.7;
}

/* ------------------------------------------------------------------ *
 * NEWS section
 * ------------------------------------------------------------------ */
.t-news { max-width: 760px; }
.t-news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.t-news-row {
  display: flex;
  gap: 18px;
  align-items: baseline;
  border-bottom: 1px solid rgba(var(--c-light-rgb), .18);
  padding-bottom: 16px;
  text-decoration: none;
  transition: padding-left .35s, border-color .35s;
}
.t-news-row:hover {
  padding-left: 8px;
  border-color: rgba(var(--c-light-rgb), .4);
}
.t-news-date {
  color: rgba(var(--c-light-rgb), .55);
  font-size: 11px;
  flex: 0 0 auto;
}
.t-news-title {
  color: rgba(var(--c-light-rgb), .9);
  font-family: var(--font-jp);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.7;
}

/* ------------------------------------------------------------------ *
 * INSTAGRAM section
 * ------------------------------------------------------------------ */
.t-instagram {
  padding-bottom: clamp(48px, 6vw, 64px);
}
.t-ig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 6px;
}
.t-ig-tile {
  position: relative;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-decoration: none;
}
.t-ig-tile span {
  color: rgba(255, 255, 255, .35);
  font-family: ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: .06em;
}
.t-ig-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.t-ig-1 { background: linear-gradient(135deg, #2b3947, #131b24); }
.t-ig-2 { background: linear-gradient(135deg, #141a33, #05070f); }
.t-ig-3 { background: linear-gradient(135deg, #22382a, #0d1710); }
.t-ig-4 { background: linear-gradient(135deg, #4a2f1e, #160d05); }
.t-ig-5 { background: linear-gradient(135deg, #3d3340, #16121a); }
.t-ig-6 { background: linear-gradient(135deg, #31404f, #10171f); }

/* ------------------------------------------------------------------ *
 * reduced motion — freeze hero mechanics (mirrors gallery-page.js)
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .t-hero-slide { transition: none; } /* 即時切替（dip-to-black を無効化） */
  .t-hero-img.is-kb { animation: none; }
  .t-hero-logo,
  .t-hero-name,
  .t-hero-tagline { animation: none; }
  .t-hero-dot.is-active .t-hero-dot-bar::after { animation: none; }
}
