/* ========================================
   Reset
======================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

html {
  -webkit-text-size-adjust: 100%;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
}

button:focus {
  outline: none;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

input,
textarea,
select {
  font: inherit;
}

/* ========================================
   Custom Properties
   Base: 0–1023px
======================================== */

:root {
  /* Font family */
  --font-ja: "Noto Sans JP", sans-serif;
  --font-en: "Manrope", sans-serif;

  /* Font size scale */
  --font-size-xs: 10px;
  --font-size-sm: 12px;
  --font-size-md: 14px;
  --font-size-base: 16px;
  --font-size-post-title-raw: 18px;
  --font-size-lg: 26px;
  --font-size-xl: 28px;
  --font-size-hero: 37px;

  /* Semantic font size */
  --font-size-kv: var(--font-size-hero);
  --font-size-h1: var(--font-size-xl);
  --font-size-h1-en: var(--font-size-sm);
  --font-size-h2: var(--font-size-lg);
  --font-size-body: var(--font-size-base);
  --font-size-body-small: var(--font-size-md);
  --font-size-news-date: var(--font-size-md);
  --font-size-news-title: var(--font-size-base);
  --font-size-post-title: var(--font-size-post-title-raw);
  --font-size-product-body: var(--font-size-md);
  --font-size-btn: var(--font-size-md);
  --font-size-footer-btn: var(--font-size-md);
  --font-size-header-nav: var(--font-size-md);
  --font-size-footer-text: var(--font-size-md);
  --font-size-footer-nav: var(--font-size-base);
  --font-size-copyright: var(--font-size-xs);

  /* Line height */
  --lh-tight: 1.2;
  --lh-heading: 1.4;
  --lh-body: 2.1;
  --lh-footer: 1.5;
  --lh-p-about: 2.7;

  /* Letter spacing */
  --ls-zero: 0;
  --ls-xxs: 0.05em;
  --ls-xs: 0.1em;
  --ls-sm: 0.12em;
  --ls-md: 0.14em;
  --ls-lg: 0.16em;
  --ls-xl: 0.2em;
  --ls-2xl: 0.22em;

  /* Semantic letter spacing */
  --ls-kv: var(--ls-lg);
  --ls-h1: var(--ls-md);
  --ls-h1-en: var(--ls-xl);
  --ls-body: var(--ls-md);
  --ls-btn: var(--ls-lg);
  --ls-news: var(--ls-md);
  --ls-h2: var(--ls-2xl);
  --ls-h2-body: var(--ls-sm);
  --ls-footer-info: var(--ls-xxs);
  --ls-footer-nav: var(--ls-lg);
  --ls-copyright: var(--ls-xs);
  --ls-header-nav: var(--ls-md);

  /* Font weight */
  --fw-100: 100;
  --fw-300: 300;
  --fw-400: 400;
  --fw-500: 500;
  --fw-600: 600;
  --fw-700: 700;

  --fw-jp-thin: var(--fw-100);
  --fw-jp-light: var(--fw-300);
  --fw-jp-regular: var(--fw-400);
  --fw-jp-medium: var(--fw-500);
  --fw-jp-bold: var(--fw-700);

  --fw-en-regular: var(--fw-400);
  --fw-en-medium: var(--fw-500);
  --fw-en-semi-bold: var(--fw-600);
  --fw-en-bold: var(--fw-700);

  --fw-body: var(--fw-jp-regular);
  --fw-semi-bold: var(--fw-600);
  --fw-bold: var(--fw-700);
  --font-weight-bold: var(--fw-700);

  --fw-h1: var(--fw-jp-medium);
  --fw-h2: var(--fw-jp-medium);
  --fw-h3: var(--fw-jp-regular);

  --fw-header-nav: var(--fw-jp-regular);
  --fw-btn: var(--fw-jp-medium);
  --fw-footer-text: var(--fw-jp-regular);
  --fw-title-en: var(--fw-en-semi-bold);

  /* Color / border */
  --color-white: #ffffff;
  --color-black: #000000;

  --color-text: var(--color-black);
  --color-text-inverse: var(--color-white);
  --color-text-primary: var(--color-text);

  --color-btn-bg: var(--color-white);
  --color-btn-text: var(--color-black);
  --color-btn-border: var(--color-black);

  --border-hairline: 1px solid rgba(102, 102, 102, 0.4);
  --border-default: 1px solid #666;
  --border-strong: 1px solid #000;

  /* Space scale */
  --space-2xs: 7px;
  --space-xs: 14px;
  --space-sm: 20px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 54px;
  --space-2xl: 36px;
  --space-3xl: 40px;
  --space-4xl: 60px;
  --space-5xl: 80px;

  /* Section */
  --section-gap: var(--space-5xl);
  --section-gap-before-footer: 60px;
  --section-pad-y: var(--space-5xl);

  /* Layout */
  --container: 1200px;
  --content: 800px;
  --footer: 1200px;
  --gutter: 16px;

  /* Page offset */
  --page-top-padding: 0px;
  --page-top-with-mv: 110px;
  --page-top-no-mv: 130px;

  /* Radius / motion */
  --radius-sm: 2px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --dur-fast: 200ms;
  --dur-mid: 500ms;
  --dur-slow: 800ms;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: ease;

  /* Icon */
  --icon-10: 9px;
  --icon-12: 11px;

  /* Header */
  --header-pad: 27px;
  --header-left-gap: 8px;
  --header-logo-h: 34px;
  --header-menu-gap: 18px;

  /* Footer */
  --footer-bg: #f5f5f3;
  --footer-inner-pt: 36px;
  --footer-copyright-h: 63px;
  --footer-banner-w: 608px;
  --footer-banner-mb: 40px;
  --footer-grid-gap: 86px;
  --footer-logo-w: 150px;
  --footer-logo-mb: 30px;
  --footer-factories-gap: var(--space-lg);
  --footer-factory-gap: var(--space-md);
  --footer-factory-left-w: 272px;
  --footer-factory-right-w: 309px;
  --footer-nav-w: 148px;
  --footer-menu-mb: 29px;
  --footer-contact-w: 174px;
  --footer-contact-h: 34px;

  /* Side banner */
  --side-anniv-w: 163px;
  --side-anniv-hide-x: 172px;
  --side-anniv-show-x: 17px;
  --side-anniv-bottom: 20%;

  /* Animation */
  --arrow-hop: 4px;
}

@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --section-gap-before-footer: 80px;
  }
}

@media (min-width: 1024px) {
  :root {
    /* Font size */
    --font-size-xs: 10px;
    --font-size-sm: 12px;
    --font-size-md: 14px;
    --font-size-base: 18px;
    --font-size-post-title-raw: 24px;
    --font-size-lg: 32px;
    --font-size-xl: 35px;
    --font-size-hero: 60px;
    --font-size-footer-info: 15px;
    --font-size-footer-nav: var(--font-size-md);

    /* Space */
    --space-2xs: 8px;
    --space-xs: 16px;
    --space-sm: 24px;
    --space-md: 32px;
    --space-lg: 48px;
    --space-xl: 64px;
    --space-2xl: 80px;
    --space-3xl: 114px;
    --space-4xl: 144px;

    /* Section */
    --section-gap-before-footer: 150px;
    --section-pad-y: var(--space-3xl);

    /* Page offset */
    --page-top-with-mv: 124px;
    --page-top-no-mv: 182px;

    /* Icon */
    --icon-10: 10px;
    --icon-12: 12px;

    /* Header */
    --header-pad: 24px;
    --header-logo-h: 40px;
    --header-menu-gap: 18px;

    /* Footer */
    --footer-inner-pt: 86px;
    --footer-copyright-h: 86px;
    --footer-banner-w: 715px;
    --footer-banner-mb: 80px;
    --footer-grid-gap: 62px;
    --footer-logo-w: 150px;
    --footer-logo-mb: 36px;
    --footer-factory-left-w: 340px;
    --footer-factory-right-w: 397px;
    --footer-nav-w: 174px;
    --footer-menu-mb: 34px;

    /* Side banner */
    --side-anniv-w: 192px;
    --side-anniv-hide-x: 202px;
    --side-anniv-show-x: 20px;

    /* Animation */
    --arrow-hop: 5px;
  }
}

/* ========================================
   Layout
======================================== */

.l-container,
.l-content,
.l-mv,
.l-footer {
  margin-inline: auto;
}

.l-content {
  position: relative;
  width: min(100% - (var(--gutter) * 2), var(--content));
}

.l-mv {
  width: min(100% - (var(--gutter) * 2), 1048px);
}

.l-footer {
  width: min(100% - (var(--gutter) * 2), var(--footer));
}

/* ========================================
   Section
======================================== */

.p-section {
  margin-top: 0;
}

.p-section--before-footer {
  padding-bottom: var(--section-gap-before-footer);
}

/* ========================================
   Whitebox
======================================== */

.c-whitebox {
  width: min(100% - (var(--gutter) * 2), var(--content));
  margin-inline: auto;
  background: #fff;
  border-radius: var(--radius-md);
}

.c-whitebox__inner {
  width: min(100%, 710px);
  margin-inline: auto;
  padding-block: 50px;
}

.c-whitebox--wide {
  width: min(100% - (var(--gutter) * 2), 1000px);
}

.c-whitebox--wide > .c-whitebox__inner {
  width: min(100%, var(--content));
  padding-block: 80px;
}

@media (max-width: 1023px) {
  .c-whitebox--wide {
    width: 100%;
  }

  .c-whitebox__inner {
    width: min(100%, var(--content));
    padding: 16px;
    padding-block: 16px !important;
  }
}

/* ========================================
   Split Layout
======================================== */

.c-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.c-split__left {
  min-width: 0;
}

.c-split__right {
  width: 100%;
}

.c-split__body {
  margin-top: var(--space-md);
  text-align: justify;
  text-justify: inter-ideograph;
}

@media (min-width: 1024px) {
  .c-split {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }

  .c-split--gap-40 {
    gap: 40px;
  }

  .c-split__left {
    flex: 1 1 auto;
  }

  .c-split__right {
    flex: 0 0 auto;
    width: 470px;
  }
}

/* ========================================
   Base
======================================== */

body {
  font-family: var(--font-ja), var(--font-en), sans-serif;
  font-size: var(--font-size-body);
  font-weight: 400;
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "palt";
}

body:not(.home) .l-main {
  padding-top: var(--page-top-padding);
}

body.has-mv:not(.home) {
  --page-top-padding: var(--page-top-with-mv);
}

body.no-mv:not(.home) {
  --page-top-padding: var(--page-top-no-mv);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
  line-height: var(--lh-heading);
}

p,
li {
  font-weight: 400;
}

/* ========================================
   Responsive Visibility
======================================== */

.to-sp,
.to-pc {
  display: none;
}

@media (max-width: 767px) {
  .to-sp {
    display: inline;
  }
}

@media (min-width: 768px) {
  .to-pc {
    display: inline;
  }
}

/* ========================================
   Utility
======================================== */

.u-prose {
  text-spacing-trim: trim-start;
  font-feature-settings: "palt";
}

.u-prose-vertical {
  -webkit-font-feature-settings: "vpal";
  font-feature-settings: "vpal";
}

.u-prose > * + * {
  margin-top: var(--space-md);
}

.u-prose p {
  font-size: var(--font-size-md);
  line-height: var(--lh-body);
}

/* ========================================
   Title
======================================== */

.c-title {
  position: relative;
  margin-bottom: 40px;
}

.c-title__ja {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin: 0 0 14px;
  padding-left: 0;
  font-family: var(--font-ja);
  font-size: var(--font-size-h2);
  font-weight: 500;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-h2);
  text-spacing-trim: trim-start;
  font-feature-settings: "palt";
}

.c-title__ja::before {
  content: "";
  position: absolute;
  top: -14px;
  left: -14px;
  z-index: -1;
  width: 60px;
  height: 60px;
  background: url("/wp-content/themes/kawasakishokuhin2026/assets/img/common/title-bg.svg")
    no-repeat;
  background-size: 40px 40px;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .c-title__ja::before {
    left: -24px;
  }
}

.c-title--bg-white .c-title__ja::before {
  background-image: url("/wp-content/themes/kawasakishokuhin2026/assets/img/common/title-bg-w.svg");
}

.c-title__en {
  margin: 0;
  font-family: var(--font-en);
  font-size: var(--font-size-h1-en);
  font-weight: var(--fw-title-en);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-h1-en);
}

/* ========================================
   Link Button
======================================== */

.c-linkbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 42px;
  color: var(--color-btn-text);
  background: var(--color-btn-bg);
  border: 1px solid var(--color-btn-border);
  text-decoration: none;
}

.c-linkbtn__label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: left;
  width: 138px;
  font-size: var(--font-size-btn);
  line-height: 1;
  letter-spacing: var(--ls-btn);
}

@media (min-width: 1024px) {
  .c-linkbtn {
    height: 40px;
  }
}

.c-arrow-hover {
  position: relative;
}

.c-arrow-hover::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 10px;
  height: 10px;
  transform: translate(0, -50%);
  background: url("/wp-content/themes/kawasakishokuhin2026/assets/img/common/link-button-icon.svg")
    no-repeat center / 10px 10px;
  pointer-events: none;
  will-change: transform, opacity;
}

.c-arrow-parent:hover .c-arrow-hover::after {
  animation: arrow-slide-diag 1s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes arrow-slide-diag {
  0% {
    opacity: 1;
    transform: translate(0, -50%);
  }
  45% {
    opacity: 0;
    transform: translate(var(--arrow-hop), calc(-50% - var(--arrow-hop)));
  }
  55% {
    opacity: 0;
    transform: translate(
      calc(var(--arrow-hop) * -1),
      calc(-50% + var(--arrow-hop))
    );
  }
  100% {
    opacity: 1;
    transform: translate(0, -50%);
  }
}

.c-link-fade {
  transition: opacity 0.5s ease;
}

.c-link-fade:hover {
  opacity: 0.8;
}

/* ========================================
   Page MV
======================================== */

.p-mv {
  padding-bottom: 47px;
}

.p-mv__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.p-mv__title {
  margin-top: 0;
  margin-left: 0;
  font-size: var(--font-size-h1);
  font-weight: var(--fw-h1);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-h1);
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  white-space: normal;
}

.p-mv__thumb {
  width: 100%;
  max-width: none;
}

.p-mv__thumb img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .p-mv {
    padding-bottom: 74px;
  }

  .p-mv__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
  }

  .p-mv__title {
    margin-top: 24px;
    margin-left: 30px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
  }

  .p-mv__thumb {
    flex: 1 1 auto;
    width: 100%;
    max-width: 640px;
  }
}

@media (min-width: 1024px) {
  .p-mv {
    padding-bottom: 74px;
  }

  .p-mv__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
  }

  .p-mv__title {
    margin-top: 44px;
    margin-left: 30px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
  }

  .p-mv__thumb {
    flex: 0 0 auto;
    width: 100%;
    max-width: 864px;
  }
}

/* ========================================
   Scroll Fade
======================================== */

html.is-js .js-fade {
  opacity: 0;
  filter: blur(1.2px);
  transform: translate3d(0, 12px, 0);
  transition:
    opacity 0.8s cubic-bezier(0.645, 0.045, 0.355, 1),
    transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1),
    filter 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
  will-change: opacity, transform;
}

html.is-js .js-fade.is-in {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  html.is-js .js-fade {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }
}
