:root {
  /* Color tokens */
  --color-bg: #FAFBF8;
  --color-bg-soft: #edf6ee;
  --color-bg-card: rgba(223, 238, 227, 0.78);
  --color-text: #1b2629;
  --color-text-sub: #45504d;
  --color-muted: #55615e;
  --color-primary: #1d6f52;
  --color-primary-dark: #0d4d39;
  --color-border: rgba(19, 53, 44, 0.18);
  --color-border-light: rgba(25, 87, 67, 0.22);
  --color-white: #ffffff;

  /* Layout tokens */
  --container: 1180px;
  --gutter: 40px;
  --section-space: 28px;
  --radius-pill: 999px;
  --radius-panel: 22px;
  --radius-blob: 42% 58% 55% 45% / 45% 45% 55% 55%;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
  --leading-body: 1.8;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: var(--leading-body);
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

.wrap {
  width: min(calc(100% - (var(--gutter) * 2)), var(--container));
  margin-inline: auto;
}

/* Decorative Rules */
.green-rule,
.mini-rule {
  display: block;
  background: var(--color-primary);
}

.green-rule {
  width: 30px;
  height: 3px;
  margin-bottom: 12px;
}

.mini-rule {
  width: 22px;
  height: 1px;
  margin-bottom: 8px;
  opacity: 0.7;
}

/* Shared UI Components */
.primary-button {
  min-width: 200px;
  min-height: 46px;
  padding: 0 20px 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.primary-button:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(29, 111, 82, 0.55);
  color: var(--color-primary);
  font-size: 12px;
  transition: opacity 0.18s ease;
}

.text-link:hover {
  opacity: 0.8;
}

.mail-icon {
  font-size: 15px;
  line-height: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 251, 248, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  border-radius: 8px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.brand-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text);
  margin-top: 5px;
}

.brand-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-sub);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-sub);
}

.nav a {
  transition: opacity 0.18s ease;
}

.nav a:hover {
  opacity: 0.75;
}

.nav-contact {
  min-height: 40px;
  padding-inline: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  transition: background-color 0.18s ease;
}

.nav-contact:hover {
  background: var(--color-primary-dark);
  opacity: 1;
}

/* Hero */
.hero {
  padding: 18px 0 20px;
}

.hero-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(360px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}

.hero-copy {
  min-width: 0;
  padding-top: 0;
}

.hero h1 {
  margin-bottom: 12px;
  font-size: clamp(38px, 3.6vw, 56px);
  line-height: 1.14;
  letter-spacing: -0.06em;
  font-weight: 700;
  white-space: nowrap;
}

.hero h1 span {
  color: var(--color-primary);
}

.hero-text {
  margin-bottom: 16px;
  color: var(--color-text-sub);
  font-size: 14px;
  white-space: nowrap;
}

.hero-art {
  min-width: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.hero-art img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* Shared section styles */
.section {
  padding-block: var(--section-space);
}

.section h2 {
  margin-bottom: 6px;
  font-size: clamp(28px, 2vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.section-title-row {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.section-title-row p,
.experience-lead {
  color: var(--color-muted);
  font-size: 13px;
}

.section-title-row p {
  margin-bottom: 0;
}

.section-en {
  flex-shrink: 0;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(27, 38, 41, 0.3);
  color: var(--color-text-sub);
  font-size: 12px;
  line-height: 1.4;
}

/* Services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 24px;
}

.service {
  min-width: 0;
  padding-top: 4px;
}

.service-icon {
  width: 100px;
  aspect-ratio: 1;
  margin-bottom: 12px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-blob);
  background: var(--color-bg-card);
  color: var(--color-primary);
  flex-shrink: 0;
}

.service-icon i {
  font-size: 44px;
  line-height: 1;
}

.service-content {
  min-width: 0;
}

.service h3 {
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.service p {
  margin-bottom: 0;
  color: var(--color-text-sub);
  font-size: 13px;
  line-height: 1.7;
}

/* Approach */
.approach-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: 24px;
}

.approach-art {
  min-width: 0;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.approach-art img {
  width: min(100%, 920px);
  height: auto;
}

.approach-copy {
  min-width: 0;
  padding-left: 18px;
}

.approach-heading {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.approach-heading h2 {
  margin-bottom: 0;
}

.approach-copy p {
  margin-bottom: 12px;
  color: var(--color-text-sub);
  font-size: 13px;
}

.approach-copy p:last-child {
  margin-bottom: 0;
}

/* Experience */
.experience-lead {
  margin-bottom: 20px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.case-card {
  min-width: 0;
}

.case-image {
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid rgba(19, 53, 44, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
  aspect-ratio: 16 / 10;
}

.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-title {
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.case-text {
  margin-bottom: 12px;
  color: var(--color-text-sub);
  font-size: 13px;
  line-height: 1.7;
}

.case-link {
  font-weight: 500;
}

/* Contact Section & Form */
.contact-section {
  padding-bottom: 22px;
}

.contact-lead {
  margin-bottom: 16px;
  color: var(--color-muted);
  font-size: 13px;
}

.contact-form-wrap {
  min-width: 0;
}

.contact-form {
  max-width: 580px;
}

.form-group {
  margin-bottom: 11px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid rgba(19, 53, 44, 0.18);
  border-radius: 6px;
  background: #ffffff;
  color: var(--color-text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #939d9a;
  font-size: 13px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(29, 111, 82, 0.2);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.form-submit-button {
  min-width: 140px;
  min-height: 40px;
  padding: 0 18px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.form-submit-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.form-result {
  min-height: 24px;
  margin-top: 8px;
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-result-success,
.form-result-error {
  padding: 8px 10px;
  border-left: 3px solid var(--color-primary);
  background: var(--color-bg-soft);
}

.form-result-error {
  border-left-color: #9b4b3f;
  background: rgba(155, 75, 63, 0.08);
  color: #71382f;
}

/* Section Divider */
.section-divider {
  width: min(calc(100% - (var(--gutter) * 2)), var(--container));
  margin: 0 auto;
  border: 0;
  border-top: 1px solid rgba(19, 53, 44, 0.1);
}

/* Author Profile */
.author-profile {
  padding-block: 28px;
}

.author-inner {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.author-avatar-frame {
  width: 64px;
  height: 64px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(18, 56, 46, 0.12);
  border-radius: 50%;
  background: rgba(223, 238, 227, 0.6);
  margin-top: 2px;
}

.author-avatar {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.author-info {
  min-width: 0;
  max-width: 680px;
}

.author-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.author-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.author-en {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-muted);
  letter-spacing: 0.04em;
}

.author-desc {
  margin-top: 4px;
  margin-bottom: 0;
  color: var(--color-text-sub);
  font-size: 13px;
  line-height: 1.7;
}

.author-history {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.history-item {
  padding-left: 12px;
  border-left: 2px solid rgba(29, 111, 82, 0.25);
}

.history-period {
  display: block;
  font-size: 11px;
  color: var(--color-muted);
  line-height: 1.4;
}

.history-role {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 2px;
  margin-bottom: 3px;
}

.history-text {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-sub);
  line-height: 1.6;
}

/* Footer */
.footer {
  padding: 12px 0 24px;
}

.footer-inner {
  display: flex;
  justify-content: flex-end;
}

.footer-copy {
  color: var(--color-muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}

/* Tablet (820px and below) */
@media (max-width: 820px) {
  :root {
    --gutter: 24px;
    --section-space: 24px;
  }

  .nav a:not(.nav-contact) {
    display: none;
  }

  .hero-grid,
  .approach-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: 0;
    gap: 0;
  }

  .hero-copy {
    display: contents;
  }

  .hero-copy h1 {
    order: 1;
    margin-bottom: 12px;
    white-space: normal;
  }

  .hero-copy .hero-text {
    order: 2;
    margin-bottom: 16px;
    white-space: normal;
  }

  .hero-art {
    order: 3;
    justify-content: center;
    min-height: auto;
    margin-bottom: 18px;
  }

  .hero-art img {
    max-width: 620px;
  }

  .hero-copy .primary-button {
    order: 4;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
  }

  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .approach-copy {
    padding-left: 0;
  }

  .approach-art {
    order: 2;
  }

  .approach-copy {
    order: 1;
  }

  .footer-grid {
    grid-template-columns: 1fr auto;
  }

  .footer-nav {
    display: none;
  }
}

/* Mobile (520px and below) */
@media (max-width: 520px) {
  :root {
    --gutter: 20px;
    --section-space: 20px;
  }

  body {
    font-size: 14px;
  }

  .header-inner {
    min-height: 56px;
  }

  html {
    scroll-padding-top: 64px;
  }

  .brand {
    gap: 8px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .brand-text {
    font-size: 12px;
    margin-top: 2px;
    line-height: 1.3;
  }

  .brand-sub {
    display: inline;
    font-size: 10px;
    opacity: 0.85;
  }

  .nav-contact {
    min-height: 34px;
    padding-inline: 12px;
    font-size: 11px;
    flex-shrink: 0;
  }

  .hero {
    padding: 10px 0 14px;
  }

  .hero-copy h1 {
    font-size: clamp(34px, 10vw, 42px);
    letter-spacing: -0.05em;
    padding-top: 2px;
  }

  .hero-text br {
    display: none;
  }

  .hero-art {
    margin-inline: 0;
    margin-bottom: 0;
  }

  .hero-art img {
    width: 100%;
    max-width: 100%;
  }

  .hero-copy .primary-button {
    display: none;
  }

  .service-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .case-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-top: 0;
  }

  .service-icon {
    width: 72px;
    margin-bottom: 0;
  }

  .service-icon i {
    font-size: 34px;
  }

  .section-title-row {
    align-items: flex-start;
  }

  .section-en {
    margin-top: 8px;
  }

  .approach-heading {
    flex-wrap: wrap;
  }

  .contact-form {
    max-width: 100%;
  }

  .form-submit-button {
    width: 100%;
  }

  .author-profile {
    padding-block: 22px;
  }

  .author-inner {
    align-items: flex-start;
    gap: 16px;
  }

  .author-avatar-frame {
    width: 52px;
    height: 52px;
  }

  .footer-inner {
    justify-content: center;
  }
}

@media (max-width: 360px) {
  .brand-sub {
    display: none;
  }

  .header-inner {
    gap: 12px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .primary-button,
  .nav a,
  .text-link {
    transition: none;
  }
}
