/* ================================================
   murock.jp - Main Stylesheet
   ================================================ */

/* ---- Variables ---- */
:root {
  --color-bg: #0a0a0a;
  --color-bg2: #111111;
  --color-text: #f0f0f0;
  --color-text-muted: #888;
  --color-accent: #ff3b00;
  --color-accent2: #ff8c00;
  --color-white: #ffffff;
  --color-border: rgba(255,255,255,0.08);
  --font-primary: 'Space Grotesk', 'Noto Sans JP', sans-serif;
  --font-display: 'Anton', 'Noto Sans JP', sans-serif;
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --container-max: 1280px;
  --container-pad: clamp(1.5rem, 5vw, 4rem);
  --radius: 12px;
  --radius-lg: 20px;
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

ul { list-style: none; }

/* ---- Custom Cursor (Desktop Only) ---- */
@media (pointer: fine) {
  body { cursor: none; }

  .cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, background 0.2s;
    mix-blend-mode: difference;
  }

  .cursor-follower {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(255,59,0,0.6);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), width 0.3s, height 0.3s, opacity 0.3s;
  }

  .cursor-follower.is-hover {
    width: 60px;
    height: 60px;
    background: rgba(255,59,0,0.1);
    border-color: var(--color-accent);
  }
}

@media (pointer: coarse) {
  .cursor, .cursor-follower { display: none; }
}

/* ---- Loader ---- */
.loader {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.9s cubic-bezier(0.76, 0, 0.24, 1),
              visibility 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}

/* 背景グリッドライン */
.loader::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,59,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,59,0,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  animation: loaderGrid 0.6s ease 0.2s both;
}

@keyframes loaderGrid {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 放射光 */
.loader::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255,59,0,0.18) 0%, transparent 65%);
  border-radius: 50%;
  animation: loaderGlow 1.8s ease 0.3s infinite alternate;
}

@keyframes loaderGlow {
  from { width: 40vw; height: 40vw; opacity: 0.4; }
  to   { width: 90vw; height: 90vw; opacity: 1; }
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  text-align: center;
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
  opacity: 0;
  animation: loaderLogoIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
  filter: drop-shadow(0 0 60px rgba(255,59,0,0.5));
}

.loader-logo img {
  /* 画面いっぱいのロゴ */
  width: clamp(220px, 60vmin, 520px);
  height: auto;
  animation: loaderLogoPulse 2.5s ease-in-out 1.3s infinite;
}

@keyframes loaderLogoIn {
  0%   { opacity: 0; transform: scale(0.6) translateY(30px); filter: blur(20px); }
  60%  { opacity: 1; filter: blur(0px); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0px); }
}

@keyframes loaderLogoPulse {
  0%, 100% { filter: drop-shadow(0 0 40px rgba(255,59,0,0.4)); }
  50%       { filter: drop-shadow(0 0 80px rgba(255,140,0,0.7)); }
}

.loader-bar {
  width: clamp(200px, 40vw, 380px);
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.loader-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.04);
}

.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent2), #fff6);
  width: 0%;
  animation: loaderBar 1.6s cubic-bezier(0.4,0,0.2,1) 0.8s forwards;
  box-shadow: 0 0 12px rgba(255,59,0,0.8);
}

/* カウンター数字 */
.loader-count {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  color: rgba(255,59,0,0.12);
  letter-spacing: -0.05em;
  line-height: 1;
  user-select: none;
}

@keyframes loaderFadeIn {
  to { opacity: 1; }
}
@keyframes loaderBar {
  to { width: 100%; }
}

/* ---- Container ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ---- Typography ---- */
.section-tag {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1.0;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
  color: var(--color-white);
}

.section-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-body {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--color-text-muted);
  line-height: 1.9;
  max-width: 540px;
  margin-bottom: 2.5rem;
}

.section-header {
  margin-bottom: 4rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 100px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
  border-radius: inherit;
}

.btn:hover::before { transform: translateX(0); }

.btn--primary {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent2));
  color: var(--color-white);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,59,0,0.4);
}

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border: 1.5px solid rgba(255,255,255,0.3);
}

.btn--outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.btn--large {
  padding: 1.125rem 2.75rem;
  font-size: 1rem;
}

/* ---- Navigation ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 0;
  transition: var(--transition);
}

.header.is-scrolled {
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.nav {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  z-index: 101;
  line-height: 1;
}

.nav-logo img {
  height: 44px;
  width: auto;
  display: block;
  filter: brightness(1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-logo:hover img {
  opacity: 0.85;
  transform: scale(1.03);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.75);
  position: relative;
  transition: var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--color-white);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

.nav-link--cta {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent2));
  color: var(--color-white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-weight: 600;
}

.nav-link--cta::after { display: none; }

.nav-link--cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,59,0,0.4);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: var(--transition);
  transform-origin: center;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Section Layout ---- */
.section {
  padding: clamp(5rem, 10vw, 10rem) 0;
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  /* スマホで縦スクロールを妨げない */
  touch-action: pan-y;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg-default {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a00 50%, #0a0a0a 100%);
}

.hero-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px;
  opacity: 0.6;
}

.hero-lines {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-around;
}

.hero-line {
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(255,59,0,0.15), transparent);
  animation: lineGlow 3s ease-in-out infinite;
  will-change: opacity;
}

.hero-line:nth-child(2) { animation-delay: 0.6s; }
.hero-line:nth-child(3) { animation-delay: 1.2s; }
.hero-line:nth-child(4) { animation-delay: 1.8s; }
.hero-line:nth-child(5) { animation-delay: 2.4s; }

@keyframes lineGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,10,0.3) 0%, transparent 40%, rgba(10,10,10,0.8) 100%);
  z-index: 1;
}

.hero-video, .hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  padding-top: 8rem;
  /* スマホではパラックス無効のため transform を固定して合成レイヤーを節約 */
}

@media (pointer: coarse) {
  .hero-content {
    will-change: auto;
    transform: none !important;
    transition: none !important;
  }
  .hero-bg-default {
    will-change: auto;
    transform: none !important;
  }
  .hero-orb {
    will-change: auto;
    transform: none !important;
  }
}

.hero-tag {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 1.8s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 14vw, 12rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
  display: block;
}

.hero-title-line {
  display: block;
  overflow: hidden;
}

.hero-title-line span {
  display: block;
  transform: translateY(110%);
  animation: revealTitle 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title-line:nth-child(1) span { animation-delay: 0.6s; }
.hero-title-line:nth-child(2) span { animation-delay: 0.8s; }

.hero-desc {
  font-size: clamp(0.95rem, 2vw, 1.125rem);
  color: rgba(255,255,255,0.65);
  max-width: 520px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 1.4s forwards;
  line-height: 1.9;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 1.6s forwards;
}

.hero-scroll {
  position: absolute;
  bottom: 3rem;
  left: var(--container-pad);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 2s forwards;
}

.hero-scroll-line {
  width: 60px;
  height: 1px;
  background: rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}

.hero-scroll-line::after {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--color-accent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { left: -100%; }
  100% { left: 100%; }
}

.hero-float {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.float-tag {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
  font-weight: 600;
  animation: floatAnim 6s ease-in-out var(--delay) infinite;
}

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

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes revealTitle {
  from { transform: translateY(110%); }
  to { transform: translateY(0); }
}

/* ---- Marquee ---- */
.marquee-wrap {
  overflow: hidden;
  background: var(--color-accent);
  padding: 1rem 0;
}

.marquee {
  display: flex;
  white-space: nowrap;
  animation: marquee 20s linear infinite;
}

.marquee span {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  padding-right: 0;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---- Concept Section ---- */
.concept { background: var(--color-bg2); }

.concept-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.concept-visual {
  position: relative;
}

.concept-img,
.concept-img-placeholder {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.concept-img-placeholder,
.about-img-placeholder,
.portfolio-img-placeholder,
.blog-img-placeholder {
  background: #1e1e1e;
  border: 1px dashed rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-inner {
  text-align: center;
  color: rgba(255,255,255,0.3);
}

.placeholder-inner i {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
  color: rgba(255,59,0,0.4);
}

.placeholder-inner p {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: rgba(255,255,255,0.4);
}

.placeholder-inner code {
  font-size: 0.7rem;
  background: rgba(255,255,255,0.05);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  color: var(--color-accent2);
  font-family: monospace;
  word-break: break-all;
}

.concept-accent {
  position: absolute;
  bottom: -2rem;
  right: -2rem;
  width: 160px;
  height: 160px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent2));
  border-radius: 50%;
  opacity: 0.15;
  filter: blur(40px);
  z-index: -1;
}

/* ---- About Section ---- */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-visual {
  position: relative;
}

.about-img,
.about-img-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  object-fit: cover;
}

.about-badge {
  position: absolute;
  bottom: 2rem;
  right: -1rem;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent2));
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 8px 30px rgba(255,59,0,0.4);
}

.about-badge span {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}

.about-badge small {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  transition: var(--transition-fast);
}

.tag:hover {
  border-color: var(--color-accent);
  color: var(--color-white);
  background: rgba(255,59,0,0.1);
}

/* ---- Service Section ---- */
.service { background: var(--color-bg); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.service-card {
  background: var(--color-bg2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  animation-delay: var(--delay);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,59,0,0.2);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: rgba(255,59,0,0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent2));
}

.service-icon i {
  font-size: 1.25rem;
  color: var(--color-accent);
  transition: var(--transition);
}

.service-card:hover .service-icon i {
  color: var(--color-white);
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--color-white);
}

.service-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.service-cta {
  text-align: center;
}

.service-cta p {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* ---- Portfolio Preview ---- */
.portfolio-preview { background: var(--color-bg2); }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1.5rem;
  padding: 0 var(--container-pad);
  max-width: var(--container-max);
  margin: 0 auto 3rem;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  cursor: pointer;
}

.portfolio-item--large {
  grid-column: span 1;
  grid-row: span 2;
}

.portfolio-item-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 280px;
  overflow: hidden;
}

.portfolio-item--large .portfolio-item-inner {
  min-height: 580px;
}

.portfolio-item-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.portfolio-item:hover .portfolio-item-inner img {
  transform: scale(1.08);
}

.portfolio-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 280px;
}

.portfolio-item--large .portfolio-img-placeholder {
  min-height: 580px;
}

.portfolio-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transform: translateY(20px);
  opacity: 0;
  transition: var(--transition);
}

.portfolio-item:hover .portfolio-item-overlay {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-item-cat {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.portfolio-item-overlay h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
}

.portfolio-cta {
  text-align: center;
  padding: 0 var(--container-pad);
}

/* ---- Blog Preview ---- */
.blog-preview { background: var(--color-bg); }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.blog-card {
  background: var(--color-bg2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,59,0,0.2);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.blog-card-link { display: block; }

.blog-card-img {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

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

.blog-card:hover .blog-card-img img {
  transform: scale(1.05);
}

.blog-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 180px;
}

.blog-card-cat {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--color-accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
}

.blog-card-body {
  padding: 1.5rem;
}

.blog-card-date {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.5rem;
}

.blog-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.75rem;
  line-height: 1.5;
  transition: color 0.2s;
}

.blog-card:hover .blog-card-title {
  color: var(--color-accent);
}

.blog-card-excerpt {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-cta {
  text-align: center;
}

/* ---- Contact CTA ---- */
.contact-cta {
  background: linear-gradient(135deg, #0f0500 0%, #1a0800 50%, #0f0500 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,59,0,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.contact-cta-inner {
  position: relative;
  z-index: 1;
}

.contact-cta-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
  color: var(--color-white);
}

.contact-cta-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-cta p {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: rgba(255,255,255,0.6);
  margin-bottom: 2.5rem;
  line-height: 1.9;
}

/* ---- Footer ---- */
.footer {
  background: #050505;
  border-top: 1px solid var(--color-border);
  padding: 4rem 0 2rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-logo img {
  height: 40px;
  width: auto;
  display: block;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.footer-logo img:hover {
  opacity: 1;
}

.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
  letter-spacing: 0.05em;
}

.footer-nav a:hover {
  color: var(--color-white);
}

.footer-sns {
  display: flex;
  gap: 1rem;
}

.sns-link {
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.sns-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.1em;
}

/* ---- Scroll Reveal Animations ---- */
.reveal-up,
.reveal-mask,
.reveal-left,
.reveal-right,
.reveal-scale {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }
.reveal-scale { transform: scale(0.92); }

.reveal-mask {
  overflow: hidden;
  transform: none;
}

.reveal-mask .mask-inner {
  transform: translateY(100%);
  display: block;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.is-visible.reveal-up,
.is-visible.reveal-left,
.is-visible.reveal-right {
  opacity: 1;
  transform: none;
}

.is-visible.reveal-scale {
  opacity: 1;
  transform: scale(1);
}

.is-visible.reveal-mask {
  opacity: 1;
}

.is-visible.reveal-mask .mask-inner {
  transform: translateY(0);
}

/* Delay classes */
.delay-1 { transition-delay: 0.15s !important; }
.delay-2 { transition-delay: 0.3s !important; }
.delay-3 { transition-delay: 0.45s !important; }

/* Custom delay via --delay variable */
[style*="--delay"].reveal-up,
[style*="--delay"].reveal-scale {
  transition-delay: var(--delay) !important;
}

/* ================================================
   PAGE: Blog
   ================================================ */
.page-hero {
  padding: 10rem 0 5rem;
  text-align: center;
  background: var(--color-bg2);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(255,59,0,0.15) 0%, transparent 70%);
}

.page-hero-content {
  position: relative;
  z-index: 1;
}

.page-hero .section-tag {
  display: inline-block;
  margin-bottom: 1rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: 1;
  margin-bottom: 1.5rem;
}

.page-hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero p {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* Blog Filter */
.blog-filter {
  padding: 3rem 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.filter-list {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition-fast);
  background: transparent;
  border: 1px solid var(--color-border);
  color: rgba(255,255,255,0.6);
  font-family: var(--font-primary);
}

.filter-btn:hover,
.filter-btn.is-active {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent2));
  border-color: transparent;
  color: white;
}

/* Blog List */
.blog-list {
  padding: 5rem 0;
}

.blog-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* ================================================
   PAGE: Portfolio
   ================================================ */
.portfolio-list {
  padding: 5rem 0;
}

.portfolio-list-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.portfolio-list-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: var(--color-bg2);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.portfolio-list-item:hover {
  border-color: rgba(255,59,0,0.2);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.portfolio-list-item-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}

.portfolio-list-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-list-item:hover .portfolio-list-item-thumb img {
  transform: scale(1.05);
}

.portfolio-list-item-thumb .portfolio-img-placeholder {
  min-height: 240px;
}

.portfolio-list-item-body {
  padding: 1.5rem;
}

.portfolio-list-item-cat {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.portfolio-list-item-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.portfolio-list-item-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ================================================
   PAGE: About
   ================================================ */
.about-page { padding: 5rem 0; }

.about-page-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 6rem;
  align-items: start;
}

.about-page-img {
  position: sticky;
  top: 8rem;
}

.about-page-photo,
.about-page-photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  object-fit: cover;
  margin-bottom: 1.5rem;
}

.about-page-photo-placeholder {
  min-height: 400px;
}

.about-sns {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.about-sns-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  transition: var(--transition-fast);
}

.about-sns-link:hover {
  border-color: var(--color-accent);
  color: var(--color-white);
}

.about-page-text h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  margin-bottom: 1.5rem;
  color: var(--color-white);
}

.about-page-text h2 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-page-text h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--color-white);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.about-page-text h3::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--color-accent);
}

.about-page-text p {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.9;
  margin-bottom: 1rem;
}

.hobby-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.hobby-item {
  background: var(--color-bg2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition-fast);
}

.hobby-item:hover {
  border-color: rgba(255,59,0,0.2);
  background: rgba(255,59,0,0.05);
}

.hobby-icon {
  font-size: 2rem;
}

.hobby-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-white);
}

.hobby-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ================================================
   PAGE: Contact
   ================================================ */
.contact-page { padding: 5rem 0; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 5rem;
  align-items: start;
}

.contact-info h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1;
  margin-bottom: 1rem;
  color: var(--color-white);
}

.contact-info h2 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-info p {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.9;
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-detail-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

.contact-detail-item i {
  width: 40px;
  height: 40px;
  background: rgba(255,59,0,0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* Contact Form */
.contact-form-wrap {
  background: var(--color-bg2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.5rem;
}

.form-group .required {
  color: var(--color-accent);
  margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.875rem 1.25rem;
  font-size: 0.95rem;
  color: var(--color-text);
  font-family: var(--font-primary);
  transition: var(--transition-fast);
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(255,59,0,0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255,255,255,0.2);
}

.form-group textarea {
  min-height: 160px;
  resize: vertical;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  padding-right: 3rem;
}

.form-submit {
  width: 100%;
  padding: 1rem;
  justify-content: center;
  font-size: 1rem;
}

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}

.form-success i {
  font-size: 3rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
  display: block;
}

.form-success h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-white);
}

.form-success p {
  color: var(--color-text-muted);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1024px) {
  .concept-inner,
  .about-inner,
  .about-page-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-inner { }
  .about-visual { order: -1; }
  .about-page-img { position: static; }

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

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

  .portfolio-item--large {
    grid-column: span 1;
    grid-row: span 1;
  }

  .portfolio-item--large .portfolio-item-inner,
  .portfolio-item--large .portfolio-img-placeholder {
    min-height: 280px;
  }

  .blog-grid,
  .blog-list-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-list-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    inset: 0;
    background: rgba(10,10,10,0.98);
    backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  .nav-menu.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .nav-link {
    font-size: 1.5rem;
    letter-spacing: 0.1em;
  }

  .nav-link--cta {
    padding: 0.75rem 2rem;
    font-size: 1.25rem;
  }

  .nav-toggle { display: flex; }

  .hero-title {
    font-size: clamp(3.5rem, 18vw, 8rem);
  }

  .float-tag { display: none; }

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

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

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

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav {
    justify-content: center;
  }

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

  .about-badge {
    right: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .contact-form-wrap {
    padding: 1.5rem;
  }
}

/* ================================================
   EXTRA ANIMATIONS & TEXT-ONLY LAYOUTS
   ================================================ */

/* ---- Concept / About text-only layouts ---- */
.concept--text-only {
  background: var(--color-bg2);
  position: relative;
  overflow: hidden;
}

.concept--text-only::before {
  content: 'CONCEPT';
  position: absolute;
  right: -2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(6rem, 18vw, 18rem);
  color: rgba(255,255,255,0.025);
  white-space: nowrap;
  pointer-events: none;
  line-height: 1;
  letter-spacing: -0.05em;
}

.concept-text-only {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.concept-text-only .section-body {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.5rem;
}

.concept-title {
  font-size: clamp(2.4rem, 8vw, 7rem) !important;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

@media (max-width: 480px) {
  .concept-title {
    font-size: clamp(1.9rem, 8.5vw, 2.8rem) !important;
    white-space: nowrap;
    letter-spacing: -0.03em;
  }
}

/* About text-only */
.about--text-only {
  position: relative;
  overflow: hidden;
}

.about--text-only::before {
  content: 'ABOUT';
  position: absolute;
  left: -2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(6rem, 18vw, 18rem);
  color: rgba(255,255,255,0.025);
  white-space: nowrap;
  pointer-events: none;
  line-height: 1;
  letter-spacing: -0.05em;
}

.about-text-only {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text-only .section-body {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.about-text-only .about-tags {
  justify-content: center;
}

/* About page single column */
.about-page--text-only .about-page-grid--single {
  display: block;
  max-width: 800px;
  margin: 0 auto;
}

.about-page-text--full {
  width: 100%;
}

.about-page-text--full h2 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
  margin-bottom: 1.5rem;
  color: var(--color-white);
}

.about-page-text--full h2 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ================================================
   PARTICLE CANVAS
   ================================================ */
#particleCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

/* ================================================
   MAGNETIC BUTTON EFFECT
   ================================================ */
.btn {
  will-change: transform;
}

/* ================================================
   TEXT CHAR SPLIT ANIMATION
   ================================================ */
.char-split .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px) rotate(8deg);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.char-split.is-visible .char {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}

/* ================================================
   GLITCH HERO TITLE
   ================================================ */
.hero-title {
  position: relative;
}

.hero-title-line {
  position: relative;
  display: block;
  overflow: hidden;
}

.hero-title-line > span {
  display: block;
  transform: translateY(110%);
  animation: revealTitle 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform;
}

/* ================================================
   HOVER TILT CARDS
   ================================================ */
.service-card,
.blog-card,
.portfolio-item,
.portfolio-list-item {
  will-change: transform;
  transform-style: preserve-3d;
}

/* ================================================
   STAGGER SECTION NUMBER
   ================================================ */
.section-number {
  font-family: var(--font-display);
  font-size: clamp(5rem, 12vw, 10rem);
  line-height: 1;
  color: rgba(255,59,0,0.06);
  position: absolute;
  top: -1rem;
  right: 0;
  pointer-events: none;
  letter-spacing: -0.05em;
  user-select: none;
}

/* ================================================
   ANIMATED UNDERLINE on SECTION TITLES
   ================================================ */
.section-title-underline {
  position: relative;
  display: inline-block;
}

.section-title-underline::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent2));
  border-radius: 2px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.is-visible .section-title-underline::after {
  width: 100%;
}

/* ================================================
   GLOW PULSE on BTN primary hover
   ================================================ */
@keyframes glowPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,59,0,0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(255,59,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,59,0,0); }
}

.btn--primary:hover {
  animation: glowPulse 0.9s ease;
}

/* ================================================
   SCROLL-TRIGGERED LINE DRAW
   ================================================ */
.draw-line {
  position: relative;
}

.draw-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.draw-line.is-visible::after {
  width: 100%;
}

/* ================================================
   HERO FLOATING ORBS
   ================================================ */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0;
  animation: orbFloat 8s ease-in-out infinite;
}

.hero-orb--1 {
  width: clamp(200px, 40vw, 500px);
  height: clamp(200px, 40vw, 500px);
  background: radial-gradient(circle, rgba(255,59,0,0.2), transparent);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
  animation-duration: 10s;
}

.hero-orb--2 {
  width: clamp(150px, 30vw, 400px);
  height: clamp(150px, 30vw, 400px);
  background: radial-gradient(circle, rgba(255,140,0,0.15), transparent);
  bottom: 0%;
  right: -5%;
  animation-delay: 3s;
  animation-duration: 13s;
}

.hero-orb--3 {
  width: clamp(100px, 20vw, 280px);
  height: clamp(100px, 20vw, 280px);
  background: radial-gradient(circle, rgba(255,59,0,0.12), transparent);
  top: 50%;
  left: 50%;
  animation-delay: 1.5s;
  animation-duration: 7s;
}

@keyframes orbFloat {
  0%   { opacity: 0.6; transform: translate(0, 0) scale(1); }
  33%  { opacity: 0.9; transform: translate(30px, -20px) scale(1.05); }
  66%  { opacity: 0.5; transform: translate(-20px, 20px) scale(0.95); }
  100% { opacity: 0.6; transform: translate(0, 0) scale(1); }
}

/* ================================================
   NOISE TEXTURE OVERLAY (global)
   ================================================ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 256px;
  pointer-events: none;
  z-index: 9997;
  opacity: 0.5;
}

/* ================================================
   MARQUEE SPEED-UP ON HOVER
   ================================================ */
.marquee-wrap:hover .marquee {
  animation-duration: 10s;
}

/* ================================================
   SERVICE CARD NUMBER
   ================================================ */
.service-card-num {
  font-family: var(--font-display);
  font-size: 4rem;
  color: rgba(255,59,0,0.06);
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  line-height: 1;
  pointer-events: none;
  transition: color 0.4s ease;
}

.service-card:hover .service-card-num {
  color: rgba(255,59,0,0.12);
}

/* ================================================
   ANIMATED TAG
   ================================================ */
.anim-tag {
  animation: tagBob 3s ease-in-out infinite;
}

.anim-tag:nth-child(2) { animation-delay: 0.3s; }
.anim-tag:nth-child(3) { animation-delay: 0.6s; }
.anim-tag:nth-child(4) { animation-delay: 0.9s; }
.anim-tag:nth-child(5) { animation-delay: 1.2s; }

@keyframes tagBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ================================================
   CONTACT CTA GLITCH BG
   ================================================ */
.contact-cta {
  position: relative;
}

.contact-cta .glitch-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.contact-cta .glitch-bg span {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(8rem, 22vw, 22rem);
  color: rgba(255,59,0,0.03);
  white-space: nowrap;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  letter-spacing: -0.05em;
  animation: bgTextSlip 6s ease-in-out infinite;
}

@keyframes bgTextSlip {
  0%, 100% { clip-path: inset(0 0 0 0); transform: translate(-50%, -50%) skewX(0deg); }
  20%       { clip-path: inset(20% 0 60% 0); transform: translate(calc(-50% + 3px), -50%) skewX(-1deg); }
  40%       { clip-path: inset(60% 0 10% 0); transform: translate(calc(-50% - 3px), -50%) skewX(1deg); }
  60%       { clip-path: inset(30% 0 30% 0); transform: translate(-50%, -50%) skewX(0deg); }
}

/* ================================================
   SCROLL INDICATOR BOUNCE
   ================================================ */
.hero-scroll-line::after {
  animation: scrollLine 1.8s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { left: -100%; opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { left: 120%; opacity: 0; }
}

/* ================================================
   SECTION TRANSITION CURTAIN
   ================================================ */
.curtain-reveal {
  position: relative;
  overflow: hidden;
}

.curtain-reveal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1);
  z-index: 2;
}

.curtain-reveal.is-revealed::before {
  transform: scaleX(0);
  transform-origin: right;
}

/* ================================================
   TOUCH RIPPLE — タップ波紋エフェクト
   ================================================ */
.touch-ripple {
  position: fixed;
  left: 0; top: 0;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--rc, rgba(255,59,0,0.45));
  pointer-events: none;
  z-index: 9999;
  animation: touchRippleAnim 0.65s cubic-bezier(0.22,1,0.36,1) forwards;
  transform-origin: center;
}

@keyframes touchRippleAnim {
  0%   { transform: scale(0);   opacity: 1; }
  60%  { transform: scale(40);  opacity: 0.4; }
  100% { transform: scale(70);  opacity: 0; }
}

/* ================================================
   SWIPE INDICATOR — 端のスワイプ矢印
   ================================================ */
.swipe-indicator {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
}

.swipe-ind-left,
.swipe-ind-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  background: rgba(255,59,0,0.8);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 20px rgba(255,59,0,0.5);
}

.swipe-ind-left  { left: 12px; }
.swipe-ind-right { right: 12px; }

/* ================================================
   PAGE TRANSITION OVERLAY
   ================================================ */
.page-trans-overlay {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.76,0,0.24,1);
}

.page-trans-overlay.is-active {
  opacity: 1;
}

/* ================================================
   LONG PRESS BLAST TEXT
   ================================================ */
.longpress-blast {
  position: fixed;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 4rem);
  color: var(--color-accent);
  pointer-events: none;
  z-index: 9995;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  letter-spacing: 0.05em;
  text-shadow:
    0 0 20px rgba(255,59,0,0.8),
    0 0 60px rgba(255,59,0,0.4);
  white-space: nowrap;
}

.longpress-blast.is-active {
  animation: longBlast 0.9s cubic-bezier(0.16,1,0.3,1) forwards;
}

@keyframes longBlast {
  0%   { opacity: 0;   transform: translate(-50%,-50%) scale(0.4); }
  20%  { opacity: 1;   transform: translate(-50%,-50%) scale(1.15); }
  60%  { opacity: 0.9; transform: translate(-50%,-60%) scale(1); }
  100% { opacity: 0;   transform: translate(-50%,-80%) scale(0.8); }
}

/* ================================================
   PULL TO REFRESH HINT
   ================================================ */
.pull-hint {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 36px;
  background: var(--color-accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 0.9rem;
  opacity: 0;
  z-index: 9993;
  pointer-events: none;
  box-shadow: 0 0 16px rgba(255,59,0,0.6);
  transition: none;
}

/* ================================================
   BURST PARTICLES — ピンチアウト炸裂
   ================================================ */
.burst-particle {
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  pointer-events: none;
  z-index: 9996;
  margin: -4px 0 0 -4px;
  animation: burstAnim 0.7s cubic-bezier(0.22,1,0.36,1) forwards;
}

.burst-particle:nth-child(3n)   { background: var(--color-accent2); }
.burst-particle:nth-child(3n+1) { background: #fff; width:4px; height:4px; }

@keyframes burstAnim {
  0%   { transform: translate(0,0) scale(1);   opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

/* ================================================
   DOUBLE TAP HEART
   ================================================ */
.tap-heart {
  position: fixed;
  font-size: 2rem;
  color: var(--color-accent);
  pointer-events: none;
  z-index: 9994;
  transform: translate(-50%, -50%);
  text-shadow: 0 0 20px rgba(255,59,0,0.7);
  animation: heartFloat 0.8s cubic-bezier(0.16,1,0.3,1) forwards;
  user-select: none;
}

@keyframes heartFloat {
  0%   { opacity: 1;   transform: translate(-50%,-50%) scale(0.6); }
  40%  { opacity: 1;   transform: translate(-50%,-80%) scale(1.4); }
  100% { opacity: 0;   transform: translate(-50%,-130%) scale(0.9); }
}

/* ================================================
   BUTTON HOLD GLOW
   ================================================ */
.btn--primary.is-glowing,
.nav-link--cta.is-glowing {
  box-shadow:
    0 0 0 4px rgba(255,59,0,0.3),
    0 0 30px rgba(255,59,0,0.6),
    0 0 60px rgba(255,59,0,0.3);
  transform: scale(1.04);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

/* ================================================
   SECTION FLASH
   ================================================ */
.section-flash {
  position: fixed;
  inset: 0;
  background: rgba(255,59,0,0.04);
  pointer-events: none;
  z-index: 9989;
  opacity: 0;
}

.section-flash.is-active {
  animation: sectionFlashAnim 0.5s ease forwards;
}

@keyframes sectionFlashAnim {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* ================================================
   GYRO PERMIT BUTTON
   ================================================ */
.gyro-permit-btn {
  position: fixed;
  bottom: 5rem;
  right: 1rem;
  width: 44px; height: 44px;
  background: rgba(255,59,0,0.15);
  border: 1px solid rgba(255,59,0,0.3);
  border-radius: 50%;
  color: var(--color-accent);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  animation: gyroBtnPulse 2s ease-in-out infinite;
}

@keyframes gyroBtnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,59,0,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(255,59,0,0); }
}

/* ================================================
   BLOG CARD — タッチスワイプ時の視覚フィードバック
   ================================================ */
.blog-card {
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
  user-select: none;
}

/* ================================================
   SCROLL MOMENTUM GLOW — スクロール速度でゲージ光る
   ================================================ */
@keyframes momentumGlow {
  0%   { filter: brightness(1); }
  50%  { filter: brightness(1.4) drop-shadow(0 0 6px rgba(255,59,0,0.8)); }
  100% { filter: brightness(1); }
}

/* ================================================
   STAGGERED FADE IN — スマホ向けカード表示
   ================================================ */
@media (max-width: 768px) {
  .blog-card:nth-child(1)  { animation-delay: 0s; }
  .blog-card:nth-child(2)  { animation-delay: 0.07s; }
  .blog-card:nth-child(3)  { animation-delay: 0.14s; }
  .blog-card:nth-child(4)  { animation-delay: 0.21s; }
  .blog-card:nth-child(5)  { animation-delay: 0.28s; }
  .blog-card:nth-child(6)  { animation-delay: 0.35s; }

  .service-card:nth-child(1) { animation-delay: 0s; }
  .service-card:nth-child(2) { animation-delay: 0.08s; }
  .service-card:nth-child(3) { animation-delay: 0.16s; }
  .service-card:nth-child(4) { animation-delay: 0.24s; }
}

/* ================================================
   MOBILE ACTIVE STATES — タップ時の視覚フィードバック
   ================================================ */
@media (pointer: coarse) {
  .blog-card:active,
  .portfolio-item:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
  }

  .btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }

  .nav-link:active {
    color: var(--color-accent);
  }

  .service-card:active {
    border-color: rgba(255,59,0,0.4);
    transform: translateY(-2px);
    transition: all 0.1s ease;
  }

  /* タッチ向けにタップ領域を広げる */
  .nav-link,
  .footer-nav a,
  .sns-link {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ================================================
   SCROLL REVEAL — より滑らかなスマホ向け設定
   ================================================ */
@media (max-width: 768px) {
  .reveal-up {
    transition-duration: 0.5s;
  }
  .reveal-left,
  .reveal-right {
    /* スマホでは横移動を抑制 */
    transform: translateY(30px) !important;
  }
  .reveal-left.is-visible,
  .reveal-right.is-visible {
    transform: translateY(0) !important;
  }
}

/* ================================================
   HERO SCROLL DOWN — バウンスアニメ強化
   ================================================ */
.hero-scroll-indicator {
  animation: heroScrollBounce 2.2s ease-in-out infinite;
}

@keyframes heroScrollBounce {
  0%, 100% { transform: translateY(0) rotate(0deg);   opacity: 0.6; }
  25%       { transform: translateY(6px) rotate(0deg);  opacity: 1; }
  50%       { transform: translateY(0) rotate(0deg);   opacity: 0.6; }
  75%       { transform: translateY(4px) rotate(0deg);  opacity: 0.9; }
}

/* ================================================
   LOADER — スマホ用フルスクリーン強化
   ================================================ */
@media (max-width: 768px) {
  .loader-logo img {
    width: min(70vw, 320px) !important;
    height: auto !important;
    max-height: 40vh;
    object-fit: contain;
  }

  .loader-count {
    font-size: clamp(3rem, 12vw, 5rem);
  }
}

/* ================================================
   FOOTER — スマホ用タップエリア強化
   ================================================ */
@media (max-width: 768px) {
  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: center;
  }

  .footer-nav a {
    padding: 0.5rem 0.75rem;
    border-radius: 100px;
    background: rgba(255,255,255,0.04);
    font-size: 0.8rem;
  }

  .sns-link {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
}

/* ================================================
   BLOG CARD — スマホ用ホバー→タップ置換
   ================================================ */
@media (pointer: coarse) {
  .blog-card-link:active .blog-card-img img {
    transform: scale(1.04);
    transition: transform 0.3s ease;
  }

  .blog-card:active .blog-card-body {
    color: var(--color-accent);
  }
}

/* ================================================
   NAV MENU ANIMATION — アイテムがスタッガー登場
   ================================================ */
@media (max-width: 768px) {
  .nav-menu.is-open .nav-list li {
    animation: navItemIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
  }

  .nav-menu.is-open .nav-list li:nth-child(1) { animation-delay: 0.05s; }
  .nav-menu.is-open .nav-list li:nth-child(2) { animation-delay: 0.10s; }
  .nav-menu.is-open .nav-list li:nth-child(3) { animation-delay: 0.15s; }
  .nav-menu.is-open .nav-list li:nth-child(4) { animation-delay: 0.20s; }
  .nav-menu.is-open .nav-list li:nth-child(5) { animation-delay: 0.25s; }
  .nav-menu.is-open .nav-list li:nth-child(6) { animation-delay: 0.30s; }
  .nav-menu.is-open .nav-list li:nth-child(7) { animation-delay: 0.35s; }
}

@keyframes navItemIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

