/*
Theme Name: Relion Works
Theme URI: https://relionworks.com
Author: 木屋 大地
Description: Relion Works オリジナルWordPressテーマ
Version: 1.0
Requires at least: 6.0
Text Domain: relionworks
*/

:root {
  --ink: #0a0a0f;
  --white: #f8f7f4;
  --accent: #2563eb;
  --accent2: #06b6d4;
  --muted: #6b7280;
  --border: #e5e3dc;
  --surface: #f1f0ec;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--white);
  color: var(--ink);
  overflow-x: hidden;
}

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 3rem;
  background: rgba(248,247,244,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
nav.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,.07); }
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.35rem;
  letter-spacing: -.02em;
  color: var(--ink); text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-size: .85rem; font-weight: 500; letter-spacing: .04em;
  color: var(--muted); text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--accent); color: #fff;
  padding: .55rem 1.4rem; border-radius: 100px;
  font-size: .82rem; font-weight: 500;
  text-decoration: none; letter-spacing: .03em;
  transition: background .2s, transform .15s;
}
.nav-cta:hover { background: #1d4ed8; transform: translateY(-1px); }
.nav-logo img {
  height: 36px;
  width: auto;
  display: block;
  /* ロゴが黒なので背景色に合わせて調整 */
  filter: invert(0);
}

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 7rem 3rem 4rem;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(37,99,235,.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(6,182,212,.07) 0%, transparent 55%);
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(10,10,15,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,10,15,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 60% 40%, black 30%, transparent 70%);
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1160px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; font-weight: 500; letter-spacing: .1em;
  color: var(--accent);
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.2);
  padding: .35rem .85rem; border-radius: 100px;
  margin-bottom: 1.5rem;
  animation: fadeUp .6s ease both;
}
.hero-tag::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}
.hero-h1 {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700; font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.55; letter-spacing: -.01em;
  margin-bottom: 1.5rem;
  animation: fadeUp .6s .1s ease both;
}
.hero-h1 em {
  font-style: normal; color: var(--accent);
  position: relative;
}
.hero-h1 em::after {
  content: '';
  position: absolute; bottom: 2px; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  animation: underline 1s .8s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes underline { to { transform: scaleX(1); } }
.hero-sub {
  font-size: 1rem; color: var(--muted); line-height: 1.8;
  margin-bottom: 2.5rem;
  animation: fadeUp .6s .2s ease both;
}
.hero-btns {
  display: flex; gap: 1rem; flex-wrap: wrap;
  animation: fadeUp .6s .3s ease both;
}
.btn-primary {
  background: var(--accent); color: #fff;
  padding: .85rem 2rem; border-radius: 100px;
  font-size: .9rem; font-weight: 500;
  text-decoration: none; letter-spacing: .02em;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(37,99,235,.3);
}
.btn-primary:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(37,99,235,.35); }
.btn-secondary {
  color: var(--ink); padding: .85rem 2rem; border-radius: 100px;
  font-size: .9rem; font-weight: 500; text-decoration: none;
  border: 1.5px solid var(--border);
  transition: border-color .2s, transform .15s;
}
.btn-secondary:hover { border-color: var(--ink); transform: translateY(-2px); }

/* hero visual */
.hero-visual { animation: fadeUp .6s .2s ease both; position: relative; }
.hero-card-stack { position: relative; height: 420px; }
.hero-card {
  position: absolute;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 8px 40px rgba(0,0,0,.08);
}
.card-main {
  width: 300px; left: 50%; transform: translateX(-50%);
  top: 40px; z-index: 3;
  background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
}
.card-main .card-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem; font-size: 1.3rem;
}
.card-main h3 { font-size: .95rem; font-weight: 700; margin-bottom: .35rem; }
.card-main p { font-size: .78rem; color: var(--muted); line-height: 1.6; }
.card-stat {
  width: 160px; right: 20px; top: 20px; z-index: 4;
  transform: rotate(2deg);
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: rotate(2deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(-8px); }
}
.card-stat .stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1;
}
.card-stat .stat-label { font-size: .72rem; color: var(--muted); margin-top: .25rem; }
.card-badge {
  width: 140px; left: 10px; bottom: 80px; z-index: 4;
  transform: rotate(-3deg);
  animation: float2 5s ease-in-out infinite;
}
@keyframes float2 {
  0%,100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(-10px); }
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; margin-bottom: .5rem; }
.card-badge .badge-text { font-size: .78rem; font-weight: 600; }
.card-badge .badge-sub { font-size: .7rem; color: var(--muted); margin-top: .15rem; }
.card-graph {
  width: 260px; left: 50%; transform: translateX(-50%);
  bottom: 10px; z-index: 2;
}
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 60px; margin-bottom: .75rem; }
.bar {
  flex: 1; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent2) 100%);
  opacity: .75;
}
.bar:nth-child(1) { height: 40%; }
.bar:nth-child(2) { height: 60%; }
.bar:nth-child(3) { height: 80%; }
.bar:nth-child(4) { height: 55%; }
.bar:nth-child(5) { height: 90%; opacity: 1; }
.bar:nth-child(6) { height: 70%; }
.graph-label { font-size: .72rem; color: var(--muted); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== SECTION BASE ===== */
section { padding: 6rem 3rem; }
.container { max-width: 1160px; margin: 0 auto; }
.section-label {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: .75rem;
}
.section-title {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 700; line-height: 1.4; margin-bottom: 1rem;
}
.section-desc { color: var(--muted); font-size: .95rem; line-height: 1.85; max-width: 520px; }

/* ===== SERVICES ===== */
#services { background: var(--surface); }
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 3rem; }
.service-card {
  background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 2.5rem;
  transition: box-shadow .3s, transform .3s; position: relative; overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s cubic-bezier(.16,1,.3,1);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover { box-shadow: 0 16px 48px rgba(0,0,0,.1); transform: translateY(-4px); }
.service-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1.5rem; }
.service-icon.blue { background: rgba(37,99,235,.1); }
.service-icon.cyan { background: rgba(6,182,212,.1); }
.service-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .75rem; }
.service-card p { font-size: .88rem; color: var(--muted); line-height: 1.85; margin-bottom: 1.5rem; }
.service-features { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.service-features li { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: .5rem; }
.service-features li::before { content: '✓'; color: var(--accent); font-weight: 700; font-size: .8rem; }

/* ===== NEWS ===== */
#news { background: #fff; }
.news-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2.5rem; }
.news-more { font-size: .82rem; color: var(--accent); text-decoration: none; display: flex; align-items: center; gap: .3rem; transition: gap .2s; }
.news-more:hover { gap: .6rem; }
.news-list { display: flex; flex-direction: column; gap: 0; }
.news-item {
  display: flex; align-items: baseline; gap: 2rem;
  padding: 1.4rem .5rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: background .2s; border-radius: 8px;
}
.news-item:hover { background: var(--surface); }
.news-date { font-family: 'Syne', sans-serif; font-size: .78rem; color: var(--muted); white-space: nowrap; min-width: 80px; }
.news-cat { font-size: .68rem; font-weight: 700; letter-spacing: .08em; background: rgba(37,99,235,.1); color: var(--accent); padding: .2rem .65rem; border-radius: 100px; white-space: nowrap; }
.news-title { font-size: .88rem; line-height: 1.6; flex: 1; }

/* ===== WORKS ===== */
#works { background: var(--surface); }
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 3rem; }
.work-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  transition: box-shadow .3s, transform .3s; text-decoration: none; color: inherit; display: block;
}
.work-card:hover { box-shadow: 0 12px 40px rgba(0,0,0,.1); transform: translateY(-4px); }
.work-thumb { height: 160px; display: flex; align-items: center; justify-content: center; font-size: 3rem; overflow: hidden; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-thumb.c1 { background: linear-gradient(135deg, #dbeafe, #e0f2fe); }
.work-thumb.c2 { background: linear-gradient(135deg, #dcfce7, #d1fae5); }
.work-thumb.c3 { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.work-thumb.c4 { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.work-thumb.c5 { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.work-body { padding: 1.25rem; }
.work-tag { font-size: .68rem; font-weight: 700; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; margin-bottom: .5rem; }
.work-body h3 { font-size: .88rem; font-weight: 700; line-height: 1.5; }

/* ===== CONTACT ===== */
#contact { background: var(--ink); color: var(--white); position: relative; overflow: hidden; }
#contact::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 80% 50%, rgba(37,99,235,.25) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(6,182,212,.15) 0%, transparent 50%);
}
.contact-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.contact-info .section-label { color: var(--accent2); }
.contact-info .section-title { color: var(--white); }
.contact-info .section-desc { color: rgba(248,247,244,.6); }
.contact-person { margin-top: 2.5rem; display: flex; align-items: center; gap: 1rem; }
.person-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #fff; font-weight: 700; flex-shrink: 0;
}
.person-name { font-weight: 700; font-size: .95rem; color: var(--white); }
.person-role { font-size: .75rem; color: rgba(248,247,244,.55); margin-top: .15rem; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-label { font-size: .75rem; font-weight: 500; color: rgba(248,247,244,.65); letter-spacing: .05em; }
.form-input, .form-textarea {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 10px;
  padding: .8rem 1rem; color: var(--white); font-size: .88rem; font-family: inherit;
  transition: border-color .2s, background .2s; outline: none; width: 100%;
}
.form-input::placeholder, .form-textarea::placeholder { color: rgba(248,247,244,.3); }
.form-input:focus, .form-textarea:focus { border-color: var(--accent); background: rgba(37,99,235,.1); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-submit {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #fff; border: none; cursor: pointer;
  padding: .95rem; border-radius: 10px;
  font-size: .9rem; font-weight: 600; font-family: inherit; letter-spacing: .02em;
  transition: opacity .2s, transform .15s;
}
.form-submit:hover { opacity: .9; transform: translateY(-1px); }
.form-notice { padding: .75rem 1rem; border-radius: 8px; font-size: .85rem; display: none; margin-top: .25rem; }
.form-notice.success { background: rgba(16,185,129,.2); color: #6ee7b7; display: block; }
.form-notice.error   { background: rgba(239,68,68,.2);  color: #fca5a5; display: block; }

.contact-detail {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  font-size: .85rem;
  color: rgba(248,247,244,.6);
  line-height: 1.8;
}
.contact-detail a {
  color: rgba(248,247,244,.6);
  text-decoration: none;
  transition: color .2s;
}
.contact-detail a:hover {
  color: var(--white);
}

/* ===== FOOTER ===== */
footer {
  background: #050508; color: rgba(248,247,244,.4);
  padding: 2.5rem 3rem; display: flex; justify-content: space-between; align-items: center;
}
.footer-logo { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.1rem; color: rgba(248,247,244,.7); }
.footer-logo span { color: var(--accent); }
.footer-copy { font-size: .75rem; }

/* ===== 単体ページ共通 ===== */
.single-wrap { max-width: 800px; margin: 0 auto; padding: 8rem 3rem 6rem; }
.single-wrap .post-meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.single-wrap .post-date { font-family: 'Syne', sans-serif; font-size: .78rem; color: var(--muted); }
.single-wrap .post-cat { font-size: .68rem; font-weight: 700; letter-spacing: .08em; background: rgba(37,99,235,.1); color: var(--accent); padding: .2rem .65rem; border-radius: 100px; }
.single-wrap h1 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); font-weight: 700; line-height: 1.5; margin-bottom: 2.5rem; }
.single-wrap .post-thumbnail { width: 100%; border-radius: 16px; overflow: hidden; margin-bottom: 2.5rem; }
.single-wrap .post-thumbnail img { width: 100%; height: auto; display: block; }
.single-wrap .post-content { font-size: .95rem; line-height: 2; color: #333; }
.single-wrap .post-content h2 { font-size: 1.2rem; font-weight: 700; margin: 2rem 0 1rem; padding-left: 1rem; border-left: 3px solid var(--accent); }
.single-wrap .post-content p { margin-bottom: 1.5rem; }
.single-wrap .post-content img { max-width: 100%; border-radius: 8px; margin: 1rem 0; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--accent); text-decoration: none; margin-top: 3rem; transition: gap .2s; }
.back-link:hover { gap: .7rem; }

/* ===== アーカイブ ===== */
.archive-wrap { max-width: 1160px; margin: 0 auto; padding: 8rem 3rem 6rem; }
.archive-wrap .page-heading { font-size: clamp(1.6rem, 2.5vw, 2.2rem); font-weight: 700; margin-bottom: 3rem; }

/* ===== SCROLL REVEAL ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  #hero { padding: 6rem 1.5rem 3rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-visual { display: none; }
  section { padding: 4rem 1.5rem; }
  .services-grid { grid-template-columns: 1fr; }
  .works-grid { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 3rem; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .single-wrap { padding: 7rem 1.5rem 4rem; }
  .archive-wrap { padding: 7rem 1.5rem 4rem; }
}
@media (max-width: 600px) {
  .works-grid { grid-template-columns: 1fr; }
  .news-item { flex-wrap: wrap; gap: .5rem; }
}