/* ===== 株式会社Ultimate 共通スタイル ===== */
:root {
  --navy: #0f2a55;
  --navy-deep: #0a1d3d;
  --blue: #1f5fbf;
  --accent: #f2b705;      /* 旧ロゴの黄色を継承 */
  --ink: #1d2433;
  --muted: #5b6475;
  --line: #dfe4ec;
  --bg: #ffffff;
  --bg-soft: #f4f6fa;
  --radius: 10px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.85;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.4; margin: 0 0 .6em; }
p { margin: 0 0 1em; }

.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.section { padding: 80px 0; }
.section--soft { background: var(--bg-soft); }
.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .18em;
  color: var(--blue); text-transform: uppercase; margin-bottom: .5em;
}
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); }
.lead { font-size: 1.05rem; color: var(--muted); max-width: 46em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-text small { font-size: .68rem; color: var(--muted); letter-spacing: .05em; }
.logo-text strong { font-size: 1.1rem; letter-spacing: .02em; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.nav a {
  display: block; padding: 8px 14px; border-radius: 6px;
  color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 500;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); background: var(--bg-soft); }
.nav .nav-cta a { background: var(--navy); color: #fff; padding: 8px 18px; }
.nav .nav-cta a:hover { background: var(--blue); color: #fff; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
  width: 44px; height: 44px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--navy);
  margin: 5px auto; transition: .2s;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 2px; }
  .nav a { padding: 12px 14px; }
  .nav .nav-cta a { text-align: center; margin-top: 8px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  color: #fff;
  background:
    linear-gradient(100deg, rgba(10,29,61,.96) 0%, rgba(15,42,85,.88) 45%, rgba(15,42,85,.55) 100%),
    url("../img/site-work.jpg") center / cover no-repeat;
}
.hero::before { /* 設計図風グリッド */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.hero .container { position: relative; padding: 110px 0 120px; }
.hero-tag {
  display: inline-block; border: 1px solid rgba(255,255,255,.4);
  padding: 4px 14px; border-radius: 999px; font-size: .85rem; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); font-weight: 900; letter-spacing: .02em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 1.08rem; max-width: 34em; color: rgba(255,255,255,.88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.page-hero {
  position: relative; color: #fff; background: var(--navy);
  overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 32px 32px;
}
.page-hero .container { position: relative; padding: 64px 0; }
.page-hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0; }
.page-hero h1 .phrase { display: inline-block; }
.page-hero p { margin: .5em 0 0; color: rgba(255,255,255,.8); }
.breadcrumb { font-size: .82rem; color: rgba(255,255,255,.7); margin-bottom: 10px; }
.breadcrumb a { color: rgba(255,255,255,.85); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 8px;
  font-weight: 700; text-decoration: none; font-size: 1rem;
  border: 2px solid transparent; transition: .2s; cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: var(--navy-deep); }
.btn-primary:hover { background: #ffc928; }
.btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--blue); }

/* ---------- Service cards ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.service-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.service-card:hover { box-shadow: 0 12px 30px rgba(15,42,85,.12); transform: translateY(-2px); }
.service-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.service-card .body { padding: 26px 28px 30px; flex: 1; display: flex; flex-direction: column; }
.service-card h3 { font-size: 1.35rem; color: var(--navy); }
.service-card ul { margin: 0 0 1.2em; padding-left: 1.2em; color: var(--muted); }
.service-card .more { margin-top: auto; font-weight: 700; text-decoration: none; }
.service-card .more::after { content: " →"; }

/* ---------- Strengths ---------- */
.strength {
  background: #fff; border-radius: var(--radius); padding: 28px;
  border-top: 4px solid var(--accent);
  box-shadow: 0 2px 10px rgba(15,42,85,.05);
}
.strength .num { font-size: .8rem; font-weight: 700; color: var(--blue); letter-spacing: .15em; }
.strength h3 { font-size: 1.15rem; margin-top: .3em; color: var(--navy); }
.strength p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- Split (text + image) ---------- */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Works gallery ---------- */
.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.work {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.work button {
  all: unset; cursor: zoom-in; display: block; background: #eef1f6;
}
.work button:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.work button img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.work .body { padding: 18px 20px 22px; }
.work h3 { font-size: 1.05rem; color: var(--navy); margin-bottom: .4em; }
.work p { font-size: .92rem; color: var(--muted); margin: 0; }
.work.wide { grid-column: 1 / -1; }
.work.wide button img { aspect-ratio: 616 / 150; }

/* Lightbox */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh;
}
.lightbox::backdrop { background: rgba(5,12,28,.85); }
.lightbox img { max-width: 94vw; max-height: 84vh; margin: auto; background: #fff; border-radius: 6px; }
.lightbox p { color: #fff; text-align: center; margin: 10px 0 0; }
.lightbox .close {
  position: fixed; top: 14px; right: 18px; font-size: 2rem; line-height: 1;
  background: none; border: 0; color: #fff; cursor: pointer;
}

/* ---------- Flow ---------- */
.flow { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.flow li {
  position: relative; padding: 0 0 28px 64px; counter-increment: step;
}
.flow li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 700; font-size: .9rem;
  display: grid; place-items: center;
}
.flow li::after {
  content: ""; position: absolute; left: 21px; top: 48px; bottom: 4px;
  width: 2px; background: var(--line);
}
.flow li:last-child::after { display: none; }
.flow h3 { font-size: 1.08rem; margin: 8px 0 .3em; color: var(--navy); }
.flow p { color: var(--muted); margin: 0; font-size: .95rem; }

.tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.tags li {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 18px; font-size: .95rem;
}

/* ---------- Table (会社概要) ---------- */
.info-table { width: 100%; border-collapse: collapse; background: #fff; }
.info-table th, .info-table td {
  text-align: left; vertical-align: top;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.info-table th { width: 30%; color: var(--navy); background: var(--bg-soft); font-weight: 700; white-space: nowrap; }
@media (max-width: 600px) {
  .info-table th, .info-table td { display: block; width: 100%; }
  .info-table th { border-bottom: 0; padding-bottom: 6px; }
  .info-table td { padding-top: 6px; }
}
.client-list { columns: 2; margin: 0; padding-left: 1.2em; }
@media (max-width: 600px) { .client-list { columns: 1; } }

.map { border: 0; width: 100%; height: 380px; border-radius: var(--radius); }

/* ---------- CTA band ---------- */
.cta {
  background: linear-gradient(120deg, var(--navy-deep), var(--blue));
  color: #fff; text-align: center;
}
.cta h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.cta p { color: rgba(255,255,255,.85); }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 24px; }

/* ---------- Form ---------- */
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; }
@media (max-width: 600px) { .form { padding: 22px; } }
.field { margin-bottom: 22px; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: 8px; color: var(--navy); padding: 0; }
.field fieldset { border: 0; padding: 0; margin: 0; }
.req {
  display: inline-block; background: #d93636; color: #fff; font-size: .7rem;
  padding: 1px 8px; border-radius: 4px; margin-left: 8px; vertical-align: 2px;
}
.field input[type=text], .field input[type=email], .field input[type=tel], .field textarea, .field select {
  width: 100%; padding: 12px 14px; font: inherit;
  border: 1px solid #c7cfdb; border-radius: 6px; background: #fbfcfe;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,95,191,.15); background: #fff;
}
.checks { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.checks label { font-weight: 400; color: var(--ink); display: flex; align-items: center; gap: 6px; margin: 0; }
.form-note { font-size: .85rem; color: var(--muted); }

/* ---------- News ---------- */
.news { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news li { display: flex; gap: 24px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.news time { color: var(--muted); font-size: .92rem; white-space: nowrap; }
@media (max-width: 600px) { .news li { flex-direction: column; gap: 2px; } }

/* ---------- Prose (privacy) ---------- */
.prose { max-width: 820px; }
.prose h2 { font-size: 1.2rem; color: var(--navy); margin-top: 2em; padding-left: 12px; border-left: 4px solid var(--accent); }
.prose ol { padding-left: 1.4em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.8); padding: 56px 0 24px; font-size: .92rem; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: .95rem; margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer .logo { color: #fff; margin-bottom: 12px; }
.site-footer .logo-text small { color: rgba(255,255,255,.6); }
.copyright { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; text-align: center; font-size: .8rem; color: rgba(255,255,255,.55); }
