/* rhythmetrica.com — 色はロゴガイド v3（Navy #003D82・Ink #121113）から。色と文字はここの変数だけで決める。 */

:root {
  --navy: #003d82;
  --navy-soft: #6f93c4;
  --ink: #121113;
  --bg: #ffffff;
  --tint: #f3f6fb;
  --text: #121113;
  --muted: #5b6475;
  --line: #dfe5ef;
  --card: #ffffff;
  --accent: var(--navy);

  --en: "Outfit", system-ui, sans-serif;
  --sans: "Outfit", "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d12;
    --tint: #10141c;
    --text: #eef1f6;
    --muted: #9aa4b5;
    --line: #232a37;
    --card: #131824;
    --navy-soft: #3f5f8f;
    --accent: #6ea0e6;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  word-break: auto-phrase;
  text-wrap: pretty;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- header ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.bar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--en);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.mark img {
  width: 30px;
  height: 30px;
}

@media (prefers-color-scheme: dark) {
  .mark img,
  .about-r {
    filter: invert(1) hue-rotate(180deg) brightness(1.15);
  }
}

.bar nav {
  display: flex;
  gap: 28px;
  font-family: var(--en);
  font-size: 14px;
  font-weight: 500;
}

.bar nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: var(--tint);
  min-height: min(88vh, 760px);
  display: flex;
  align-items: center;
}

.motif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.motif .grid path {
  stroke: var(--line);
  stroke-width: 1.2;
  fill: none;
}

.motif .bars rect {
  fill: var(--navy-soft);
  animation: beat 2.4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: left center;
}

.motif .bars rect.navy {
  fill: var(--navy);
}

@media (prefers-color-scheme: dark) {
  .motif .bars rect.navy {
    fill: var(--accent);
  }
}

.motif .bars .b2 { animation-delay: 0.3s; }
.motif .bars .b3 { animation-delay: 0.6s; }
.motif .bars .b4 { animation-delay: 0.9s; }
.motif .bars .b5 { animation-delay: 1.2s; }

@keyframes beat {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(0.55); }
}

.motif .slash path {
  stroke: var(--navy-soft);
  stroke-width: 22;
  stroke-linecap: round;
  fill: none;
  opacity: 0.55;
}

.motif .slash path.navy {
  stroke: var(--navy);
  opacity: 1;
}

@media (prefers-color-scheme: dark) {
  .motif .slash path.navy {
    stroke: var(--accent);
    opacity: 0.8;
  }
}

.motif .dots path {
  stroke: var(--navy);
  stroke-width: 5;
  stroke-linecap: round;
  fill: none;
}

@media (prefers-color-scheme: dark) {
  .motif .dots path {
    stroke: var(--accent);
  }
}

.hero-in {
  position: relative;
  width: 100%;
  padding-top: 96px;
  padding-bottom: 96px;
}

.logo {
  margin: 0;
  max-width: 600px;
}

.tagline {
  margin: 40px 0 0;
  font-weight: 900;
  font-size: clamp(26px, 4.4vw, 46px);
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.tagline-en {
  margin: 12px 0 0;
  font-family: var(--en);
  font-size: clamp(14px, 1.6vw, 17px);
  color: var(--muted);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
}

.arrow-down {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}

/* ---------- ticker ---------- */

.ticker {
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  font-family: var(--en);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ticker-in {
  display: flex;
  width: max-content;
  animation: slide 40s linear infinite;
}

.ticker span {
  padding: 14px 28px;
  white-space: nowrap;
}

.ticker span::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 56px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
  opacity: 0.6;
}

@keyframes slide {
  to { transform: translateX(-50%); }
}

/* ---------- sections ---------- */

.block {
  padding: clamp(72px, 11vw, 128px) 0;
}

.block-tint {
  overflow: hidden;
  background: var(--tint);
}

.head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0 20px;
  margin-bottom: 48px;
}

.num {
  margin: 0;
  font-family: var(--en);
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
}

.head h2 {
  margin: 0;
  font-family: var(--en);
  font-weight: 800;
  font-size: clamp(44px, 8vw, 88px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.head-note {
  grid-column: 2;
  margin: 14px 0 0;
  color: var(--muted);
}

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

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card.wide {
  grid-column: 1 / -1;
}

.card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.card.wide a {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
}

.pic {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--tint);
}

.card.wide .pic {
  aspect-ratio: auto;
  min-height: 100%;
}

.pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.txt {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 26px 28px 28px;
}

.card.wide .txt {
  justify-content: center;
  padding: 40px;
}

.kind {
  margin: 0;
  font-family: var(--en);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.txt h3 {
  margin: 8px 0 0;
  font-weight: 900;
  font-size: 26px;
  line-height: 1.3;
}

.card.wide .txt h3 {
  font-size: 32px;
}

.txt h3 small {
  display: block;
  font-family: var(--en);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.txt p:not(.kind) {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
  font-family: var(--en);
  font-weight: 600;
  font-size: 14px;
}

/* ---------- channels ---------- */

.channels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.channels a {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 4px 20px;
  height: 100%;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.ch-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
}

.ch-r {
  background: #fff;
  border: 1px solid var(--line);
}

.ch-r img {
  width: 70%;
}

.ch-mk {
  background: var(--navy);
  color: #fff;
  font-weight: 900;
  font-size: 30px;
}

.ch-txt {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ch-name {
  font-weight: 900;
  font-size: 20px;
  line-height: 1.4;
}

.ch-name small {
  display: block;
  font-family: var(--en);
  font-weight: 500;
  font-size: 13px;
  color: var(--muted);
}

.ch-desc {
  color: var(--muted);
  font-size: 15px;
}

.ch-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-family: var(--en);
  font-weight: 600;
  font-size: 14px;
}

/* ---------- about ---------- */

.about {
  position: relative;
}

.about-body {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.big {
  margin: 0 0 28px;
  font-family: var(--en);
  font-weight: 800;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.plus {
  margin: 0 0.12em;
  color: var(--accent);
}

.about-body > p:not(.big) {
  margin: 0;
  font-size: 17px;
}

.facts {
  display: grid;
  gap: 10px;
  margin: 36px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.facts div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 16px;
}

.facts dt {
  font-family: var(--en);
  font-size: 13px;
  letter-spacing: 0.08em;
  line-height: 2.1;
  color: var(--muted);
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
}

.facts a {
  margin-left: 0.4em;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.about-r {
  position: absolute;
  right: 32px;
  top: 50%;
  width: min(34vw, 360px);
  transform: translateY(-50%);
  opacity: 0.09;
}

/* ---------- links ---------- */

.links {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.links a {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 26px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding 0.25s, color 0.2s;
}

.links .service {
  font-family: var(--en);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.01em;
}

.links .id {
  color: var(--muted);
}

/* ---------- arrows ---------- */

/* 矢印は線で描く（書体に頼らない） */
.arrow {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Cpath d='M2.5 9.5 9 3M4 2.7h5.3V8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Cpath d='M2.5 9.5 9 3M4 2.7h5.3V8'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s ease;
}

.facts .arrow {
  margin-left: 4px;
}

/* ---------- hover ---------- */

@media (hover: hover) {
  .bar nav a:hover {
    color: var(--text);
  }

  .cta:hover {
    transform: translateY(-2px);
  }

  .card a:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    box-shadow: 0 24px 48px -28px rgba(0, 30, 70, 0.35);
  }

  .card a:hover .pic img {
    transform: scale(1.04);
  }

  .channels a:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    box-shadow: 0 24px 48px -28px rgba(0, 30, 70, 0.35);
  }

  .channels a:hover .ch-go,
  .card a:hover .go,
  .links a:hover .service {
    color: var(--accent);
  }

  a:hover .arrow {
    transform: translate(2px, -2px);
  }

  .links a:hover {
    padding-left: 14px;
  }
}

/* ---------- footer ---------- */

.foot {
  padding: 56px 0 64px;
  border-top: 1px solid var(--line);
}

.foot-in {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.foot img {
  width: 220px;
}

.foot p {
  margin: 0;
  font-family: var(--en);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  .wrap {
    padding: 0 20px;
  }

  .bar nav {
    gap: 18px;
  }

  .mark span {
    display: none;
  }

  .hero {
    min-height: 0;
  }

  .hero-in {
    padding-top: 120px;
    padding-bottom: 140px;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .card.wide a {
    display: flex;
  }

  .card.wide .pic {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  .card.wide .txt {
    padding: 26px 24px 28px;
  }

  .card.wide .txt h3 {
    font-size: 26px;
  }

  .txt {
    padding: 22px 24px 26px;
  }

  .head-note {
    grid-column: 1 / -1;
  }

  .channels {
    grid-template-columns: minmax(0, 1fr);
  }

  .channels a {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 4px 16px;
    padding: 22px;
  }

  .ch-icon {
    width: 56px;
    height: 56px;
  }

  .ch-mk {
    font-size: 24px;
  }

  .facts div {
    grid-template-columns: 6rem minmax(0, 1fr);
  }

  .about-r {
    top: auto;
    bottom: -40px;
    right: -20px;
    width: 200px;
    transform: none;
  }

  .links a {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
  }

  .links .id {
    grid-row: 2;
  }

  .links .arrow {
    grid-row: 1 / span 2;
    grid-column: 2;
  }

  .foot-in {
    flex-direction: column;
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .motif .bars rect,
  .ticker-in {
    animation: none;
  }

  .arrow,
  .card a,
  .pic img,
  .cta,
  .channels a,
  .links a {
    transition: none;
  }
}

/* ---------- 404 ---------- */

.h404 {
  margin: 0;
  font-family: var(--en);
  font-weight: 800;
  font-size: clamp(44px, 8vw, 88px);
  line-height: 1;
  letter-spacing: -0.035em;
}
