/* =============================================================
   リファンチ公式サイト
   色や横幅は、下の :root でまとめて変更できます。
============================================================= */
:root {
  --color-bg: #edf0f0;
  --color-surface: #ffffff;
  --color-dark: #0d141b;
  --color-dark-soft: #18232d;
  --color-text: #17212a;
  --color-muted: #5c6971;
  --color-line: #c9d0d1;
  --color-accent: #f2c230;
  --color-accent-dark: #896700;
  --content-width: 1180px;
  --side-space: clamp(20px, 5vw, 72px);
  --section-space: clamp(80px, 10vw, 140px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--color-bg);
  color: var(--color-text);
  font-family:
    "Helvetica Neue",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    Meiryo,
    sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  letter-spacing: 0.035em;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

.container {
  width: min(100% - (var(--side-space) * 2), var(--content-width));
  margin-inline: auto;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-label::before {
  width: 28px;
  height: 3px;
  background: var(--color-accent);
  content: "";
}

.section-title {
  margin: 0;
  font-size: clamp(2.25rem, 4.5vw, 4.35rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.section-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(48px, 8vw, 120px);
  align-items: end;
}

.section-introduction {
  max-width: 520px;
  margin: 0 0 6px;
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 2;
}

/* =============================================================
   ヘッダー
============================================================= */
.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  color: #ffffff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 34px;
  border: 3px solid var(--color-accent);
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  top: calc(50% - 1px);
  width: 14px;
  height: 3px;
  background: var(--color-accent);
  content: "";
}

.brand-mark::before {
  right: 25px;
}

.brand-mark::after {
  left: 25px;
}

.brand-name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.5vw, 40px);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.header-nav a {
  transition: color 180ms ease;
}

.header-nav a:hover {
  color: var(--color-accent);
}

.header-nav .nav-button {
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

/* =============================================================
   メインビジュアル
============================================================= */
.hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  background-color: var(--color-dark);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  color: #ffffff;
}

.hero::before {
  position: absolute;
  top: 14%;
  left: -130px;
  width: 340px;
  height: 340px;
  border: 1px dashed rgba(242, 194, 48, 0.16);
  border-radius: 50%;
  content: "";
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.92fr);
  align-items: center;
  gap: clamp(50px, 7vw, 105px);
  min-height: 760px;
  padding-top: 122px;
  padding-bottom: 78px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 25px;
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.hero-kicker::before {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  content: "";
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.2rem, 6.1vw, 6.5rem);
  font-weight: 900;
  line-height: 0.99;
  letter-spacing: -0.075em;
}

.hero h1 span {
  display: block;
  white-space: nowrap;
}

.hero h1 .accent-line {
  color: var(--color-accent);
}

.hero-description {
  max-width: 620px;
  margin: 32px 0 0;
  color: #d4dbdf;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: 205px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.button::after {
  content: "→";
  font-size: 1.05rem;
}

.button-primary {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-dark);
}

.button:hover {
  border-color: #ffffff;
  background: #ffffff;
  color: var(--color-dark);
}

.hero-visual {
  position: relative;
  width: min(100%, 515px);
  margin: 0;
  justify-self: end;
}

.hero-image-frame {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #303030;
}

.hero-image-frame::before,
.hero-image-frame::after {
  position: absolute;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-style: solid;
  border-color: var(--color-accent);
  content: "";
}

.hero-image-frame::before {
  top: 15px;
  left: 15px;
  border-width: 2px 0 0 2px;
}

.hero-image-frame::after {
  right: 15px;
  bottom: 15px;
  border-width: 0 2px 2px 0;
}

.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-orbit {
  position: absolute;
  z-index: 1;
  inset: 12%;
  border: 1px dashed rgba(242, 194, 48, 0.42);
  border-radius: 50%;
  animation: rotate 34s linear infinite;
}

.hero-joint {
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  border: 5px solid var(--color-accent);
  border-radius: 50%;
  background: var(--color-dark);
}

.hero-joint-a {
  top: 11%;
  right: 28%;
}

.hero-joint-b {
  right: 11%;
  bottom: 31%;
}

.hero-visual figcaption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 13px;
  color: rgba(255, 255, 255, 0.52);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.hero-index {
  position: absolute;
  right: var(--side-space);
  bottom: 22px;
  margin: 0;
  color: rgba(255, 255, 255, 0.4);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.13em;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

/* =============================================================
   作品紹介
============================================================= */
.works {
  padding-block: var(--section-space);
  background: #f7f8f8;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(48px, 6vw, 78px);
}

.work-card {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
}

.work-card-main {
  grid-column: span 2;
  grid-row: span 2;
}

.work-image {
  aspect-ratio: 1;
  overflow: hidden;
  background:
    linear-gradient(rgba(23, 33, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 33, 42, 0.035) 1px, transparent 1px),
    #e4e7e7;
  background-size: 24px 24px;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 360ms ease;
}

.work-card:hover .work-image img {
  transform: scale(1.025);
}

.work-card-dark .work-image {
  background: #303030;
}

.work-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 15px 18px;
}

.work-card figcaption span {
  color: var(--color-accent-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.work-card figcaption strong {
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-align: right;
}

/* =============================================================
   プロフィール
============================================================= */
.profile {
  padding-block: var(--section-space);
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(52px, 9vw, 130px);
  align-items: start;
}

.profile-heading {
  position: sticky;
  top: 36px;
}

.profile-copy {
  max-width: 720px;
  margin: 0;
  font-size: clamp(1.15rem, 2.1vw, 1.65rem);
  font-weight: 700;
  line-height: 2;
}

.name-origin {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
  margin-top: 42px;
  padding: 28px 0;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.detail-label {
  margin: 0;
  color: var(--color-accent-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.name-origin > p:last-child {
  margin: 0;
  font-weight: 700;
}

.profile-note {
  margin: 28px 0 0;
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 2;
}

/* =============================================================
   3つの特徴
============================================================= */
.features {
  padding-bottom: var(--section-space);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 54px;
  border-top: 1px solid var(--color-line);
  border-left: 1px solid var(--color-line);
}

.feature-card {
  min-height: 340px;
  padding: clamp(26px, 3.3vw, 44px);
  border-right: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  background: rgba(255, 255, 255, 0.55);
}

.feature-number {
  display: block;
  color: var(--color-accent-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.feature-icon {
  position: relative;
  width: 62px;
  height: 62px;
  margin: 52px 0 28px;
  border: 2px solid var(--color-dark);
  border-radius: 50%;
}

.feature-icon::before,
.feature-icon::after {
  position: absolute;
  top: calc(50% - 1px);
  height: 2px;
  background: var(--color-dark);
  content: "";
}

.feature-icon::before {
  right: 43px;
  width: 35px;
}

.feature-icon::after {
  left: 43px;
  width: 35px;
}

.feature-card:nth-child(2) .feature-icon {
  border-color: var(--color-accent-dark);
  transform: rotate(45deg);
}

.feature-card:nth-child(3) .feature-icon {
  border-style: dashed;
}

.feature-card h3 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.45;
}

.feature-card p {
  margin: 14px 0 0;
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.9;
}

/* =============================================================
   経歴・出展予定
============================================================= */
.history {
  padding-block: var(--section-space);
  background: var(--color-dark);
  color: #ffffff;
}

.history .section-label {
  color: #aeb8be;
}

.history-grid {
  display: grid;
  grid-template-columns: minmax(270px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(52px, 9vw, 130px);
}

.history-lead {
  max-width: 480px;
  margin: 28px 0 0;
  color: #bdc6cb;
  line-height: 2;
}

.timeline {
  margin: 8px 0 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 24px;
  padding: 29px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.timeline time {
  color: var(--color-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.timeline strong {
  display: block;
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  letter-spacing: 0.04em;
}

.timeline p {
  margin: 7px 0 0;
  color: #aeb8be;
  font-size: 0.92rem;
}

.timeline-future::after {
  position: absolute;
  top: 30px;
  right: 0;
  padding: 3px 8px;
  border: 1px solid rgba(242, 194, 48, 0.5);
  color: var(--color-accent);
  content: "SCHEDULED";
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

/* =============================================================
   公式サイトでの配布
============================================================= */
.downloads {
  padding: clamp(40px, 6vw, 84px) 0 0;
  background: #f7f8f8;
}

.download-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: clamp(44px, 8vw, 110px);
  padding: clamp(38px, 6vw, 76px);
  overflow: hidden;
  background: var(--color-accent);
}

.download-panel::after {
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border: 28px solid rgba(13, 20, 27, 0.09);
  border-radius: 50%;
  content: "";
}

.download-panel .section-label {
  color: rgba(13, 20, 27, 0.68);
}

.download-panel .section-label::before {
  background: var(--color-dark);
}

.download-panel h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.2;
  letter-spacing: -0.045em;
}

.download-copy {
  position: relative;
  z-index: 1;
  align-self: end;
}

.download-copy p {
  margin: 0;
  font-weight: 700;
  line-height: 2;
}

.text-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
  padding: 15px 0;
  border-top: 2px solid var(--color-dark);
  border-bottom: 2px solid var(--color-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.text-link::after {
  content: "↗";
  font-size: 1.15rem;
}

/* =============================================================
   公式リンク
============================================================= */
.links {
  padding-block: var(--section-space);
  background: #f7f8f8;
}

.link-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 52px;
  border-top: 1px solid var(--color-line);
}

.link-card {
  display: flex;
  flex-direction: column;
  min-height: 245px;
  padding: 32px;
  border-right: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  background: var(--color-surface);
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

.link-card:first-child {
  border-left: 1px solid var(--color-line);
}

.link-card:hover {
  background: var(--color-accent);
  color: var(--color-dark);
}

.link-card small {
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.link-card strong {
  margin-top: auto;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  line-height: 1.25;
}

.link-arrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  color: var(--color-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.link-arrow::after {
  content: "↗";
  font-size: 1.1rem;
}

/* =============================================================
   フッター
============================================================= */
.site-footer {
  background: #070b0f;
  color: #ffffff;
}

.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  min-height: 250px;
  padding-block: 60px;
}

.footer-name {
  margin: 0;
  color: var(--color-accent);
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.footer-tagline {
  margin: 18px 0 0;
  color: #7f8c94;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.footer-copy {
  margin: 0;
  color: #8f9ba2;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* =============================================================
   タブレット表示
============================================================= */
@media (max-width: 980px) {
  .header-nav a:not(.nav-button) {
    display: none;
  }

  .hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 160px;
    padding-bottom: 92px;
  }

  .hero-visual {
    width: min(100%, 560px);
    justify-self: start;
  }

  .section-heading-row,
  .profile-grid,
  .history-grid,
  .download-panel {
    grid-template-columns: 1fr;
  }

  .profile-heading {
    position: static;
  }

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

  .work-card-main {
    grid-column: auto;
    grid-row: auto;
  }

  .feature-list,
  .link-list {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: auto;
  }

  .feature-icon {
    margin-top: 36px;
  }

  .link-card {
    min-height: 210px;
  }

  .link-card:not(:first-child) {
    border-left: 1px solid var(--color-line);
  }
}

/* =============================================================
   スマートフォン表示
============================================================= */
@media (max-width: 680px) {
  :root {
    --side-space: 20px;
  }

  .header-inner {
    min-height: 74px;
  }

  .header-nav .nav-button {
    padding: 8px 10px;
    font-size: 0.62rem;
  }

  .brand-mark {
    width: 29px;
    height: 29px;
  }

  .brand-mark::before {
    right: 22px;
  }

  .brand-mark::after {
    left: 22px;
  }

  .brand-name {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .hero-inner {
    gap: 56px;
    padding-top: 132px;
    padding-bottom: 76px;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 13.3vw, 4rem);
    letter-spacing: -0.07em;
  }

  .hero h1 span {
    white-space: normal;
  }

  .hero h1 .accent-line {
    white-space: nowrap;
  }

  .hero-description {
    margin-top: 24px;
    font-size: 0.95rem;
  }

  .hero-description br {
    display: none;
  }

  .button {
    width: 100%;
  }

  .hero-visual figcaption {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .hero-index {
    display: none;
  }

  .section-title {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .work-card figcaption {
    min-height: 64px;
  }

  .profile-copy {
    font-size: 1.08rem;
  }

  .name-origin {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .timeline li {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
  }

  .timeline-future::after {
    position: static;
    display: inline-block;
    grid-column: 2;
    width: fit-content;
    margin-top: 4px;
  }

  .download-panel {
    width: 100%;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
  }

  .footer-name {
    font-size: clamp(2.8rem, 18vw, 5rem);
  }
}

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

  .hero-orbit {
    animation: none;
  }

  .work-image img {
    transition: none;
  }
}
