/* =========================================================
   Fortria LLC — Corporate Site
   Tone: 上品・ミニマル / 明朝 × ゴシック / 余白多め
   ========================================================= */

:root {
  --bg: #f8f7f4;
  --bg-alt: #efede8;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-2: #4a4a4a;
  --ink-3: #8a8a86;
  --line: #dcd9d2;
  --accent: #8c7451;      /* muted bronze */
  --accent-dark: #6f5b3e;
  --serif: "Shippori Mincho", "Noto Serif JP", "Hiragino Mincho ProN", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --en: "Cormorant Garamond", "Shippori Mincho", serif;
  --max: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*,
*::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(--sans);
  font-size: 15px;
  line-height: 2;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(248, 247, 244, .92);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.logo {
  font-family: var(--en);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: .14em;
  line-height: 1;
}
.logo small {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .3em;
  color: var(--ink-3);
}
.global-nav ul { display: flex; gap: 40px; align-items: center; }
.global-nav a {
  position: relative;
  font-size: 13px;
  letter-spacing: .14em;
}
.global-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.global-nav a:hover::after,
.global-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.global-nav .nav-cta {
  padding: 10px 24px;
  border: 1px solid var(--ink);
  transition: background .3s, color .3s;
}
.global-nav .nav-cta::after { display: none; }
.global-nav .nav-cta:hover { background: var(--ink); color: var(--bg); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; padding: 0;
  cursor: pointer;
  position: relative;
  z-index: 60;
}
.menu-toggle span {
  position: absolute; left: 10px; right: 10px;
  height: 1px; background: var(--ink);
  transition: transform .4s var(--ease), top .4s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 18px; }
.menu-toggle span:nth-child(2) { top: 26px; }
.menu-open .menu-toggle span:nth-child(1) { top: 22px; transform: rotate(30deg); }
.menu-open .menu-toggle span:nth-child(2) { top: 22px; transform: rotate(-30deg); }

/* ---------- Common sections ---------- */
section { padding: clamp(88px, 12vw, 160px) 0; }
.section-alt { background: var(--bg-alt); }

.section-head { margin-bottom: clamp(48px, 7vw, 80px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--en);
  font-size: 15px;
  letter-spacing: .24em;
  color: var(--accent);
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--accent); }
.section-title {
  margin-top: 18px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.7;
  letter-spacing: .08em;
}
.lead {
  margin-top: 28px;
  color: var(--ink-2);
  max-width: 640px;
}

.btn {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 18px 40px;
  border: 1px solid var(--ink);
  font-size: 13px;
  letter-spacing: .16em;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background .35s var(--ease), color .35s var(--ease);
}
.btn::after {
  content: ""; width: 28px; height: 1px; background: currentColor;
  transition: width .35s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:hover::after { width: 40px; }
.btn-light { border-color: var(--bg); color: var(--bg); }
.btn-light:hover { background: var(--bg); color: var(--ink); }

.text-link {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px; letter-spacing: .14em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}

/* ---------- Hero (Top) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}
.hero-lines {
  position: absolute; inset: 0;
  pointer-events: none;
}
.hero-lines svg { width: 100%; height: 100%; }
.hero-lines path {
  fill: none; stroke: var(--line); stroke-width: 1;
  stroke-dasharray: 2400; stroke-dashoffset: 2400;
  animation: draw 3.2s var(--ease) forwards;
}
.hero-lines path:nth-child(2) { animation-delay: .3s; stroke: #e6e2da; }
.hero-lines path:nth-child(3) { animation-delay: .6s; stroke: rgba(140, 116, 81, .35); }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero .container { position: relative; }
.hero-en {
  font-family: var(--en);
  font-size: 15px;
  letter-spacing: .3em;
  color: var(--accent);
}
.hero-title {
  margin-top: 32px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 5.6vw, 64px);
  line-height: 1.6;
  letter-spacing: .1em;
}
.hero-title span { display: block; }
.hero-text {
  margin-top: 40px;
  max-width: 520px;
  color: var(--ink-2);
}
.hero-scroll {
  position: absolute; left: var(--gutter); bottom: 40px;
  font-family: var(--en); font-size: 12px; letter-spacing: .3em;
  color: var(--ink-3);
  writing-mode: vertical-rl;
  display: flex; align-items: center; gap: 16px;
}
.hero-scroll::after {
  content: ""; width: 1px; height: 64px; background: var(--ink-3);
  animation: scrollLine 2.4s var(--ease) infinite;
  transform-origin: top;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Page hero (sub pages) ---------- */
.page-hero {
  padding: clamp(160px, 20vw, 220px) 0 clamp(64px, 8vw, 100px);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  margin-top: 18px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: .12em;
}
.breadcrumb {
  margin-top: 32px;
  font-size: 12px; color: var(--ink-3);
  display: flex; gap: 12px;
}
.breadcrumb a:hover { color: var(--ink); }

/* ---------- About / Intro ---------- */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
}
.intro-body p + p { margin-top: 1.6em; }
.intro-body p { color: var(--ink-2); }

/* ---------- Service list ---------- */
.service-list { border-top: 1px solid var(--line); }
.service-item {
  display: grid;
  grid-template-columns: 80px 1fr 1.4fr;
  gap: clamp(20px, 4vw, 56px);
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.service-num {
  font-family: var(--en);
  font-size: 22px;
  color: var(--accent);
  letter-spacing: .1em;
}
.service-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: .08em;
  line-height: 1.7;
}
.service-name small {
  display: block;
  font-family: var(--en);
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: .16em;
}
.service-desc { color: var(--ink-2); }
.section-more { margin-top: 56px; text-align: right; }

/* ---------- Strengths ---------- */
.strength-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.strength {
  background: var(--bg);
  padding: clamp(36px, 4vw, 56px) clamp(28px, 3vw, 44px);
}
.section-alt .strength { background: var(--bg-alt); }
.strength-num {
  font-family: var(--en);
  font-size: 44px;
  line-height: 1;
  color: var(--accent);
  font-weight: 400;
}
.strength h3 {
  margin-top: 28px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.7;
  letter-spacing: .06em;
}
.strength p { margin-top: 18px; color: var(--ink-2); font-size: 14px; }

/* ---------- Process ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  counter-reset: step;
}
.process li {
  position: relative;
  padding: 0 20px 0 0;
}
.process li::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--en);
  font-size: 13px;
  letter-spacing: .2em;
  color: var(--accent);
}
.process li::after {
  content: "";
  position: absolute; top: 40px; left: 0; right: 0;
  height: 1px; background: var(--line);
}
.process li span {
  display: block;
  margin-top: 40px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .06em;
}
.process li p { margin-top: 10px; font-size: 13px; color: var(--ink-2); line-height: 1.9; }
.process li .dot {
  position: absolute; top: 36px; left: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--accent);
  z-index: 1;
}
.section-alt .process li .dot { background: var(--bg-alt); }

/* ---------- Service detail page ---------- */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(32px, 7vw, 100px);
  padding: clamp(56px, 7vw, 88px) 0;
  border-bottom: 1px solid var(--line);
}
.service-detail:first-child { padding-top: 0; }
.service-detail h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: .08em;
  line-height: 1.7;
}
.service-detail h2 .service-num { display: block; font-size: 18px; margin-bottom: 12px; }
.service-detail .en {
  display: block; margin-top: 6px;
  font-family: var(--en); font-size: 14px; letter-spacing: .16em; color: var(--ink-3);
}
.service-detail .body > p { color: var(--ink-2); }
.tag-list { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.tag-list li {
  font-size: 12px; letter-spacing: .08em;
  padding: 6px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.check-list { margin-top: 32px; }
.check-list li {
  position: relative;
  padding: 14px 0 14px 28px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
}
.check-list li:last-child { border-bottom: 1px dashed var(--line); }
.check-list li::before {
  content: ""; position: absolute; left: 4px; top: 50%;
  width: 10px; height: 1px; background: var(--accent);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.tech-grid div { background: var(--bg-alt); padding: 32px 28px; }
.tech-grid h3 {
  font-family: var(--en); font-weight: 500;
  font-size: 18px; letter-spacing: .14em; color: var(--accent);
}
.tech-grid p { margin-top: 12px; font-size: 13px; color: var(--ink-2); line-height: 2; }

/* ---------- Company page ---------- */
.message {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(40px, 8vw, 120px);
}
.message-body p { color: var(--ink-2); }
.message-body p + p { margin-top: 1.6em; }
.message-sign {
  margin-top: 48px; text-align: right;
  font-family: var(--serif);
}
.message-sign small { display: block; font-size: 12px; color: var(--ink-3); letter-spacing: .1em; }
.message-sign span { font-size: 20px; letter-spacing: .2em; }

.philosophy { display: grid; gap: 0; border-top: 1px solid var(--line); }
.philosophy-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(20px, 5vw, 72px);
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}
.philosophy-item dt {
  font-family: var(--en); font-size: 26px; letter-spacing: .14em; color: var(--accent); line-height: 1.4;
}
.philosophy-item dt small {
  display: block; font-family: var(--sans); font-size: 11px; color: var(--ink-3); letter-spacing: .2em;
}
.philosophy-item dd h3 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(19px, 2.2vw, 24px); letter-spacing: .08em; line-height: 1.8;
}
.philosophy-item dd p { margin-top: 14px; color: var(--ink-2); }

.profile { border-top: 1px solid var(--ink); }
.profile div {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.profile dt { font-size: 13px; color: var(--ink-3); letter-spacing: .14em; }
.profile dd { font-size: 15px; }
.placeholder { color: var(--ink-3); }

.map-box {
  margin-top: 48px;
  aspect-ratio: 16 / 6;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); font-size: 13px; letter-spacing: .14em;
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(40px, 8vw, 120px);
}
.contact-info p { color: var(--ink-2); }
.contact-info dl { margin-top: 40px; border-top: 1px solid var(--line); }
.contact-info dl div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-info dt { font-size: 12px; color: var(--ink-3); letter-spacing: .14em; }
.contact-info dd { margin-top: 4px; font-family: var(--serif); font-size: 17px; }

.form-row { margin-bottom: 32px; }
.form-row label {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; letter-spacing: .1em; margin-bottom: 10px;
}
.req, .opt {
  font-size: 10px; letter-spacing: .1em; padding: 1px 8px; line-height: 1.8;
}
.req { background: var(--accent); color: #fff; }
.opt { border: 1px solid var(--line); color: var(--ink-3); }
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  letter-spacing: .04em;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  transition: border-color .3s;
  -webkit-appearance: none;
  appearance: none;
}
.form-row select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 17px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.form-row textarea { min-height: 200px; resize: vertical; line-height: 1.8; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus { outline: none; border-color: var(--accent); }
.form-row .error { display: none; margin-top: 6px; font-size: 12px; color: #a1442f; }
.form-row.has-error input,
.form-row.has-error select,
.form-row.has-error textarea { border-color: #a1442f; }
.form-row.has-error .error { display: block; }
.form-agree { display: flex; gap: 12px; align-items: center; font-size: 13px; margin: 8px 0 40px; }
.form-agree input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-agree a { border-bottom: 1px solid currentColor; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin-top: 20px; font-size: 13px; color: #a1442f; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.form-done {
  display: none;
  padding: 48px; text-align: center;
  border: 1px solid var(--line); background: var(--surface);
}
.form-done h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; letter-spacing: .1em; }
.form-done p { margin-top: 16px; color: var(--ink-2); font-size: 14px; }

/* ---------- Prose (privacy etc.) ---------- */
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--ink-2); }
.prose h2 {
  margin: 56px 0 16px;
  font-family: var(--serif); font-weight: 500; font-size: 19px; letter-spacing: .08em;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.prose ul { margin-top: 12px; }
.prose li { position: relative; padding-left: 20px; }
.prose li::before { content: ""; position: absolute; left: 2px; top: 1em; width: 8px; height: 1px; background: var(--accent); }
.prose-date { margin-top: 64px; text-align: right; font-size: 13px; }

/* ---------- CTA ---------- */
.cta {
  background: var(--ink);
  color: var(--bg);
  text-align: center;
}
.cta .eyebrow { color: #c2ab86; }
.cta .eyebrow::before { background: #c2ab86; }
.cta .section-title { color: var(--bg); }
.cta p { margin: 24px auto 48px; color: #bdbab3; max-width: 560px; }

/* ---------- Footer ---------- */
.site-footer {
  background: #121212;
  color: #a9a69f;
  padding: 72px 0 40px;
  font-size: 13px;
}
.footer-top {
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  padding-bottom: 48px;
  border-bottom: 1px solid #2c2c2a;
}
.site-footer .logo { color: var(--bg); }
.site-footer .logo small { color: #77746d; }
.footer-address { margin-top: 24px; line-height: 2; }
.footer-nav ul { display: flex; gap: 32px; flex-wrap: wrap; }
.footer-nav a:hover { color: var(--bg); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding-top: 32px; font-size: 11px; letter-spacing: .1em;
}
.footer-bottom a:hover { color: var(--bg); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .12s; }
.reveal-d2 { transition-delay: .24s; }
.reveal-d3 { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-lines path { stroke-dashoffset: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .process { grid-template-columns: 1fr; gap: 0; }
  .process li { padding: 0 0 36px 36px; }
  .process li::after { top: 0; bottom: 0; left: 4px; right: auto; width: 1px; height: auto; }
  .process li .dot { top: 8px; left: 0; }
  .process li span { margin-top: 4px; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  body { font-size: 14px; }
  .menu-toggle { display: block; }
  .global-nav {
    position: fixed; inset: 0;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity .4s var(--ease), visibility .4s;
  }
  .menu-open .global-nav { opacity: 1; visibility: visible; }
  .global-nav ul { flex-direction: column; gap: 36px; text-align: center; }
  .global-nav a { font-size: 16px; }
  .menu-open { overflow: hidden; }

  .intro-grid,
  .service-detail,
  .message,
  .contact-grid { grid-template-columns: 1fr; }
  .service-item { grid-template-columns: 1fr; gap: 8px; padding: 36px 0; }
  .strength-grid { grid-template-columns: 1fr; }
  .philosophy-item,
  .profile div { grid-template-columns: 1fr; gap: 8px; }
  .section-more { text-align: left; }
  .hero-scroll { display: none; }
  .hero-text br, .lead br, .cta p br { display: none; }
  .hero-lines path:nth-child(3) { display: none; }
  .map-box { aspect-ratio: 4 / 3; }
}

@media (max-width: 520px) {
  .tech-grid { grid-template-columns: 1fr; }
  .btn { padding: 16px 28px; }
  .footer-nav ul { gap: 20px; }
}
