/* ==========================================================================
   SUNNY inc. — top page sections
   hero / who-we-are / works marquee / info / contact
   ========================================================================== */

.sn-section {
  padding: var(--sn-section-y) var(--sn-gutter);
  border-bottom: 1px solid var(--sn-rule);
}
.sn-section__inner {
  max-width: var(--sn-maxw);
  margin: 0 auto;
}
.sn-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(32px, 5vw, 90px);
  align-items: start;
}
.sn-titles { display: flex; flex-direction: column; gap: 16px; }

/* --- hero ---------------------------------------------------------------- */

.sn-hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  background: #17191c;
  overflow: hidden;
}
.sn-hero__layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  opacity: 0;
  transition: opacity 2.2s ease-in-out;
}
.sn-hero__layer.is-on { opacity: 1; }
/* JPEG first as the universal fallback, then image-set() so anything modern
   picks the much smaller WebP. */
.sn-hero__layer:nth-child(1) { background-color: #1b1d21; background-image: url("../hero/hero-01.jpg"); background-position: center 42%; }
.sn-hero__layer:nth-child(2) { background-color: #0e1218; background-image: url("../hero/hero-02.jpg"); background-position: center 46%; }
.sn-hero__layer:nth-child(3) { background-color: #1b1d21; background-image: url("../hero/hero-03.jpg"); background-position: center 52%; }
.sn-hero__layer:nth-child(4) { background-color: #12201f; background-image: url("../hero/hero-04.jpg"); background-position: center 50%; }

@supports (background-image: image-set(url("a.webp") type("image/webp"))) {
  /* html.no-webp のときは JPEG のまま（media.js の USE_WEBP = false） */
  html:not(.no-webp) .sn-hero__layer:nth-child(1) { background-image: image-set(url("../hero/hero-01.webp") type("image/webp"), url("../hero/hero-01.jpg") type("image/jpeg")); }
  html:not(.no-webp) .sn-hero__layer:nth-child(2) { background-image: image-set(url("../hero/hero-02.webp") type("image/webp"), url("../hero/hero-02.jpg") type("image/jpeg")); }
  html:not(.no-webp) .sn-hero__layer:nth-child(3) { background-image: image-set(url("../hero/hero-03.webp") type("image/webp"), url("../hero/hero-03.jpg") type("image/jpeg")); }
  html:not(.no-webp) .sn-hero__layer:nth-child(4) { background-image: image-set(url("../hero/hero-04.webp") type("image/webp"), url("../hero/hero-04.jpg") type("image/jpeg")); }
}

.sn-hero__scrim-b,
.sn-hero__scrim-r { position: absolute; inset: 0; }
.sn-hero__scrim-b {
  background: linear-gradient(to top,
    rgba(10,10,10,0.8) 0%, rgba(10,10,10,0.6) 22%,
    rgba(10,10,10,0.2) 48%, rgba(10,10,10,0) 66%);
}
.sn-hero__scrim-r {
  background: linear-gradient(to right,
    rgba(10,10,10,0.6) 0%, rgba(10,10,10,0.36) 34%,
    rgba(10,10,10,0.08) 56%, rgba(10,10,10,0) 72%);
}

.sn-hero__body {
  position: relative;
  width: 100%;
  padding: 0 var(--sn-gutter) clamp(40px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.sn-hero__logo {
  width: clamp(140px, 15vw, 210px);
  height: auto;
  display: block;
  margin-bottom: 14px;
}
.sn-hero h1 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(32px, 5.6vw, 86px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.96;
  color: #fff;
}
.sn-hero__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
/* 改行は <br> で、折り返せる位置は <wbr>（・の後ろ）だけ。
   word-break: keep-all と組み合わせることで、フォントが変わっても
   「キービジュア / ル」のように語の途中で切れることがなくなる。 */
.sn-hero__lead {
  margin: 0;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.95;
  color: rgba(255, 255, 255, 0.88);
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* On a phone the 34ch cap squeezes the copy into a third line and breaks a
   word in half (広告・キービジュア / ル…). Let it use the full gutter width
   so the two authored lines stay two lines. */
@media (max-width: 767px) {
  .sn-hero__lead {
    max-width: none;
    font-size: 13px;
  }
}
.sn-hero__cue {
  font-family: var(--sn-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.6);
  animation: sn-cue 2.4s ease-in-out infinite;
}

/* --- who we are ---------------------------------------------------------- */

.sn-prose { display: flex; flex-direction: column; gap: 26px; max-width: 62ch; }
.sn-prose p {
  margin: 0;
  font-size: clamp(14px, 1.05vw, 15.5px);
  line-height: 2.05;
  letter-spacing: 0.01em;
}

/* --- works --------------------------------------------------------------- */

.sn-works {
  padding: var(--sn-section-y) 0;
  border-bottom: 1px solid var(--sn-rule);
  overflow: hidden;
}
.sn-works__wrap { display: flex; flex-direction: column; gap: clamp(30px, 3.6vw, 48px); }
.sn-works__head {
  max-width: var(--sn-maxw);
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--sn-gutter);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.sn-marquee { display: flex; flex-direction: column; gap: 2px; }
.sn-marquee__clip { width: 100%; overflow: hidden; }
.sn-marquee__track {
  display: flex;
  gap: 2px;
  width: max-content;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.sn-marquee__clip:hover .sn-marquee__track { animation-play-state: paused; }
.sn-marquee__item {
  position: relative;
  flex: none;
  height: clamp(200px, 21vw, 300px);
  display: block;
  transition: opacity 0.25s ease;
}
.sn-marquee--narrow .sn-marquee__item { height: 30vw; }
.sn-marquee__item:hover { opacity: 0.88; }
.sn-marquee__item img,
.sn-marquee__item video {
  height: 100%;
  width: auto;
  max-width: none;
  display: block;
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .sn-marquee__clip { overflow-x: auto; }
  .sn-marquee__track { animation: none; }
}

/* --- info ---------------------------------------------------------------- */

.sn-facts { display: flex; flex-direction: column; gap: 14px; padding-top: 14px; }
.sn-fact {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  align-items: baseline;
}
.sn-fact dt {
  margin: 0;
  font-family: var(--sn-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--sn-ink-62);
}
.sn-fact dd { margin: 0; font-size: 13.5px; line-height: 1.8; color: var(--sn-ink-72); }
.sn-fact dd.is-name { font-size: 15px; font-weight: 500; color: var(--sn-ink); }
.sn-fact a {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--sn-link);
  border-bottom: 1px solid rgba(46, 86, 214, 0.35);
}

.sn-profile { display: flex; flex-direction: column; gap: 20px; max-width: 58ch; }
.sn-profile__label {
  font-family: var(--sn-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--sn-ink-62);
}
.sn-profile__name {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px;
}
.sn-profile__name strong {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.sn-profile__name span { font-size: 12px; letter-spacing: 0.02em; color: var(--sn-ink-68); }
.sn-profile__from { font-size: 13.5px; color: var(--sn-ink-68); }

.sn-history {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--sn-rule-strong);
  margin: 0;
}
.sn-history > div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--sn-rule-strong);
}
.sn-history dt {
  margin: 0;
  font-family: var(--sn-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding-top: 3px;
}
.sn-history dd { margin: 0; font-size: 13.5px; line-height: 1.9; }

/* --- contact ------------------------------------------------------------- */

.sn-contact {
  padding: var(--sn-section-y) var(--sn-gutter);
  background: var(--sn-ink);
  color: var(--sn-paper);
}
.sn-contact .sn-eyebrow { color: var(--sn-accent-lt); }
.sn-contact .sn-h2 { color: #fff; }
.sn-contact .sn-sub { color: var(--sn-paper-55); }
.sn-contact__lead {
  margin: 0;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 2;
  color: var(--sn-paper-70);
  padding-top: 10px;
}
.sn-contact__panel { max-width: 560px; width: 100%; }

.sn-form { display: flex; flex-direction: column; gap: 26px; }
.sn-form label { display: flex; flex-direction: column; gap: 9px; }
.sn-form .sn-field-label {
  font-family: var(--sn-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--sn-paper-55);
}
.sn-form input,
.sn-form textarea {
  background: none;
  border: none;
  border-bottom: 1px solid var(--sn-paper-28);
  color: #fff;
  font-size: 15px;
  padding: 10px 0;
  outline: none;
  transition: border-color 0.2s ease;
}
.sn-form textarea { resize: vertical; }
.sn-form input:focus,
.sn-form textarea:focus { border-bottom-color: var(--sn-link-lt); }

.sn-form__error { font-size: 12px; line-height: 1.7; color: var(--sn-warn); }
.sn-form__error[hidden] { display: none; }

/* send button + the "email us instead" line, kept closer together than the
   form's own 26px rhythm */
.sn-form__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.sn-form__fallback {
  margin: 0;
  font-size: 12px;
  line-height: 1.9;
  color: var(--sn-paper-55);
}
.sn-form__fallback a {
  color: var(--sn-link-lt);
  border-bottom: 1px solid rgba(143, 169, 242, 0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.sn-form__fallback a:hover,
.sn-form__fallback a:focus-visible {
  color: #fff;
  border-bottom-color: #fff;
}

.sn-form__send {
  align-self: flex-start;
  margin-top: 4px;
  background: var(--sn-paper);
  border: 1px solid var(--sn-paper);
  color: var(--sn-ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  padding: 16px 34px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.sn-form__send:hover:not(:disabled),
.sn-form__send:focus-visible:not(:disabled) {
  background: var(--sn-link);
  border-color: var(--sn-link);
  color: #fff;
}
.sn-form__send:disabled { opacity: 0.55; cursor: default; }

.sn-thanks { display: flex; flex-direction: column; gap: 16px; padding: 44px 0; }
.sn-thanks[hidden] { display: none; }
.sn-thanks strong {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #fff;
}
.sn-thanks span { font-size: 13.5px; line-height: 1.9; color: var(--sn-paper-70); }
.sn-thanks button {
  align-self: flex-start;
  margin-top: 10px;
  background: none;
  border: 1px solid rgba(243, 241, 237, 0.3);
  color: var(--sn-paper);
  font-size: 11px;
  letter-spacing: 0.14em;
  padding: 13px 20px;
  cursor: pointer;
}
