/* Hills of Edo — promotional site styles
   Palette derived from the app's own HillSeason.swift seasonal colors
   and the sumi-ink tone used in HowToPlayView.swift's ActionButton. */

:root {
  --ink: #2b241c;
  --washi: #f4ecdd;
  --washi-dark: #e8dcc4;
  --vermillion: #b5432f;

  --spring: rgb(255, 228, 240);
  --summer: rgb(34, 139, 34);
  --autumn: rgb(205, 92, 92);
  --winter: rgb(173, 216, 230);

  --font-heading-en: 'Caudex', serif;
  --font-heading-ja: 'Yuji Syuku', serif;
  --font-body: 'Caudex', serif;

  --max-width: 960px;
  /* Body text fills the same content column as the screenshot row,
     feature grid, and headings — one column, one width, page-wide. */
  --measure: none;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--washi);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

p {
  max-width: var(--measure);
}
footer.site-footer p {
  max-width: none;
}

body {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(43, 36, 28, 0.03) 0, transparent 45%),
    radial-gradient(circle at 80% 60%, rgba(43, 36, 28, 0.03) 0, transparent 40%),
    repeating-linear-gradient(45deg, rgba(43, 36, 28, 0.015) 0px, rgba(43, 36, 28, 0.015) 1px, transparent 1px, transparent 6px);
}

/* Bilingual visibility toggle */
[data-lang-active="en"] [data-lang="ja"] { display: none; }
[data-lang-active="ja"] [data-lang="en"] { display: none; }
html:not([data-lang-active]) [data-lang="ja"] { display: none; } /* default before JS runs */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Custom list markers everywhere (replace default browser bullets) */
ul:not(#coop-hills ul) {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  max-width: var(--measure);
}
ul:not(#coop-hills ul) li {
  position: relative;
  padding-left: 0;
  margin-bottom: 10px;
}
/* Marker hangs in the gutter so list TEXT starts on the same left edge
   as paragraph text — one column, one left edge. */
ul:not(#coop-hills ul) li::before {
  content: '—';
  color: var(--vermillion);
  position: absolute;
  left: -22px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature-card {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--washi-dark);
  border-top: 3px solid var(--vermillion);
  border-radius: 10px;
  padding: 18px 20px;
}
.feature-card h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
  border: none;
  padding: 0;
}
.feature-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink);
  max-width: none;
}

/* Accent bar hangs in the gutter; heading text lands on the shared edge. */
h3 {
  border-left: 3px solid var(--washi-dark);
  padding-left: 10px;
  margin-top: 36px;
  margin-left: -13px;
}

/* Scroll affordance lives in text below the heading, not as an overlay:
   a gradient painted over the last screenshot reads as a damaged image. */
.scroll-note {
  margin: -6px 0 0;
  font-size: 0.85rem;
  color: var(--ink);
  opacity: 0.6;
}
.shot-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--vermillion) var(--washi-dark);
}
.shot-row::-webkit-scrollbar {
  height: 7px;
}
.shot-row::-webkit-scrollbar-track {
  background: var(--washi-dark);
  border-radius: 4px;
}
.shot-row::-webkit-scrollbar-thumb {
  background: var(--vermillion);
  border-radius: 4px;
}

.icon-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 16px auto;
  max-width: 500px;
}
.icon-row figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  width: 84px;
  text-align: center;
}
.rank-count {
  font-size: 0.72rem;
  color: var(--ink);
  opacity: 0.65;
}
.action-disc {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--washi-dark);
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.action-icon {
  width: 38px;
  height: 38px;
  background-color: var(--ink);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.action-icon-rally { -webkit-mask-image: url('../assets/howto/rallying.png'); mask-image: url('../assets/howto/rallying.png'); }
.action-icon-surrender { -webkit-mask-image: url('../assets/howto/surrendering.png'); mask-image: url('../assets/howto/surrendering.png'); }

.role-icon {
  width: 48px;
  height: 48px;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.role-icon-lord {
  background-color: #A11323;
  -webkit-mask-image: url('../assets/howto/lord.svg');
  mask-image: url('../assets/howto/lord.svg');
}
.role-icon-retainer {
  background-color: #00B2A9;
  -webkit-mask-image: url('../assets/howto/retainer.svg');
  mask-image: url('../assets/howto/retainer.svg');
}

.icon-row img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}
.icon-row figcaption {
  font-size: 0.8rem;
  color: var(--ink);
}

#coop-hills ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hill-card {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.hill-icon {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(43,36,28,0.25);
}

#flower-of-month {
  padding: 24px 0;
}
.flower-band {
  position: relative;
  height: 150px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(43,36,28,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.flower-text {
  display: none;
  background: rgba(244, 236, 221, 0.82);
  border-radius: 10px;
  padding: 8px 20px;
  text-align: center;
  max-width: 90%;
}
.flower-text.flower-visible {
  display: block;
}
.flower-text h4 {
  margin: 0 0 2px;
  font-family: var(--font-heading-en);
  font-size: 1rem;
  color: var(--ink);
}
html[data-lang-active="ja"] .flower-text h4 {
  font-family: var(--font-heading-ja);
}
.flower-text p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink);
}
@media (min-width: 640px) {
  .flower-band { height: 190px; }
}

.seasonal-bar {
  height: 6px;
  width: 100%;
  background: linear-gradient(90deg, var(--spring), var(--summer), var(--autumn), var(--winter));
}

header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--washi-dark);
}

.site-title {
  font-family: var(--font-heading-en);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}
html[data-lang-active="ja"] .site-title { font-family: var(--font-heading-ja); }

#lang-toggle {
  font-family: var(--font-body);
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 16px;
  cursor: pointer;
  font-size: 0.9rem;
}
#lang-toggle:hover { background: var(--vermillion); color: var(--washi); border-color: var(--vermillion); }

section {
  padding: 48px 0;
  border-bottom: 1px solid var(--washi-dark);
}
section:last-of-type { border-bottom: none; }

#hero {
  position: relative;
  padding: 0;
  overflow: hidden;
  min-height: 620px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--washi-dark);
}
.hero-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 42%;
  /* Right edge lands exactly on the shared content column edge, so the
     art aligns with the screenshot row and the text above/below it.
     50% - (half container - container padding) = 50% - (480 - 20). */
  right: max(20px, calc(50% - 460px));
  overflow: hidden;
  z-index: 0;
  /* The only effect on this element: one soft fade-in on the left.
     Do not stack a second mask or an overlay gradient on top of it. */
  mask-image: linear-gradient(to right, transparent 0%, black 45%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 45%);
}
.hero-bg img {
  width: 102%;
  height: 100%;
  object-fit: cover;
  object-position: 38% 32%;
}
.hero-text {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: 72px;
  padding-bottom: 72px;
}
/* Top banner text uses the same full content column as every other
   section — no separate narrower measure. */
.hero-text > * {
  max-width: var(--measure);
}
/* The description wraps well before the artwork, so it only grazes the
   left edge of the print rather than running across it. */
.hero-text > p:not(.cta-row) {
  max-width: 400px;
}
@media (max-width: 720px) {
  #hero {
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
  }
  .hero-bg {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    width: 100%;
    height: auto;
    mask-image: none;
    -webkit-mask-image: none;
  }
  .hero-bg img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center top;
    display: block;
  }
  .hero-bg::after {
    background: linear-gradient(to bottom, transparent 72%, var(--washi) 100%);
  }
  .hero-text {
    max-width: none;
    padding: 40px 20px 56px;
  }
}
.cta-row {
  margin-top: 20px;
}
.app-store-cta {
  display: inline-block;
  line-height: 0;
  transition: opacity 0.15s ease;
}
.app-store-cta img {
  height: 48px;
  width: auto;
}
.app-store-cta:hover {
  opacity: 0.8;
}

/* One-line description introducing each How to Play section. */
.section-lede {
  margin: -8px 0 20px;
  font-size: 1.05rem;
}

.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}
.jump-nav a {
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--washi-dark);
  border-radius: 999px;
  padding: 5px 14px;
}
.jump-nav a:hover {
  background: var(--vermillion);
  color: var(--washi);
}

h1, h2, h3 {
  font-family: var(--font-heading-en);
  color: var(--ink);
}
html[data-lang-active="ja"] h1,
html[data-lang-active="ja"] h2,
html[data-lang-active="ja"] h3 {
  font-family: var(--font-heading-ja);
}

h2 {
  font-size: 1.75rem;
  border-left: 5px solid var(--vermillion);
  padding-left: 12px;
  margin-bottom: 24px;
  margin-left: -17px;
}

a { color: var(--vermillion); }

footer.site-footer {
  padding: 32px 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink);
}
footer.site-footer a { display: inline-block; margin: 0 8px; }
