:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #10182b;
  --muted: #5b6472;
  --line: #e1e6f0;
  --accent: #1e40c4;
  --accent-light: #eaf1fd;
  --cta: #f2701f;
  --radius: 18px;
  --font: "Zen Kaku Gothic New", "Inter", "Hiragino Kaku Gothic ProN", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  background: rgba(246, 248, 251, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: "Inter", var(--font);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-decoration: none;
}

.logo-dot { color: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav a {
  font-family: "Inter", var(--font);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, opacity 0.2s;
}

.site-nav a:hover { border-bottom-color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(72px, 12vw, 140px) clamp(20px, 5vw, 56px) clamp(56px, 8vw, 100px);
  max-width: 1080px;
  margin: 0 auto;
}

/* ---------- hero figure ---------- */
.hero-figure {
  position: relative;
  margin: 0;
  justify-self: end;
}

/* 円形イラスト(透過PNG)。ページ背景色の隙間+インクのリングで、彩度の高いイラストをY STUDIOの配色に馴染ませる */
.hero-figure img {
  position: relative;
  z-index: 1;
  display: block;
  width: clamp(220px, 30vw, 360px);
  height: auto;
  border-radius: 50%;
  box-shadow:
    0 0 0 6px var(--bg),
    0 0 0 9px var(--ink),
    0 24px 48px rgba(16, 16, 16, 0.18);
  animation: hero-float 4.5s ease-in-out infinite;
}

.shape { position: absolute; z-index: 0; }

.shape-tri {
  top: -5%;
  right: -3%;
  width: clamp(34px, 3.6vw, 52px);
  height: clamp(34px, 3.6vw, 52px);
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.shape-tri2 {
  top: -5%;
  right: calc(-3% - clamp(38px, 4vw, 58px));
  width: clamp(34px, 3.6vw, 52px);
  height: clamp(34px, 3.6vw, 52px);
  background: var(--ink);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

.shape-square {
  right: -11%;
  top: 47%;
  width: clamp(30px, 3.2vw, 46px);
  height: clamp(30px, 3.2vw, 46px);
  background: var(--cta);
}

.shape-circle {
  left: -9%;
  bottom: 3%;
  width: clamp(52px, 5.6vw, 80px);
  height: clamp(52px, 5.6vw, 80px);
  border-radius: 50%;
  background: var(--ink);
}

.shape-dot {
  left: 3%;
  bottom: 0;
  width: clamp(24px, 2.5vw, 36px);
  height: clamp(24px, 2.5vw, 36px);
  border-radius: 50%;
  background: var(--accent);
}

/* Qujiraのくじらモチーフ。Loglassの青いブランドマークと被らないよう黒基調で。3頭の群れにする */
.shape-whale,
.shape-whale-mid,
.shape-whale-small {
  height: auto;
  color: var(--ink);
}

.shape-whale {
  left: -10%;
  top: -6%;
  width: clamp(52px, 5.6vw, 78px);
  opacity: 0.92;
  animation: hero-float 4.5s ease-in-out infinite;
}

.shape-whale-mid {
  left: -17%;
  top: 15%;
  width: clamp(30px, 3.2vw, 44px);
  opacity: 0.8;
  animation: hero-float 4.5s ease-in-out infinite -1.1s;
}

.shape-whale-small {
  left: -7%;
  top: 29%;
  width: clamp(19px, 2vw, 28px);
  opacity: 0.65;
  animation: hero-float 4.5s ease-in-out infinite -2.3s;
}

@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-figure img,
  .shape-whale,
  .shape-whale-mid,
  .shape-whale-small { animation: none; }
}

@media (max-width: 680px) {
  .hero { grid-template-columns: 1fr; }
  .hero-figure { justify-self: center; }
  .hero-figure img { width: clamp(180px, 48vw, 240px); }
}

.hero-eyebrow {
  font-family: "Inter", var(--font);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.6rem, 7.5vw, 4.8rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.04em;
}

.hero-lead {
  margin-top: 28px;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  color: var(--muted);
}

/* 見出しのマーカー風ハイライト */
.hl {
  background: linear-gradient(transparent 62%, var(--accent-light) 62%, var(--accent-light) 94%, transparent 94%);
  padding: 0 0.06em;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 12px 26px;
  border-radius: 999px;
  transition: transform 0.2s, background 0.2s;
}

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

.btn svg { width: 14px; height: 14px; }

.btn-primary {
  background: var(--cta);
  color: #ffffff;
}

.btn-primary:hover { background: #d95f11; }

.btn-ghost {
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover { background: var(--accent-light); border-color: var(--accent); }

/* ---------- products ---------- */
.products {
  position: relative;
  overflow: hidden;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 56px) clamp(72px, 10vw, 120px);
}

/* 見出し脇の小さなくじらアイコン */
.heading-whale {
  width: clamp(22px, 2.4vw, 30px);
  height: auto;
  color: var(--ink);
  align-self: center;
}

/* Products/Serviceの背景にうっすら泳ぐ大きなくじら */
.watermark-whale {
  position: absolute;
  top: 8px;
  right: -70px;
  width: clamp(260px, 34vw, 440px);
  height: auto;
  color: var(--ink);
  opacity: 0.045;
  pointer-events: none;
  z-index: -1;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 36px;
}

.section-head h2 {
  position: relative;
  font-family: "Inter", var(--font);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  letter-spacing: 0.06em;
  padding-bottom: 14px;
}

/* Loglassの見出し下の短いアンダーラインを踏襲 */
.section-head h2::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: 0;
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.count {
  font-family: "Inter", var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  /* buttonは高さが余ると内容が縦中央に寄るため、flex縦積みで上詰めにする */
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  padding: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-visual { flex-shrink: 0; }

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(16, 16, 16, 0.09);
}

.card-visual {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background: var(--accent-light);
  border-bottom: 1px solid var(--line);
}

.card-visual img {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  box-shadow: 0 8px 20px rgba(16, 16, 16, 0.14);
}

.card-body { padding: 18px 20px 20px; }

.card-name {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

.card-tagline {
  margin-top: 5px;
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.6;
  /* taglineが長くても3行目以降であふれさせず、カードの縦幅を揃える */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-date {
  display: block;
  margin-top: 12px;
  font-family: "Inter", var(--font);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: #9aa3b5;
}

/* Products直下に続くセクションは上を詰める */
.products.services { padding-top: 0; }

/* ---------- empty state ---------- */
.empty {
  grid-column: 1 / -1;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 64px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; }

.modal[hidden] { display: none; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(16, 16, 16, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade-in 0.2s ease;
}

.modal-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 40px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--panel);
  border-radius: 22px;
  padding: clamp(22px, 5vw, 40px);
  box-shadow: 0 30px 80px rgba(16, 16, 16, 0.25);
  animation: pop-in 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

@keyframes fade-in { from { opacity: 0; } }

@keyframes pop-in {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #eef1f6;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-close:hover { background: var(--line); }

.modal-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  box-shadow: 0 10px 26px rgba(16, 16, 16, 0.16);
}

.modal-name {
  margin-top: 14px;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.modal-tagline {
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--muted);
}

.modal-desc {
  margin-top: 14px;
  font-size: 0.94rem;
  line-height: 1.72;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.modal-date {
  font-family: "Inter", var(--font);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
}

.modal-tags {
  font-family: "Inter", var(--font);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.modal-link {
  display: inline-block;
  margin-top: 18px;
  background: var(--cta);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  padding: 11px 24px;
  border-radius: 999px;
  transition: transform 0.2s, background 0.2s;
}

.modal-link:hover {
  background: #d95f11;
  transform: translateY(-2px);
}

body.modal-open { overflow: hidden; }

/* ---------- footer ---------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 32px clamp(20px, 5vw, 56px);
  text-align: center;
  font-family: "Inter", var(--font);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.footer-whale {
  width: 22px;
  height: auto;
  color: var(--ink);
  opacity: 0.7;
}
