/* しごと仕立て室 v1.8.6 — UI/UX & responsive refinement
 * Layered on top of theme.css to preserve existing inner-page layouts.
 * Core goals: early service clarity, mobile navigation, accessible text and controls.
 */
:root {
  /* Accessible link contrast: original teal #2d8f88 on white ~3.9:1. */
  --teal: #18746e;
  --muted: #586b78;
}
html { scroll-padding-top: 92px; }
body { overflow-wrap: break-word; }
:where(section, article, .split, .hero-grid, .focus-products, .form-row) > * { min-width: 0; }
:where(.button, .text-link, .site-nav a, .menu-button, summary, input, select, textarea):focus-visible {
  outline: 3px solid #b85a32;
  outline-offset: 4px;
}
:where(a, button, input, select, textarea) { -webkit-tap-highlight-color: rgba(24, 116, 110, .13); }
section[id], div[id] { scroll-margin-top: 96px; }

/* Header/nav: reduce choices before consulting the complete service catalog. */
.header-inner { gap: clamp(12px, 2vw, 28px); }
.brand-area { min-width: 0; flex: 0 1 280px; }
.brand-image, .custom-logo-link, .custom-logo-link img { max-width: 100%; }
.site-nav { gap: 16px; }
.nav-list, .site-nav ul { gap: clamp(12px, 1.45vw, 20px); }
.site-nav .nav-list > li > a, .nav-services summary { font-size: 13px; }
.site-nav > .button { flex-shrink: 0; white-space: nowrap; }
/* Decorative needle on the narrow header CTA must not expand the viewport. */
.site-header .needle-icon, .site-header .click-stitch { display: none; }
.nav-services summary { min-height: 44px; display: flex; align-items: center; }
.service-mega {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(760px, calc(100vw - 42px));
  right: -180px;
  gap: 0;
  max-height: min(68vh, 580px);
  overflow: auto;
}
.service-mega-group { min-width: 0; }
.site-nav .service-mega-group a { line-height: 1.5; min-height: 43px; display: flex; align-items: center; }
.site-nav .service-mega-all { min-height: 44px; }

/* First-view hierarchy: value proposition + primary CTA visible earlier. */
.atelier-hero { padding: clamp(48px, 5.8vw, 78px) 0 clamp(44px, 5vw, 68px); }
.atelier-hero .hero-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(24px, 4vw, 58px);
}
.atelier-hero .hero h1, .atelier-hero h1 { font-size: clamp(36px, 3.5vw, 51px); }
.atelier-hero .eyebrow { letter-spacing: .045em; line-height: 1.6; }
.atelier-hero .hero-service-line {
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.65;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--navy);
}
.atelier-hero .hero-lead { font-size: 16px; line-height: 1.8; margin: 0; max-width: 38em; }
.atelier-hero .hero-actions { margin: 22px 0 20px; gap: 12px; }
.atelier-hero .button { min-height: 49px; }
.atelier-hero .hero-note { margin: 0 0 17px; font-size: 13px!important; }
.atelier-hero .trust-row { gap: 7px; }
.atelier-hero .trust-row span { font-size: 12px; line-height: 1.5; }
.atelier-hero .tailoring-board { min-height: 0; }
.atelier-hero .hero-illustration { max-width: 100%; }
.atelier-hero .measure-tag { right: -8px; }

/* Make services/proof discoverable without forcing visitors through long essays. */
.field-notes-section, .service-focus-section, .experience-section { padding-block: clamp(54px, 5vw, 76px); }
.field-notes-section .section-title, .service-focus-section .section-title,
.experience-section .section-title { margin-bottom: 25px; }
.field-notes-section .section-title p, .service-focus-section .section-title p {
  max-width: 660px; margin: 10px auto 0;
}
.problem-router.route-three { align-items: stretch; }
.problem-router.route-three a { min-height: 0; padding: 25px; }
.problem-router.route-three a strong { overflow-wrap: anywhere; }
.focus-products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.focus-product.focus-main { grid-row: auto; padding: 30px; }
.focus-product { padding: 30px; }
.focus-product h3 { font-size: clamp(21px, 2vw, 27px); }
.focus-product .text-link { display: inline-block; padding: 6px 0; }
.home-other-title { margin: 45px 0 5px; font-size: clamp(19px, 2vw, 24px); }
.home-other-intro { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.experience-ledger { margin-bottom: 17px; }
.experience-row { padding-block: 22px; }
.experience-row h3 { font-size: clamp(19px, 2vw, 24px); }
.experience-note { max-width: 940px; margin: 0 auto 25px; font-size: 13px; color: var(--muted); }
.home-price-link { display: inline-block; margin-left: 20px; padding: 12px 0; }

/* Section readability and link targets for all templates. */
.page-hero { padding-block: clamp(45px, 6vw, 78px); }
.page-hero .wrap, .section-title p { overflow-wrap: anywhere; }
.page-hero-lead, .page-hero p { max-width: 48em; }
.site-footer a { min-height: 26px; }
.footer-utility { margin-top: 14px; }
.contact-form :where(input,select,textarea) { min-height: 46px; font-size: 16px; }
.contact-form textarea { min-height: 130px; }
.contact-form details summary { min-height: 44px; }
.contact-form :where(fieldset,details) { min-width: 0; }

/* Progressive enhancement: content stays visible when JS is blocked. */
.motion-reveal, .motion-stagger > * { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .motion-ready .motion-reveal:not(.is-visible),
  .motion-ready .motion-stagger > :not(.is-visible) { opacity: 0; transform: translateY(18px); }
  .motion-ready .motion-reveal.is-visible,
  .motion-ready .motion-stagger > .is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motion-reveal, .motion-stagger > * { opacity: 1!important; transform: none!important; }
}

@media (min-width: 901px) {
  .site-header .header-inner { width: min(1140px, calc(100% - 40px)); }
  .site-nav .nav-list { align-items: center; }
  .site-nav .nav-list > li > a, .nav-services summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding-block: 0;
    white-space: nowrap;
  }
}

@media (max-width: 1120px) and (min-width: 901px) {
  .brand-area { flex-basis: 230px; }
  .site-nav { gap: 10px; }
  .site-nav .nav-list > li > a, .nav-services summary { font-size: 12px; }
  .site-nav > .button { padding: 10px 12px; font-size: 12px; }
}
/* Avoid clipping the desktop mega-menu on small laptop screens. */
@media (min-width: 901px) and (max-width: 1120px) {
  .service-mega {
    position: fixed;
    top: 84px;
    left: 18px;
    right: 18px;
    width: calc(100vw - 36px);
  }
}
@media (max-width: 900px) {
  html { scroll-padding-top: 76px; }
  .header-inner { min-height: 76px; }
  .brand-area { flex: 1 1 auto; }
  .brand-image { width: min(270px, 59vw); }
  .menu-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-width: 94px; min-height: 44px; font: inherit; font-size: 14px; font-weight: 800;
    color: var(--ink); cursor: pointer;
  }
  .menu-button-bars {
    display: grid;
    align-items: center;
    flex: none;
    width: 18px;
    height: 14px;
    border-block: 2px solid currentColor;
  }
  .menu-button-bars::after {
    content: '';
    border-top: 2px solid currentColor;
  }
  .site-nav {
    top: 100%; padding: 14px max(20px, calc((100% - 700px) / 2)) 24px;
    max-height: calc(100dvh - 76px); overflow-y: auto; overscroll-behavior: contain;
    border-bottom: 1px solid var(--line);
  }
  body.mobile-menu-open { overflow: hidden; }
  .nav-list, .site-nav ul { gap: 0; }
  .site-nav .nav-list > li { border-bottom: 1px solid var(--line); }
  .site-nav .nav-list > li > a { display: flex; align-items: center; min-height: 48px; font-size: 15px; }
  .nav-services summary { min-height: 48px; font-size: 15px; justify-content: space-between; }
  .service-mega {
    width: 100%; max-height: none; overflow: visible; position: static;
    grid-template-columns: 1fr; padding: 8px 10px 12px; box-shadow: none;
  }
  .service-mega-group { padding: 8px 6px!important; }
  .site-nav .service-mega-group a { font-size: 14px; min-height: 43px; }
  .site-nav > .button { display: flex; min-height: 48px; margin-top: 18px; }
  .atelier-hero .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .atelier-hero .hero-visual { max-width: 610px; width: 100%; margin: 10px auto 0; }
  .focus-products { grid-template-columns: 1fr 1fr; }
  .focus-product.focus-main { grid-row: auto; grid-column: 1 / -1; }
  .intro-grid > div { padding: 20px; }
}
@media (max-width: 680px) {
  html { scroll-padding-top: 72px; }
  .wrap { width: calc(100% - 34px); }
  .header-inner { min-height: 72px; }
  .brand-image { width: min(225px, 54vw); }
  .site-nav { max-height: calc(100dvh - 72px); padding-inline: 17px; }
  .atelier-hero { padding: 35px 0 40px; }
  .atelier-hero h1 { font-size: clamp(28px, 7.6vw, 35px); line-height: 1.3; margin-bottom: 16px; letter-spacing: 0; }
  .atelier-hero .eyebrow { font-size: 12px; margin-bottom: 10px; }
  .atelier-hero .hero-service-line { font-size: 17px; }
  .atelier-hero .hero-lead { font-size: 15px; line-height: 1.85; }
  .atelier-hero .hero-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 19px 0 14px; }
  .atelier-hero .hero-actions .button { min-height: 49px; width: 100%; }
  .atelier-hero .hero-note { line-height: 1.6; font-size: 12px!important; }
  .atelier-hero .trust-row span { border-radius: 10px; padding: 5px 8px; font-size: 11px; }
  .atelier-hero .hero-visual { margin-top: 4px; }
  .atelier-hero .measure-tag { display: none; }
  .atelier-hero .thread-dot { display: none; }
  .field-notes-section, .service-focus-section, .experience-section { padding-block: 44px; }
  .section-title { margin-bottom: 25px; }
  .section-title h2 { font-size: clamp(25px, 6.4vw, 32px); line-height: 1.4; }
  .section-title p { font-size: 15px; line-height: 1.75; }
  .problem-router.route-three { grid-template-columns: 1fr; gap: 11px; }
  .problem-router.route-three a, .problem-router.route-three a:nth-child(1), .problem-router.route-three a:nth-child(4) {
    grid-column: 1; min-height: 0; padding: 20px;
  }
  .problem-router.route-three a strong { font-size: 17px; line-height: 1.5; }
  .focus-products { grid-template-columns: 1fr; gap: 12px; }
  .focus-product, .focus-product.focus-main { grid-column: auto; padding: 24px 21px; }
  .focus-product h3 { font-size: 22px; }
  .other-products { grid-template-columns: 1fr; }
  .home-other-title { margin-top: 35px; }
  .experience-row { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .experience-row h3 { font-size: 19px; }
  .home-price-link { display: block; margin: 8px auto 0; }
  .intro-grid { grid-template-columns: 1fr; }
  .intro-grid > div { padding: 16px 18px; }
  .intro-grid span { font-size: 25px; }
  .intro-grid b { font-size: 17px; }
  .page-hero h1 { font-size: clamp(29px, 7.7vw, 38px); overflow-wrap: anywhere; }
  .page-hero-lead, .page-hero p { font-size: 15px; line-height: 1.85; }
  .site-footer .footer-contact .button { width: 100%; }
  .contact-form .form-row { grid-template-columns: 1fr; }
  .contact-form { gap: 16px; }
  .contact-form button[type=submit] { width: 100%; min-height: 49px; }
}
