/* =========================
   Div-me Corporate Site
   Minimal / Monochrome + Subtle Accent
   Mobile First / Semantic Layout
========================= */

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
  margin: 0;
}

:where(h1, h2, h3, p) {
  margin: 0;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f7f8;
  --text: #0b0f14;
  --muted: #5b6470;
  --border: #e6e8eb;

  /* subtle accent (from PDF notes) */
  --accent: #0d7377;
  --accent-weak: rgba(13, 115, 119, 0.12);

  --shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.06);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --container: 1120px;

  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 44px;
  --space-8: 60px;

  --fs-0: 0.875rem; /* 14 */
  --fs-1: 1rem;     /* 16 */
  --fs-2: 1.125rem; /* 18 */
  --fs-3: 1.375rem; /* 22 */
  --fs-4: 1.75rem;  /* 28 */
  --fs-5: 2.25rem;  /* 36 */
  --fs-6: 2.75rem;  /* 44 */

  --lh-tight: 1.18;
  --lh-body: 1.8;

  --focus: 0 0 0 3px rgba(13, 115, 119, 0.25);
}

/* ---------- Base ---------- */
body {
  font-family: "Inter", "Noto Sans JP", system-ui, -apple-system, Segoe UI, Roboto,
    "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
}

p {
  line-height: var(--lh-body);
  color: var(--muted);
  font-size: var(--fs-1);
}

small {
  color: var(--muted);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 8px;
}

/* ---------- Layout Utilities ---------- */
.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: var(--space-7) 0;
}

.section--tight {
  padding: var(--space-6) 0;
}

.stack {
  display: grid;
  gap: var(--space-5);
}

.grid {
  display: grid;
  gap: var(--space-5);
}

.inline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 10px 12px;
  background: var(--text);
  color: var(--bg);
  border-radius: 10px;
  transform: translateY(-150%);
  transition: transform 160ms ease;
  z-index: 1000;
}
.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--accent);
  background: var(--surface);
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav ul {
  display: none; /* mobile default */
  gap: 14px;
  align-items: center;
}

.nav a {
  font-size: var(--fs-0);
  color: var(--muted);
  padding: 10px 10px;
  border-radius: 10px;
  transition: background 160ms ease, color 160ms ease;
}

.nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Hamburger */
.nav-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 12px;
  line-height: 1;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.nav-toggle .bars {
  width: 20px;
  height: 14px;
  position: relative;
  display: block;
}
.nav-toggle .bars span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 180ms ease, top 180ms ease, opacity 180ms ease;
}
.nav-toggle .bars span:nth-child(1) { top: 1px; }
.nav-toggle .bars span:nth-child(2) { top: 6px; }
.nav-toggle .bars span:nth-child(3) { top: 11px; }

.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

/* Mobile Nav Panel */
.nav-panel {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.nav-panel.is-open {
  display: block;
}
.nav-panel ul {
  display: grid;
  gap: 6px;
  padding: 12px 0 16px;
}
.nav-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px;
  border-radius: 12px;
  color: var(--text);
}
.nav-panel a:hover {
  background: var(--surface-2);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  font-size: var(--fs-0);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 160ms ease, border-color 160ms ease;
}

.btn:hover {
  background: var(--surface-2);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn--primary:hover {
  background: #151b22;
}

.btn--accent {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn--accent:hover {
  background: #0b666a;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  box-shadow: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: var(--space-8) 0 var(--space-7);
}

.hero-inner {
  display: grid;
  gap: var(--space-6);
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.15rem);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}

.hero .accent {
  color: var(--accent);
}

.hero p {
  font-size: var(--fs-2);
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Stats ---------- */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, #fff, #fff);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  padding: var(--space-6) 0;
}

.stat {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.stat .value {
  font-size: var(--fs-5);
  line-height: 1;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.stat .label {
  font-size: var(--fs-0);
  color: var(--muted);
}

/* ---------- Section Head ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.section-head h2 {
  font-size: var(--fs-4);
  letter-spacing: -0.01em;
}

.kicker {
  font-size: var(--fs-0);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Cards / Services ---------- */
.cards {
  display: grid;
  gap: var(--space-5);
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: grid;
  gap: 12px;
  min-height: 180px;
}

.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  background: var(--surface);
}

.card h3 {
  font-size: var(--fs-2);
  letter-spacing: -0.01em;
}

.card p {
  font-size: var(--fs-1);
}

/* ---------- CTA (Contact) ---------- */
.cta {
  border-top: 1px solid var(--border);
}

.cta-inner {
  padding: var(--space-6) 0;
  display: grid;
  gap: var(--space-4);
  align-items: start;
}

.cta-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.cta-title {
  font-size: var(--fs-3);
  letter-spacing: -0.01em;
}

.cta-note {
  font-size: var(--fs-0);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-6) 0;
}

.footer-inner {
  display: grid;
  gap: var(--space-4);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-nav a {
  font-size: var(--fs-0);
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
}

.footer-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* ---------- Page Header (for sub pages) ---------- */
.page-hero {
  padding: var(--space-7) 0 var(--space-6);
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4.6vw, 2.4rem);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}

.page-hero p {
  margin-top: 10px;
  max-width: 60ch;
}

/* ---------- Content Placeholder ---------- */
.placeholder {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--surface);
  color: var(--muted);
}

.placeholder strong {
  color: var(--text);
}

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
  .header-inner {
    padding: 16px 0;
  }

  .nav ul {
    display: inline-flex;
  }

  .nav-toggle {
    display: none;
  }

  .nav-panel {
    display: none !important;
  }

  .hero-inner {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .cta-inner {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding: 76px 0 56px;
  }
}
/* ---------- Articles (List / Detail) ---------- */
.toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: var(--space-5);
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.search input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: var(--fs-0);
  color: var(--text);
}

.search .hint {
  font-size: var(--fs-0);
  color: var(--muted);
  white-space: nowrap;
}

.article-grid {
  display: grid;
  gap: var(--space-5);
}

.article-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: grid;
  gap: 10px;
  transition: transform 120ms ease, box-shadow 160ms ease, background 160ms ease;
}

.article-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background: #fff;
}

.article-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: var(--fs-0);
}

.badges {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.78rem;
  color: var(--text);
}

.badge--accent {
  border-color: transparent;
  background: var(--accent-weak);
  color: var(--accent);
}

.article-title {
  font-size: var(--fs-3);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.article-excerpt {
  color: var(--muted);
}

.readmore {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-0);
  color: var(--text);
}

.readmore .arrow {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
}

.article-empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--surface);
  color: var(--muted);
}

.article-detail {
  display: grid;
  gap: var(--space-5);
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: var(--fs-0);
}

.breadcrumb a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-body {
  display: grid;
  gap: 14px;
}

.article-body p {
  color: var(--muted);
  line-height: var(--lh-body);
  font-size: var(--fs-1);
}

@media (min-width: 768px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .article-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* ---------- Portfolio ---------- */
.filters {
  display: grid;
  gap: 10px;
  margin-bottom: var(--space-5);
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: var(--fs-0);
  color: var(--text);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.chip:hover {
  background: var(--surface-2);
}

.chip[aria-pressed="true"] {
  background: var(--accent-weak);
  border-color: transparent;
  color: var(--accent);
}

.work-grid {
  display: grid;
  gap: var(--space-5);
}

.work-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: grid;
  gap: 10px;
}

.work-title {
  font-size: var(--fs-3);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.work-desc {
  color: var(--muted);
}

.work-meta {
  display: grid;
  gap: 8px;
  font-size: var(--fs-0);
  color: var(--muted);
}

.meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.kv {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
}

.kv b {
  color: var(--text);
  font-weight: 600;
}

/* ---------- History / Timeline ---------- */
.timeline {
  display: grid;
  gap: var(--space-5);
}

.timeline-item {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.timeline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.timeline-year {
  font-size: var(--fs-3);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.timeline-tag {
  font-size: var(--fs-0);
  color: var(--muted);
}

.timeline-body {
  display: grid;
  gap: 8px;
}

.quote {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  color: var(--muted);
}

/* ---------- Article: categories ---------- */
.category-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

@media (min-width: 768px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .work-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* ---------- Company Page ---------- */
.info-grid {
  display: grid;
  gap: var(--space-5);
}

.info-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.info-title {
  font-size: var(--fs-2);
  letter-spacing: -0.01em;
  margin: 0;
}

.dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.dl-row {
  display: grid;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.dl-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dl dt {
  font-size: var(--fs-0);
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dl dd {
  margin: 0;
  color: var(--text);
  line-height: var(--lh-body);
}

.address {
  font-variant-numeric: tabular-nums;
}

.text-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.muted {
  color: var(--muted);
}

@media (min-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
