/* sixpence.esq portfolio
   テーマ: ライト/ダーク自動(prefers-color-scheme)。アクセントはバーントオレンジ1色に固定。
   角丸ルール: カード・画像 14px / ボタンはピル。この2つ以外の角丸を作らない。 */

:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --text: #1b1b1f;
  --text-2: #55555e;
  --line: rgba(20, 20, 30, 0.12);
  --accent: #b3511e;          /* リンク・小要素用。白背景でAA(4.5:1)を満たす濃さ */
  --accent-strong: #c95f24;   /* ボタン背景用 */
  --on-accent: #1c1006;
  --shadow: 0 16px 40px -20px rgba(40, 30, 20, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101013;
    --surface: #17171c;
    --text: #ececef;
    --text-2: #a4a4ae;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #e08a4a;
    --accent-strong: #d67934;
    --on-accent: #1a0f04;
    --shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.7);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", Meiryo, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

::selection { background: var(--accent-strong); color: var(--on-accent); }

/* ---- hero ---- */

.hero { padding: 88px 0 72px; }

.brand {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--text-2);
  margin: 0 0 28px;
}

h1 {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  max-width: 22ch;
}

.hero-sub {
  color: var(--text-2);
  font-size: 1.05rem;
  max-width: 40ch;
  margin: 0 0 32px;
}

.btn {
  display: inline-block;
  background: var(--accent-strong);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  padding: 13px 30px;
  border-radius: 999px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: scale(0.98); }

/* ---- works ---- */

main { padding-bottom: 96px; }

h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0 0 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.project { margin-bottom: 88px; }
.project:last-child { margin-bottom: 0; }

.split {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 48px;
  align-items: center;
}
.split.flip .shot { order: 2; }
.split.flip .body { order: 1; }

.full { display: grid; gap: 32px; }
.full .body { max-width: 62ch; }

.shot {
  display: block;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.shot:hover { transform: translateY(-4px); }
.shot .pc {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
/* スマホ表示のスクショをPCスクショの右下に重ねる */
.shot .sp {
  position: absolute;
  right: 3.5%;
  bottom: 6%;
  width: 21%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

h3 { font-size: 1.35rem; margin: 0 0 10px; letter-spacing: -0.01em; }

.body p { color: var(--text-2); margin: 0 0 18px; }

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 20px;
}
.tags li {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
}

.applink {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.applink:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---- footer ---- */

footer { border-top: 1px solid var(--line); padding: 40px 0 56px; }
.foot .brand { margin: 0 0 16px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 16px; }
.foot nav a { color: var(--text-2); text-decoration: none; font-size: 0.9rem; }
.foot nav a:hover { color: var(--accent); }
.copy { color: var(--text-2); font-size: 0.8rem; margin: 0; }

/* ---- motion ---- */

/* JSがhtmlに.js-revealを付けた時だけ初期非表示にする(JS無効でも全文が見える) */
.js-reveal .reveal { opacity: 0; transform: translateY(24px); }
.js-reveal .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-reveal .reveal { opacity: 1; transform: none; }
  .shot, .btn { transition: none; }
  .shot:hover { transform: none; }
}

/* ---- mobile ---- */

@media (max-width: 860px) {
  .hero { padding: 64px 0 56px; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .split.flip .shot { order: 0; }
  .split.flip .body { order: 1; }
  .project { margin-bottom: 64px; }
}
