/* ==========================================================================
   Picnic Film — styles
   Colors are sampled from the brand itself:
   paper = logo background, green/sage = the booth's painted panels,
   night = the booth in shadow.
   ========================================================================== */

:root {
  /* Color tokens */
  --paper: #FDF3DF;        /* logo background */
  --paper-raised: #FFF9EE; /* form fields */
  --ink: #000000;          /* logo mark */
  --green: #3F5243;        /* booth green, darkened for text — 7.6:1 on paper */
  --green-strong: #2E3D31; /* hover / pressed */
  --green-soft: #5C7160;   /* secondary text — 4.8:1 on paper */
  --sage: #708773;         /* the booth's lit face — large or decorative use only */
  --night: #384336;        /* the booth in shadow */
  --night-text: #FDF3DF;   /* 9.4:1 on night */
  --night-soft: #BFD0BD;   /* 6.4:1 on night */
  --error: #9E2A1C;

  /* Type */
  /* Archivo has no Japanese glyphs; Japanese falls through to the mincho so the page stays one voice */
  --font-display: "Archivo", "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;

  /* Space — 8pt scale, spacious */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4rem;
  --s-7: 6rem;
  --s-8: 8rem;

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 1280px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 150ms;
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--green);
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.8;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-weight: inherit; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 3px;
}

/* ---------- Language switching ----------
   Every string exists twice, marked lang="ja" / lang="en".
   The <html lang> decides which one shows. */
html[lang="ja"] body [lang="en"],
html[lang="en"] body [lang="ja"] { display: none !important; }

/* ---------- Utilities ---------- */

.skip-link {
  position: absolute;
  left: var(--s-2);
  top: -100px;
  z-index: 100;
  padding: var(--s-1) var(--s-2);
  background: var(--green);
  color: var(--paper);
  font-family: var(--font-display);
  text-decoration: none;
}
.skip-link:focus { top: var(--s-2); }

.display-serif {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 7vw, 5.75rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* Japanese headings break only at <wbr> phrase boundaries, never mid-word */
.display-serif,
.events__lead,
.where__lead {
  word-break: keep-all;
  overflow-wrap: anywhere; /* safety net if a phrase is wider than the screen */
}

.text-link {
  font-family: var(--font-display);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  transition: text-decoration-thickness var(--t-fast);
}
.text-link:hover { text-decoration-thickness: 2px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: 0;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--t-fast), transform var(--t-fast);
}
.btn--primary { background: var(--green); color: var(--paper); }
.btn--primary:hover { background: var(--green-strong); }
.btn--primary:active { transform: scale(0.98); }
.btn--block { width: 100%; }
.btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--s-3) var(--gutter);
}

.brand img { width: auto; height: 48px; }

.nav {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
}

.lang-switch { display: flex; }
.lang-switch button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.5rem;
  border: 0;
  background: none;
  color: var(--green-soft);
  font: inherit;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

/* ---------- Hero ---------- */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--s-5) var(--gutter) var(--s-7);
}

.hero__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  color: var(--green);
}

.hero__word {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 62;
  font-weight: 900;
  /* Sized so PICNIC + the middle line + FILM always fit the container width */
  font-size: min(15.2vw, 13.5rem);
  line-height: 0.8;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.hero__between {
  flex: 0 1 auto;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(0.75rem, 1.4vw, 1.125rem);
  line-height: 1.5;
  text-align: center;
  white-space: nowrap; /* line breaks are set by hand with <br> */
}

.facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-1) var(--s-3);
  margin-top: var(--s-5);
  font-family: var(--font-serif); /* Japanese in Archivo fell back to system gothic; mincho matches the page */
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--green-soft);
}
.facts__lead { color: var(--green); font-weight: 800; }
.facts__lead::before { content: "◆" / ""; margin-right: 0.6em; font-size: 0.7em; vertical-align: 0.15em; }

/* The reel: booth + four strips, staggered like prints laid on a table */
.reel {
  display: grid;
  grid-template-columns: minmax(0, 4.4fr) repeat(4, minmax(0, 1fr));
  gap: var(--s-3);
  align-items: start;
  margin-top: var(--s-4);
}

.reel__item figcaption {
  margin-top: var(--s-1);
  word-break: keep-all;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--green-soft);
}

.reel__item--booth img { width: 100%; } /* photo is already framed on the booth — shown uncropped */

.reel__item--strip:nth-child(2) { margin-top: 0; }
.reel__item--strip:nth-child(3) { margin-top: 5.5rem; }
.reel__item--strip:nth-child(4) { margin-top: 1.75rem; }
.reel__item--strip:nth-child(5) { margin-top: 7.5rem; }

/* One orchestrated moment: the strips develop as they load.
   Only runs with JS (so images never stay hidden) and never under reduced motion. */
.js .develop img { opacity: 0; }
.js .develop.is-in img { animation: develop 2.2s var(--ease-out) forwards; }
.js .develop:nth-child(3).is-in img { animation-delay: 180ms; }
.js .develop:nth-child(4).is-in img { animation-delay: 360ms; }
.js .develop:nth-child(5).is-in img { animation-delay: 540ms; }

@keyframes develop {
  0%   { opacity: 0; filter: brightness(2.4) contrast(0.4) sepia(0.6); }
  25%  { opacity: 1; }
  100% { opacity: 1; filter: none; }
}

/* ---------- Where (night) ---------- */

.where {
  background: var(--night);
  color: var(--night-text);
}

.where__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--s-8) var(--gutter);
}

.where__lead {
  margin-top: var(--s-3);
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  color: var(--night-soft);
}

.soon {
  margin-top: var(--s-6);
  font-family: var(--font-display);
  font-variation-settings: "wdth" 62;
  font-weight: 900;
  font-size: clamp(3.5rem, 12vw, 10rem);
  line-height: 0.85;
  text-transform: uppercase;
  color: var(--night-soft);
}

.where__note {
  margin-top: var(--s-5);
  font-size: 1rem;
  color: var(--night-soft);
}
.where__note .text-link {
  display: inline-block;
  margin-left: 0.5em;
  padding: 0.5rem 0;
  color: var(--night-text);
}
.where :focus-visible { outline-color: var(--night-soft); }

/* ---------- Events ---------- */

.events {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--s-8) var(--gutter);
}

/* Photo on one side, the details list on the other */
.events__intro {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-5) var(--s-3);
  align-items: start;
}

.events__photo {
  grid-column: 1 / span 5;
  position: sticky;
  top: var(--s-4);
}
.events__photo img {
  width: 100%;
  border-radius: 6px; /* shown uncropped at its own landscape ratio */
}

.events__body { grid-column: 7 / span 6; }

.events__lead {
  margin-top: var(--s-3);
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  line-height: 1.8;
}

.events__cta { margin-top: var(--s-4); }

.details {
  margin-top: var(--s-6);
  border-top: 1px solid color-mix(in srgb, var(--green-soft) 30%, transparent);
}

.detail {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: var(--s-3);
  align-items: start;
  padding: var(--s-3) 0;
  border-bottom: 1px solid color-mix(in srgb, var(--green-soft) 30%, transparent);
}

.detail__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: var(--green);
  color: var(--night-soft);
}

.detail__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.875rem;
  font-family: var(--font-serif);
  line-height: 1.4;
}
.detail__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--green-soft);
}
.detail__value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--green);
}

.detail__desc {
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--green-soft);
}

/* Inquiry form, below the details */
.inquiry {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-4) var(--s-3);
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 2px dashed var(--green-soft);
}
.inquiry__head { grid-column: 1 / span 5; }
.form { grid-column: 7 / span 6; }

.inquiry__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
}
.inquiry__note {
  margin-top: var(--s-2);
  font-size: 0.9375rem;
  color: var(--green-soft);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* Form */
.field { margin-bottom: var(--s-3); }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
}

.field label {
  display: block;
  margin-bottom: 0.375rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
}
/* "必須" tag — quiet green, so nothing looks like an error before anyone types */
.req {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.0625rem 0.4375rem;
  border: 1px solid var(--green-soft);
  border-radius: 2px;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--green);
  vertical-align: 0.1em;
}
.req[hidden] { display: none; }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--green-soft);
  border-radius: 0;
  background: var(--paper-raised);
  color: var(--green);
  font-family: var(--font-display);
  font-size: 1rem; /* 16px keeps iOS from zooming */
  transition: border-color var(--t-fast);
}
.field textarea { resize: vertical; line-height: 1.6; }

/* ご利用区分 — two large, tappable choices */
.choice { margin: 0 0 var(--s-3); padding: 0; border: 0; min-width: 0; }
.choice legend {
  margin-bottom: 0.375rem;
  padding: 0;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
}
.choice__options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-1); }
.field .choice__option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 48px;
  margin: 0;
  padding: 0 0.875rem;
  border: 1.5px solid var(--green-soft);
  background: var(--paper-raised);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.field .choice__option:hover { border-color: var(--green); }
.field .choice__option:has(input:checked) {
  border-color: var(--green);
  background: var(--green);
  color: var(--paper);
}
.choice__option input {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: var(--paper);
}
.choice__option:has(input:focus-visible) { outline: 3px solid var(--sage); outline-offset: 2px; }
.field select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--green) 50%), linear-gradient(135deg, var(--green) 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 55%, calc(100% - 0.9rem) 55%;
  background-size: 0.35rem 0.35rem;
  background-repeat: no-repeat;
}
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--green); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { border-color: var(--green); outline-offset: 1px; }

.field [aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.field input:disabled { opacity: 0.45; cursor: not-allowed; }

/* 日程は未定 checkbox */
.check { margin-top: calc(var(--s-3) * -0.5); }
.field .check__label {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  margin: 0;
  font-weight: 500;
  cursor: pointer;
}
.check__label input { width: 1.125rem; height: 1.125rem; margin: 0; accent-color: var(--green); }

.field__help {
  margin-top: 0.375rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  color: var(--green-soft);
}

.field__error {
  margin-top: 0.375rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--error);
}
.field__error:empty { display: none; }

.form__summary {
  margin-bottom: var(--s-3);
  padding: var(--s-2) var(--s-3);
  border-left: 4px solid var(--error);
  background: var(--paper-raised);
  font-family: var(--font-display);
  font-size: 0.9375rem;
}
.form__summary-title { font-weight: 700; color: var(--error); }
.form__summary ul { margin-top: var(--s-1); padding-left: 1.2em; list-style: disc; }
.form__summary a { color: var(--error); }

.form__status {
  margin-top: var(--s-2);
  font-family: var(--font-display);
  font-size: 0.9375rem;
}
.form__status:empty { display: none; }
.form__status[data-state="error"] { color: var(--error); }

/* ---------- Footer: a receipt, 38mm in spirit ---------- */

.site-footer { padding: var(--s-6) var(--gutter) var(--s-7); }

.receipt {
  width: min(100%, 20rem);
  margin: 0 auto;
  padding-top: var(--s-5);
  border-top: 2px dashed var(--green-soft);
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.9375rem;
}
.receipt__logo { width: 11rem; margin: 0 auto var(--s-3); }
.receipt p + p { margin-top: 0.25rem; }
.receipt__small { font-size: 0.8125rem; color: var(--green-soft); }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .events__photo,
  .events__body,
  .inquiry__head,
  .form { grid-column: 1 / -1; }
  .events__photo { position: static; max-width: 32rem; }
  .form { max-width: 40rem; }
}

@media (max-width: 900px) {
  .brand img { height: 40px; }
  .nav { gap: var(--s-2); }
}

@media (max-width: 420px) {
  .site-header { gap: var(--s-1); }
  .brand img { height: 34px; }
  .nav { gap: 0.25rem; }
  .lang-switch button { min-width: 40px; padding: 0 0.25rem; }
  .nav__cta { padding-inline: 0.875rem; }
}

@media (max-width: 760px) {
  .hero { padding-top: var(--s-4); }
  .hero__title { gap: 0.5rem; }
  .hero__word { font-size: 12vw; }
  .hero__between { font-size: 0.6875rem; }

  .facts { justify-content: flex-start; }
  .facts__lead { flex-basis: 100%; }

  .reel {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--s-2) 0.75rem;
  }
  /* On phones the strips (the product) come first, the booth follows */
  .reel__item--booth { grid-column: 1 / -1; order: 1; margin-top: var(--s-4); }
  .reel__item--strip:nth-child(3) { margin-top: 2.5rem; }
  .reel__item--strip:nth-child(4) { margin-top: 0.75rem; }
  .reel__item--strip:nth-child(5) { margin-top: 3.5rem; }

  .field-row { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .develop img { opacity: 1; }
}
