@layer reset, base, components, pages, utilities;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    scroll-behavior: smooth;
  }

  body,
  h1,
  h2,
  h3,
  p,
  figure,
  blockquote,
  dl,
  dd {
    margin: 0;
  }

  ul,
  ol {
    margin: 0;
    padding: 0;
  }

  img,
  picture {
    display: block;
    max-width: 100%;
  }

  button,
  input,
  select,
  textarea {
    font: inherit;
  }
}

@layer base {
  :root {
    --navy-950: #071f2e;
    --navy-900: #0b2b3d;
    --navy-800: #143e54;
    --blue-500: #5e8295;
    --cream-50: #fbf9f4;
    --cream-100: #f4f0e8;
    --cream-200: #e8e0d3;
    --brown-700: #5c3b29;
    --brown-500: #8e674d;
    --green-600: #516654;
    --white: #fff;
    --error: #a42a25;
    --shadow: 0 24px 70px rgb(7 31 46 / 12%);
    --font-serif: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
    --font-sans: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
    --content: min(1320px, calc(100vw - 48px));
    --wide: var(--content);
    --radius: 28px;
    --transition: 280ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  body {
    min-width: 320px;
    color: var(--navy-950);
    background: var(--cream-50);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.9;
    letter-spacing: 0.035em;
    text-rendering: optimizelegibility;
  }

  body.menu-open {
    overflow: hidden;
  }

  a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25em;
  }

  a:hover {
    text-decoration-color: var(--brown-500);
  }

  :focus-visible {
    outline: 3px solid #d79b48;
    outline-offset: 4px;
  }

  h1,
  h2,
  h3 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0.08em;
  }

  h1 {
    font-size: clamp(2rem, 3.2vw, 3rem);
  }

  h2 {
    font-size: clamp(1.5rem, 2.3vw, 2.2rem);
  }

  h3 {
    font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  }

  ::selection {
    color: var(--white);
    background: var(--navy-800);
  }
}

@layer components {
  .skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 8px 16px;
    color: var(--white);
    background: var(--navy-950);
    transform: translateY(-150%);
  }

  .skip-link:focus {
    transform: translateY(0);
  }

  .site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    border-bottom: 1px solid rgb(11 43 61 / 10%);
    background: rgb(251 249 244 / 92%);
    backdrop-filter: blur(16px);
  }

  .header-inner {
    width: var(--wide);
    min-height: 72px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid currentcolor;
    border-radius: 50%;
    font-family: var(--font-serif);
    font-size: 1.25rem;
  }

  .brand-name {
    display: grid;
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.1em;
  }

  .brand-name small {
    color: var(--brown-500);
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.18em;
  }

  .site-nav ul {
    display: flex;
    align-items: center;
    gap: clamp(20px, 2.5vw, 38px);
    list-style: none;
  }

  .site-nav a {
    position: relative;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
  }

  .site-nav a:not(.button)::after {
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 1px;
    background: var(--navy-900);
    content: "";
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition);
  }

  .site-nav a:hover::after,
  .site-nav a[aria-current="page"]::after {
    transform: scaleX(1);
    transform-origin: left;
  }

  .menu-button {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgb(11 43 61 / 20%);
    border-radius: 50%;
    color: var(--navy-950);
    background: transparent;
  }

  .menu-button span,
  .menu-button::before,
  .menu-button::after {
    width: 20px;
    height: 1px;
    display: block;
    margin: 5px auto;
    background: currentcolor;
    content: "";
    transition: transform var(--transition), opacity var(--transition);
  }

  .menu-button[aria-expanded="true"] span {
    opacity: 0;
  }

  .menu-button[aria-expanded="true"]::before {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-button[aria-expanded="true"]::after {
    transform: translateY(-6px) rotate(-45deg);
  }

  .button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 12px 24px;
    border: 1px solid var(--navy-900);
    border-radius: 2px;
    color: var(--white);
    background: var(--navy-900);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition), background var(--transition), transform var(--transition);
  }

  .button::after {
    content: "→";
  }

  .button:hover {
    color: var(--navy-900);
    background: transparent;
    transform: translateY(-2px);
  }

  .button-light {
    border-color: var(--white);
    color: var(--navy-950);
    background: var(--white);
  }

  .button-light:hover {
    color: var(--white);
  }

  .eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    color: var(--brown-500);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }

  .eyebrow::before {
    width: 44px;
    height: 1px;
    background: currentcolor;
    content: "";
  }

  .section {
    padding-block: clamp(44px, 5vw, 72px);
  }

  .section-inner {
    width: var(--content);
    margin-inline: auto;
  }

  .section-heading {
    max-width: 720px;
    margin-bottom: 28px;
  }

  .section-heading p:last-child {
    max-width: 620px;
    margin-top: 24px;
    color: rgb(7 31 46 / 72%);
  }

  .split {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: center;
    gap: clamp(28px, 4vw, 56px);
  }

  .split-media {
    position: relative;
  }

  .split-media img {
    width: 100%;
    height: clamp(240px, 27vw, 340px);
    border-radius: 88px 8px;
    box-shadow: var(--shadow);
    object-fit: cover;
  }

  .split-copy > p:not(.eyebrow) {
    margin-top: 20px;
  }

  .split-copy .button {
    margin-top: 24px;
  }

  .representative-message-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: center;
    gap: clamp(28px, 4vw, 56px);
  }

  .representative-message-media {
    margin: 0;
  }

  .representative-message-media img {
    display: block;
    width: 100%;
    height: clamp(280px, 32vw, 420px);
    border-radius: 88px 8px 8px;
    box-shadow: var(--shadow);
    object-fit: cover;
  }

  .representative-message-copy {
    max-width: 600px;
  }

  .representative-message-copy > p:not(.message-lead) {
    margin-top: 20px;
    color: rgb(7 31 46 / 76%);
  }

  .message-lead {
    color: var(--navy-900);
    font-family: var(--font-serif);
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1.6;
  }

  .message-signature {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: fit-content;
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--cream-300);
  }

  .message-signature span {
    color: rgb(7 31 46 / 60%);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
  }

  .message-signature strong {
    color: var(--navy-900);
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.08em;
  }

  .feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .feature-card {
    padding: 24px;
    border-top: 1px solid var(--navy-900);
    background: rgb(255 255 255 / 55%);
  }

  .feature-card-number {
    color: var(--brown-500);
    font-family: var(--font-serif);
    font-size: 0.8rem;
  }

  .feature-card h3 {
    margin-top: 18px;
  }

  .feature-card p:last-child {
    margin-top: 20px;
    color: rgb(7 31 46 / 70%);
    font-size: 0.94rem;
  }

  .page-hero {
    width: var(--wide);
    margin-inline: auto;
    padding: 40px 0 44px;
  }

  .page-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 40px;
  }

  .page-hero h1 {
    font-size: clamp(2rem, 3.2vw, 3rem);
  }

  .page-hero-copy > p:last-child {
    max-width: 500px;
    margin-top: 28px;
    color: rgb(7 31 46 / 70%);
  }

  .page-hero img {
    width: 100%;
    height: clamp(240px, 27vw, 340px);
    border-radius: 100px 8px 8px;
    object-fit: cover;
  }

  .breadcrumb {
    width: var(--content);
    margin: 18px auto 0;
    color: rgb(7 31 46 / 60%);
    font-size: 0.78rem;
  }

  .breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
  }

  .breadcrumb li + li::before {
    margin-right: 8px;
    content: "/";
  }

  .cta-band {
    position: relative;
    overflow: hidden;
    padding: 48px 24px;
    color: var(--white);
    background: var(--navy-900);
    text-align: center;
  }

  .cta-band::before,
  .cta-band::after {
    position: absolute;
    width: 420px;
    height: 220px;
    border: 1px solid rgb(255 255 255 / 15%);
    border-radius: 50%;
    content: "";
  }

  .cta-band::before {
    top: -110px;
    left: -120px;
  }

  .cta-band::after {
    right: -100px;
    bottom: -140px;
  }

  .cta-band p {
    margin: 20px auto 32px;
    max-width: 580px;
    color: rgb(255 255 255 / 76%);
  }

  .site-footer {
    color: var(--cream-100);
    background: var(--navy-950);
  }

  .footer-inner {
    width: var(--content);
    margin-inline: auto;
    padding: 40px 0 24px;
  }

  .footer-main {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    padding-bottom: 32px;
  }

  .footer-brand p {
    max-width: 460px;
    margin-top: 24px;
    color: rgb(244 240 232 / 62%);
    font-size: 0.9rem;
  }

  .footer-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 32px;
    list-style: none;
  }

  .footer-nav a {
    text-decoration: none;
  }

  .footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding-top: 24px;
    border-top: 1px solid rgb(255 255 255 / 12%);
    color: rgb(244 240 232 / 52%);
    font-size: 0.72rem;
  }

  [data-reveal] {
    opacity: 1;
    transform: translateY(0);
  }
}

@layer pages {
  .home-hero {
    position: relative;
    width: 100%;
    min-height: 0;
    padding-bottom: 80px;
    transform: translateY(var(--hero-offset, 0));
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: stretch;
    background: var(--cream-100);
  }

  .home-hero-copy {
    position: relative;
    z-index: 2;
    padding: 44px clamp(24px, 4vw, 64px);
    padding-left: max(24px, calc((100vw - 1320px) / 2));
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .home-hero-copy h1 {
    margin-left: 0;
  }

  .home-hero-copy > p:last-of-type {
    max-width: 420px;
    margin-top: 20px;
    color: rgb(7 31 46 / 72%);
  }

  .home-hero-copy .button {
    align-self: flex-start;
    margin-top: 24px;
  }

  .home-hero-media {
    position: relative;
    overflow: hidden;
    margin-bottom: -80px;
    border-radius: 45% 0 0 20% / 50% 0 0 50%;
  }

  .home-hero-media img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: cover;
  }

  .hero-note {
    position: absolute;
    z-index: 2;
    right: 28px;
    top: 32px;
    max-width: 320px;
    color: var(--white);
    text-shadow: 0 2px 12px rgb(0 0 0 / 75%);
    font-family: var(--font-serif);
    font-size: 1rem;
    line-height: 1.9;
  }

  .stats {
    width: var(--content);
    margin: -1px auto 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    color: var(--cream-100);
    background: var(--navy-900);
  }

  .home-introduction {
    position: relative;
    z-index: 3;
    display: flow-root;
    background: var(--navy-900);
    color: var(--cream-100);
  }

  .introduction-curve {
    position: absolute;
    bottom: calc(100% - 1px);
    left: 0;
    width: 100%;
    height: 120px;
    display: block;
    color: var(--navy-900);
    pointer-events: none;
  }

  .stat {
    padding: 16px 24px;
    text-align: center;
  }

  .stat + .stat {
    border-left: 1px solid rgb(255 255 255 / 18%);
  }

  .stat strong {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(1.65rem, 2.5vw, 2.2rem);
    font-weight: 500;
  }

  .stat span {
    color: rgb(255 255 255 / 60%);
    font-size: 0.78rem;
  }

  .cream-section {
    background: var(--cream-100);
  }

  .navy-section {
    color: var(--cream-100);
    background: var(--navy-900);
  }

  .navy-section .eyebrow {
    color: #caa47e;
  }

  .navy-section .split-copy > p:not(.eyebrow) {
    color: rgb(255 255 255 / 70%);
  }

  .company-table {
    width: 100%;
    border-collapse: collapse;
  }

  .company-table th,
  .company-table td {
    padding: 24px 18px;
    border-bottom: 1px solid var(--cream-200);
    text-align: left;
    vertical-align: top;
  }

  .company-table th {
    width: 26%;
    color: var(--brown-500);
    font-size: 0.84rem;
  }

  .company-location-tel {
    display: inline-block;
    margin-top: 10px;
  }

  .store-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .store-card {
    padding: 24px;
    border: 1px solid var(--cream-200);
    background: var(--white);
  }

  .store-card-meta {
    color: var(--brown-500);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
  }

  .store-card h2 {
    margin-top: 12px;
    font-size: 1.35rem;
  }

  .store-card p:last-of-type {
    margin-top: 12px;
    color: rgb(7 31 46 / 66%);
    font-size: 0.88rem;
  }

  .store-card a {
    display: inline-block;
    font-size: 0.84rem;
    font-weight: 700;
  }

  .store-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 20px;
  }

  .store-card-links a:first-child {
    color: var(--navy-900);
  }

  .store-card-links a:last-child {
    color: var(--brown-500);
  }

  .job-panel {
    padding: 28px;
    border: 1px solid var(--cream-200);
    background: var(--white);
  }

  .job-panel + .job-panel {
    margin-top: 20px;
  }

  .job-panel p {
    margin-top: 18px;
    color: rgb(7 31 46 / 70%);
  }

  .form-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    gap: 40px;
    align-items: start;
  }

  .form-intro {
    position: sticky;
    top: 130px;
  }

  .form-intro p:not(.eyebrow) {
    margin-top: 24px;
    color: rgb(7 31 46 / 70%);
  }

  .form-intro .required {
    margin-left: 0;
    font-size: inherit;
    vertical-align: baseline;
  }

  .application-form {
    padding: 32px;
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .form-field + .form-field {
    margin-top: 28px;
  }

  .form-field label,
  .form-field legend {
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 700;
  }

  .required {
    margin-left: 8px;
    color: var(--error);
    font-size: 0.7rem;
  }

  .form-field input,
  .form-field select,
  .form-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #b9b6ae;
    border-radius: 2px;
    color: var(--navy-950);
    background: var(--cream-50);
  }

  .form-field input::placeholder,
  .form-field textarea::placeholder {
    color: rgb(7 31 46 / 38%);
    opacity: 1;
  }

  .form-field textarea {
    min-height: 180px;
    resize: vertical;
  }

  .form-field input:focus,
  .form-field select:focus,
  .form-field textarea:focus {
    border-color: var(--navy-900);
    outline: 2px solid rgb(20 62 84 / 22%);
  }

  .form-field label.form-check {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .form-check input {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    margin: 0;
  }

  .field-error,
  .form-error {
    margin-top: 8px;
    color: var(--error);
    font-size: 0.82rem;
  }

  .form-error {
    padding: 14px 16px;
    border-left: 3px solid var(--error);
    background: #fff2f0;
  }

  .form-success {
    padding: 32px;
    border-left: 4px solid var(--green-600);
    background: #edf4ee;
  }

  .form-actions {
    margin-top: 36px;
  }

  .form-actions button {
    width: 100%;
    cursor: pointer;
  }

  .form-actions button:disabled {
    cursor: wait;
    opacity: 0.65;
  }

  .privacy-content {
    max-width: 800px;
  }

  .privacy-content section + section {
    margin-top: 52px;
  }

  .privacy-content h2 {
    font-size: 1.5rem;
  }

  .privacy-content p,
  .privacy-content ul {
    margin-top: 16px;
  }

  .privacy-content ul {
    padding-left: 1.5em;
  }

  .error-page {
    min-height: calc(100vh - 88px);
    display: grid;
    place-items: center;
    padding: 80px 24px;
    text-align: center;
  }

  .error-code {
    color: var(--brown-500);
    font-family: var(--font-serif);
    font-size: clamp(5rem, 18vw, 12rem);
    line-height: 1;
  }

  .error-page p {
    margin: 24px auto 32px;
  }
}

@layer utilities {
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .text-link {
    font-weight: 700;
  }

  @media (width <= 900px) {
    :root {
      --content: min(100% - 36px, 720px);
      --wide: var(--content);
    }

    .header-inner {
      width: var(--content);
      min-height: 64px;
    }

    .menu-button {
      display: block;
    }

    .site-nav {
      position: fixed;
      inset: 64px 0 auto;
      height: calc(100dvh - 64px);
      padding: 48px 24px;
      visibility: hidden;
      opacity: 0;
      background: var(--cream-50);
      transform: translateY(-12px);
      transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    }

    .site-nav.is-open {
      visibility: visible;
      opacity: 1;
      transform: translateY(0);
    }

    .site-nav ul {
      max-width: 480px;
      margin-inline: auto;
      flex-direction: column;
      align-items: stretch;
      gap: 0;
    }

    .site-nav li {
      border-bottom: 1px solid var(--cream-200);
    }

    .site-nav a {
      display: block;
      padding: 18px 8px;
      font-family: var(--font-serif);
      font-size: 1.15rem;
    }

    .site-nav a[aria-current="page"]::after {
      display: none;
    }

    .site-nav .button {
      margin-top: 28px;
      color: var(--white);
      text-align: center;
    }

    .split,
    .representative-message-grid,
    .page-hero-grid,
    .form-layout,
    .footer-main {
      grid-template-columns: 1fr;
    }

    .split-media {
      order: -1;
    }

    .split-media img {
      height: 280px;
    }

    .representative-message-media img {
      height: 280px;
    }

    .feature-grid {
      grid-template-columns: 1fr;
    }

    .feature-card {
      min-height: auto;
    }

    .page-hero {
      width: var(--content);
    }

    .page-hero img {
      height: 280px;
    }

    .home-hero {
      min-height: auto;
      grid-template-columns: 1fr;
    }

    .home-hero-copy {
      padding-inline: 24px;
      padding-left: max(18px, calc((100vw - 720px) / 2));
    }

    .home-hero-media {
      height: 360px;
      border-radius: 0;
    }

    .home-hero-media img {
      height: 100%;
    }

    .stats {
      width: 100%;
    }

    .stat {
      padding: 14px 10px;
    }

    .form-intro {
      position: static;
    }
  }

  @media (width <= 600px) {
    :root {
      --content: calc(100% - 28px);
    }

    body {
      font-size: 15px;
    }

    .brand-mark {
      width: 36px;
      height: 36px;
    }

    .brand-name {
      font-size: 0.92rem;
    }

    .section {
      padding-block: 40px;
    }

    .home-hero-copy {
      padding: 28px 14px;
    }

    .home-hero {
      padding-bottom: 48px;
    }

    .introduction-curve {
      height: 72px;
    }

    .home-hero-media,
    .home-hero-media img {
      height: 258px;
    }

    .home-hero-media {
      margin-bottom: -48px;
    }

    .hero-note {
      right: 24px;
      top: 24px;
    }

    .stats {
      grid-template-columns: repeat(2, 1fr);
    }

    .stat + .stat {
      border-left: 1px solid rgb(255 255 255 / 18%);
    }

    .page-hero img {
      height: 220px;
      min-height: auto;
      border-radius: 100px 4px 4px;
    }

    .representative-message-media img {
      height: 220px;
      border-radius: 72px 4px 4px;
    }

    .store-grid {
      grid-template-columns: 1fr;
    }

    .company-table th,
    .company-table td {
      display: block;
      width: 100%;
      padding: 14px 4px;
    }

    .company-table th {
      padding-bottom: 0;
      border-bottom: 0;
    }

    .application-form {
      padding: 28px 20px;
    }

    .footer-nav {
      grid-template-columns: 1fr;
    }

    .footer-bottom {
      flex-direction: column;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
      scroll-behavior: auto !important;
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
    }

    [data-reveal] {
      opacity: 1;
      transform: none;
    }
  }
}
