:root {
  --bg-body: #f5f6fb;
  --bg-hero: #ffffff;
  --bg-card: #ffffff;
  --bg-chip: #f1f4ff;
  --border-soft: #e2e4f0;
  --border-strong: #c7cbe5;
  --text-main: #111827;
  --text-muted: #6b7280;
  --accent-blue: #2563eb;
  --accent-pink: #ec4899;
  --accent-mint: #10b981;
  --accent-gold: #f59e0b;

  --radius: 16px;
  --radius-lg: 22px;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.10);
  --shadow-card: 0 10px 24px rgba(15, 23, 42, 0.08);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font: 15px/1.7 system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.08), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.08), transparent 55%),
    var(--bg-body);
}

/* Links */
a {
  color: var(--accent-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-main);
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}

.brand span {
  font-size: 15px;
}

.nav {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.nav a {
  color: var(--text-muted);
  font-weight: 500;
}

.nav a:hover {
  color: var(--text-main);
  text-decoration: none;
}

.nav .cta {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent-blue);
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-blue), #4f46e5);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.35);
}

/* Hero */
.hero {
  position: relative;
  padding: 44px 20px 45px;
  display: grid;
  place-items: center;
  /* overflow: hidden; */

  max-width: 1200px;
  margin: 0 auto 24px;
  /* 下の PROJECTS 見出しとの距離 */
}

.hero-inner {
  position: relative;
  max-width: 900px;
  width: 100%;
  padding: 40px 56px 36px;

  border-radius: var(--radius-lg);
  background-color: var(--bg-hero);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  text-align: center;
  z-index: 2;
  /* テキストを前面に */
}

/* ───────────────────────── */
/* Large desktop tuning      */
/* ───────────────────────── */
@media (min-width: 1280px) {
  .hero {
    padding-top: 80px;
    padding-bottom: 110px;
  }

  .hero-inner {
    max-width: 1200px;
    /* デスクトップでは横に広く */
    padding: 52px 72px 48px;
  }

  .hero h1 {
    font-size: clamp(34px, 2.6vw, 52px);
  }

  .lead {
    font-size: 16px;
  }
}

/* subtle grid backdrop */
.hero-inner::before {
  content: "";
  position: absolute;
  inset: 10px 12px;
  background-image:
    linear-gradient(90deg, rgba(148, 163, 184, 0.16) 1px, transparent 1px),
    linear-gradient(180deg, rgba(148, 163, 184, 0.16) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.45;
  mask-image: radial-gradient(circle at 15% 10%, transparent 0, transparent 130px, #000 180px, #000 100%);
  border-radius: calc(var(--radius-lg) - 2px);
  pointer-events: none;
}

.hero-inner>* {
  position: relative;
}

/* colorful cubic deco（PC・タブレット共通のベース） */
.orb {
  position: absolute;
  z-index: 3;
  width: 150px;
  height: 230px;
  right: 10px;
  /* 右寄せ */
  bottom: 35px;
  /* カード右下から少し出す */
  border-radius: 28px;
  background-image: linear-gradient(135deg, var(--accent-blue), var(--accent-pink));
  box-shadow:
    0 20px 40px rgba(15, 23, 42, 0.25),
    0 0 0 10px rgba(255, 255, 255, 0.9);
  transform: rotate(18deg);
  opacity: 0.9;
  pointer-events: none;
}

.orb::before,
.orb::after {
  content: "";
  position: absolute;
  border-radius: 22px;
  background-image: linear-gradient(135deg, var(--accent-mint), var(--accent-gold));
}

.orb::before {
  width: 120px;
  height: 120px;
  left: -40px;
  top: 32px;
  transform: rotate(-18deg);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.18);
}

.orb::after {
  width: 80px;
  height: 80px;
  right: 18px;
  bottom: -18px;
  transform: rotate(12deg);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

/* logo + text */
.hero-logo {
  display: block;
  margin: 0 auto 10px;
  width: clamp(200px, 60vw, 280px);
}

.hero-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(26px, 4.5vw, 40px);
  line-height: 1.18;
  letter-spacing: 0.02em;
}

.hero h1 .soft {
  display: block;
  font-size: 0.8em;
  color: var(--text-muted);
  font-weight: 500;
}

.lead {
  margin: 0 auto;
  margin-top: 8px;
  max-width: 560px;
  font-size: 15px;
  color: var(--text-muted);
}

.lead em {
  font-style: normal;
  color: var(--accent-pink);
  font-weight: 600;
}

/* generic button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background-color: #ffffff;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.12s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.btn.small {
  padding: 7px 12px;
  font-size: 13px;
}

.btn.primary {
  border-color: transparent;
  background-image: linear-gradient(135deg, var(--accent-blue), #4f46e5);
  color: #ffffff;
}

.btn.ghost {
  border-style: dashed;
  background-color: #f9fafb;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
  text-decoration: none;
}

/* Sections */
.section {
  padding: 26px 20px;
}

.section h2 {
  max-width: 1040px;
  margin: 0 auto 14px;
  font-size: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Cards */
.cards {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  padding: 18px 16px 16px;
  border-radius: var(--radius);
  background-color: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -40px auto auto -40px;
  width: 120px;
  height: 120px;
  border-radius: 24px;
  background-image: linear-gradient(135deg, var(--accent-blue), var(--accent-mint));
  opacity: 0.12;
  transform: rotate(-18deg);
}

.card:nth-child(2)::before {
  background-image: linear-gradient(135deg, var(--accent-pink), var(--accent-gold));
}

.card:nth-child(3)::before {
  background-image: linear-gradient(135deg, var(--accent-mint), var(--accent-blue));
}

.card>* {
  position: relative;
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background-color: #f3f4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card h3 {
  margin: 4px 0 4px;
  font-size: 17px;
}

.card p {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.tags span {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background-color: var(--bg-chip);
  border: 1px solid rgba(199, 203, 229, 0.7);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* About & Contact */
.about-container,
#contact p,
.contact-links {
  max-width: 1040px;
  margin: 0 auto;
}

.about-text {
  font-size: 14px;
  color: var(--text-muted);
}

.about-text br {
  display: none;
}

.section.last {
  padding-bottom: 70px;
}

.contact-links {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Footer */
.site-footer {
  padding: 16px 20px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  background-color: rgba(255, 255, 255, 0.96);
}

/* ───────────────────────── */
/* Mobile (max-width: 768px) */
/* ───────────────────────── */
@media (max-width: 768px) {

  /* ヘッダー：ロゴ消してナビ中央寄せ */
  .brand {
    display: none;
  }

  .site-header {
    justify-content: center;
    padding-inline: 16px;
  }

  .nav {
    width: auto;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 12px;
    font-size: 13px;
  }

  /* Hero 調整 */
  .hero {
    padding-top: 40px;
    padding-bottom: 72px;
    margin-bottom: 16px;
  }

  .hero-inner {
    padding: 28px 18px 24px;
  }

  .hero-inner::before {
    inset: 8px;
    background-size: 26px 26px;
  }

  /* カラフルキューブ：スマホ版 */
  .orb {
    z-index: 1;
    /* カードの裏に回る → 文字にかからない */
    width: 96px;
    height: 120px;
    right: -24px;
    bottom: -40px;
    border-radius: 18px;
  }

  .orb::before {
    width: 60px;
    height: 60px;
    left: -24px;
    top: 20px;
    border-radius: 14px;
  }

  .orb::after {
    width: 40px;
    height: 40px;
    right: 4px;
    bottom: -12px;
    border-radius: 14px;
  }

  /* セクション＆カード */
  .section {
    padding-inline: 16px;
  }

  .cards {
    gap: 14px;
  }

  .about-text br {
    display: inline;
  }
}