/* 合同会社Euphoric Programming — 1ページのコーポレートサイト
   トークン（BRAND.md §4-3。アクセントはオレンジ1色＋その淡色。オレンジの上に白文字は置かない） */
:root {
  --bg: #fffaf3;          /* 生成り */
  --bg-tint: #ffefdc;     /* 淡いオレンジ */
  --surface: #ffffff;
  --ink: #2b211b;         /* 墨（本文・線） */
  --ink-sub: #5e5048;     /* 補足 */
  --accent: #f97316;      /* オレンジ（面・装飾・墨文字の地） */
  --accent-soft: #ffd2a8;
  --accent-ink: #b84a08;  /* 文字用の濃いオレンジ */
  --on-ink: #f3e9e0;      /* 墨地の上の文字 */
  --line: #f1d9c2;
  --radius: 22px;
  --font-head: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  overflow-x: clip;
}
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.35; margin: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* Header */
.site-header { background: rgba(255, 250, 243, 0.92); border-bottom: 2px solid var(--ink); position: sticky; top: 0; z-index: 5; }
@supports (backdrop-filter: blur(8px)) { .site-header { backdrop-filter: blur(8px); } }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
/* ヘッダーはマーク＋社名の文字（ロックアップの筆記体はこの大きさでは読めないため、フッターで大きく使う） */
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; padding: 4px 0; font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.01em; }
.logo-mark { display: block; height: 44px; width: auto; aspect-ratio: 1182 / 1338; --logo-mark: var(--accent); }
.nav { list-style: none; display: flex; gap: 4px 6px; margin: 0; padding: 0; flex-wrap: wrap; font-size: 0.92rem; }
.nav a { display: inline-block; color: var(--ink); text-decoration: none; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.nav a:hover { background: var(--accent-soft); }

/* ---------- Hero（共通） ---------- */
.hero { position: relative; overflow: hidden; }
.hero-inner {
  position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center; gap: 32px; padding-top: 64px; padding-bottom: 96px;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 0.55em; margin: 0 0 22px; padding: 5px 16px 5px 12px;
  border-radius: 999px; background: var(--ink); color: var(--on-ink);
  font-family: var(--font-head); font-weight: 700; letter-spacing: 0.08em; font-size: 0.85rem;
}
.hero-kicker::before { content: ""; width: 0.7em; height: 0.7em; border-radius: 50%; background: var(--accent); }
.hero-title { font-size: clamp(2.1rem, 4.4vw, 3.9rem); font-weight: 800; letter-spacing: 0.01em; line-height: 1.32; }
/* ルビ風の英字: 「楽しく（Euphoric）」「技術（Programming）」。括弧は rp で残し、ルビ非対応環境・コピー時は括弧付きで出る */
.hero-title ruby { ruby-position: over; ruby-align: center; }
.hero-title rt {
  font-family: var(--font-head); font-size: 0.3em; font-weight: 800; letter-spacing: 0.08em;
  line-height: 1; padding-bottom: 0.25em; color: var(--ink);
}
.hero-title .hero-line:nth-child(2) { margin-top: 0.12em; }
.hero-line { display: block; }
.hl { padding: 0 0.06em; border-radius: 6px; }
.hero-lead { max-width: 30em; margin: 22px 0 32px; font-size: 1.08rem; font-weight: 500; line-height: 1.9; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5em; background: var(--ink); color: #fff; font-family: var(--font-head); font-weight: 800;
  text-decoration: none; padding: 14px 28px; border-radius: 999px; box-shadow: 0 5px 0 rgba(43, 33, 27, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn::after { content: "↓"; font-weight: 800; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 rgba(43, 33, 27, 0.28); text-decoration: none; }
.hero-art { width: 100%; max-width: 540px; justify-self: center; }
.hero-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.art-label { font-family: var(--font-head); font-weight: 800; font-size: 17px; fill: var(--ink); text-anchor: middle; letter-spacing: 0.04em; }
.hero-wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 48px; fill: var(--bg); }

/* 登場（読み込み時に一度だけ） */
.hero-copy > * { animation: rise 0.7s cubic-bezier(.2, .8, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.hero-art { animation: pop 0.8s cubic-bezier(.2, 1.3, .4, 1) 0.15s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: scale(0.9) rotate(-3deg); } }

/* ゆっくりした動き（約30秒で止まる。reduced-motion では最初から止める） */
.float { animation: float 5s ease-in-out 6; transform-box: fill-box; }
.f2 { animation-delay: -1.3s; } .f3 { animation-delay: -2.6s; } .f4 { animation-delay: -3.8s; }
@keyframes float { 50% { transform: translateY(-9px); } }
.flow { stroke-dasharray: 4 14; animation: flow 1.8s linear 16; }
@keyframes flow { to { stroke-dashoffset: -36; } }
.ring { transform-box: fill-box; transform-origin: center; animation: spin 40s linear 1; }
.ring--rev { animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.twinkle > * { animation: twinkle 2.6s ease-in-out 10; }
.twinkle .t2 { animation-delay: -0.9s; } .twinkle .t3 { animation-delay: -1.7s; }
@keyframes twinkle { 50% { opacity: 0.25; } }

/* ヒーロー: オレンジの面に、発想と技術（中心）が4つのサービスをつなぐ */
.hero--orbit { background: var(--accent); }
.hero--orbit .hl { background: linear-gradient(transparent 56%, var(--bg) 56% 94%, transparent 94%); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-tint { background: var(--bg-tint); }
.eyebrow { margin: 0 0 4px; font-family: var(--font-head); font-weight: 800; color: var(--accent-ink); letter-spacing: 0.14em; font-size: 0.85rem; text-transform: uppercase; }
.section-title { font-size: clamp(1.6rem, 3.6vw, 2.2rem); font-weight: 800; margin-bottom: 32px; }
.section-title::after { content: ""; display: block; width: 56px; height: 8px; border-radius: 8px; background: var(--accent); margin-top: 14px; }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px 56px; align-items: start; }
.about-text { margin: 0; font-size: clamp(1.1rem, 1.9vw, 1.3rem); line-height: 2; font-weight: 500; }
.name-chips { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.chip {
  display: inline-flex; align-items: baseline; gap: 0.6em; padding: 8px 18px; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--accent);
}
.chip-en { font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; }
.chip-ja { font-size: 0.9rem; color: var(--ink-sub); font-weight: 700; }
.chip--x { background: none; border: 0; box-shadow: none; padding: 0; font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; color: var(--accent-ink); }

/* Cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.card {
  position: relative; background: var(--surface); border-radius: var(--radius); padding: 26px 26px 24px;
  border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--accent);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translate(-2px, -3px); box-shadow: 9px 10px 0 var(--accent); }
/* 公開ページのスクリーンショット（ブラウザ枠） */
.shot {
  margin: -6px -6px 8px; border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--bg-tint);
}
.shot::before {
  content: ""; display: block; height: 18px; border-bottom: 2px solid var(--ink); background:
    radial-gradient(circle at 12px 50%, var(--ink) 3px, transparent 3.5px),
    radial-gradient(circle at 24px 50%, var(--ink) 3px, transparent 3.5px),
    radial-gradient(circle at 36px 50%, var(--ink) 3px, transparent 3.5px), #fff;
}
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.card-icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--ink); color: var(--ink); flex: none;
}
.card-icon svg { width: 28px; height: 28px; }
.card-tag { font-family: var(--font-head); font-weight: 700; font-size: 0.9rem; color: var(--ink-sub); letter-spacing: 0.06em; }
.card-title { font-size: 1.45rem; font-weight: 800; }
.card-sub { font-size: 0.85rem; font-weight: 700; color: var(--ink-sub); }
.card-text { margin: 0; }
.card-note { margin: 0; font-size: 0.9rem; color: var(--ink); background: var(--bg-tint); border-radius: 10px; padding: 4px 10px; align-self: flex-start; font-weight: 500; }
.card-link { margin-top: auto; padding-top: 6px; font-weight: 700; font-size: 0.95rem; }
.card-link::after { content: " ↗"; }
.services-note { margin: 32px 0 0; font-size: 0.9rem; color: var(--ink-sub); }

/* Message */
.message {
  position: relative; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--accent); padding: 36px 32px 28px; font-size: 1.05rem; line-height: 2;
}
.message::before {
  content: "\201C"; position: absolute; top: -30px; left: 22px; font-family: Georgia, serif; font-size: 5rem; line-height: 1;
  color: var(--accent); -webkit-text-stroke: 2px var(--ink);
}
.message p { margin: 0 0 1em; }
.message-sign { margin: 1.4em 0 0 !important; text-align: right; font-family: var(--font-head); font-weight: 800; }

/* Company info */
.info { margin: 0; background: var(--surface); border-radius: var(--radius); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--accent-soft); overflow: hidden; }
.info-row { display: grid; grid-template-columns: 9em 1fr; border-top: 1px solid var(--line); }
.info-row:first-child { border-top: 0; }
.info dt { margin: 0; padding: 16px 20px; font-weight: 700; background: #fff6ec; }
.info dd { margin: 0; padding: 16px 20px; }

/* Footer */
.site-footer { position: relative; background: var(--ink); color: var(--on-ink); padding: 88px 0 40px; }
.footer-wave { position: absolute; top: -1px; left: 0; width: 100%; height: 40px; fill: var(--bg-tint); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px 40px; justify-content: space-between; align-items: flex-end; }
.site-footer p { margin: 0; }
.footer-logo { display: block; width: clamp(150px, 22vw, 230px); height: auto; aspect-ratio: 2106 / 1338; --logo-mark: var(--accent); --logo-text: var(--on-ink); }
.footer-meta { text-align: right; }
.footer-name { font-family: var(--font-head); font-weight: 700; }
.footer-en { font-family: var(--font-body); font-weight: 500; margin-left: 0.5em; font-size: 0.9em; }
.copy { margin-top: 4px; }

/* Tablet / Mobile */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 8px; padding-top: 48px; padding-bottom: 80px; }
  .hero-art { max-width: 440px; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .header-inner { padding-top: 8px; padding-bottom: 8px; min-height: 0; }
  .logo-mark { height: 38px; }
  .wordmark { font-size: 1.05rem; gap: 8px; }
  .nav { font-size: 0.85rem; gap: 2px; margin-left: -10px; }
  .nav a { padding: 2px 8px; }
  .site-header { position: static; }
  .hero-inner { padding-top: 36px; padding-bottom: 64px; }
  .hero-lead { font-size: 1rem; margin: 18px 0 26px; }
  .hero-art { max-width: 360px; margin-top: 16px; }
  .section { padding: 64px 0; }
  .cards { grid-template-columns: 1fr; gap: 22px; }
  .card { padding: 22px 20px 20px; }
  .message { padding: 30px 20px 22px; font-size: 1rem; }
  .info-row { grid-template-columns: 1fr; }
  .info dt { padding: 12px 16px 4px; background: transparent; color: var(--ink-sub); font-size: 0.88rem; }
  .info dd { padding: 0 16px 14px; }
  .footer-meta { text-align: left; }
  .footer-en { display: block; margin-left: 0; }
  .name-chips { gap: 8px; }
  .chip { padding: 6px 12px; gap: 0.45em; }
  .chip-en { font-size: 1rem; }
  .chip-ja { font-size: 0.82rem; }
  .chip--x { font-size: 1.1rem; }
  .site-footer { padding-top: 72px; }
}

@media (min-width: 1600px) {
  .wrap { max-width: 1320px; }
  .hero-title { font-size: 4.3rem; }
  .hero-lead { font-size: 1.15rem; }
  .hero-art { max-width: 620px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:hover, .card:hover { transform: none; }
}
