/* レイヤー定義（優先順位: 後ろが強い） */
@layer reset, base, layout, components, utilities;


/* ============================================
   reset — destyle.css v4.0.1
   https://github.com/nicolas-cusan/destyle.css
   ============================================ */

@layer reset {
  *,
  ::before,
  ::after {
    box-sizing: border-box;
    border-style: solid;
    border-width: 0;
    min-width: 0;
  }

  html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
  }

  body {
    margin: 0;
  }

  main {
    display: block;
  }

  p,
  table,
  blockquote,
  address,
  pre,
  iframe,
  form,
  figure,
  dl {
    margin: 0;
  }

  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
  }

  ul,
  ol {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  dt {
    font-weight: bold;
  }

  dd {
    margin-left: 0;
  }

  hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
    border-top-width: 1px;
    margin: 0;
    clear: both;
    color: inherit;
  }

  pre {
    font-family: monospace, monospace;
    font-size: inherit;
  }

  address {
    font-style: inherit;
  }

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

  abbr[title] {
    text-decoration: underline dotted;
  }

  b,
  strong {
    font-weight: bolder;
  }

  code,
  kbd,
  samp {
    font-family: monospace, monospace;
    font-size: inherit;
  }

  small {
    font-size: 80%;
  }

  sub,
  sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }

  sub {
    bottom: -0.25em;
  }

  sup {
    top: -0.5em;
  }

  svg,
  img,
  embed,
  object,
  iframe {
    vertical-align: bottom;
  }

  button,
  input,
  optgroup,
  select,
  textarea {
    -webkit-appearance: none;
    appearance: none;
    vertical-align: middle;
    color: inherit;
    font: inherit;
    background: transparent;
    padding: 0;
    margin: 0;
    border-radius: 0;
    text-align: inherit;
    text-transform: inherit;
  }

  button,
  [type="button"],
  [type="reset"],
  [type="submit"] {
    cursor: pointer;
  }

  button:disabled,
  [type="button"]:disabled,
  [type="reset"]:disabled,
  [type="submit"]:disabled {
    cursor: default;
  }

  :-moz-focusring {
    outline: auto;
  }

  select:disabled {
    opacity: inherit;
  }

  option {
    padding: 0;
  }

  fieldset {
    margin: 0;
    padding: 0;
    min-width: 0;
  }

  legend {
    padding: 0;
  }

  progress {
    vertical-align: baseline;
  }

  textarea {
    overflow: auto;
  }

  [type="number"]::-webkit-inner-spin-button,
  [type="number"]::-webkit-outer-spin-button {
    height: auto;
  }

  [type="search"] {
    outline-offset: -2px;
  }

  [type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
  }

  ::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
  }

  [type="number"] {
    -moz-appearance: textfield;
  }

  label[for] {
    cursor: pointer;
  }

  details {
    display: block;
  }

  summary {
    display: list-item;
  }

  [contenteditable]:focus {
    outline: auto;
  }

  table {
    border-color: inherit;
    border-collapse: collapse;
  }

  caption {
    text-align: left;
  }

  td,
  th {
    vertical-align: top;
    padding: 0;
  }

  th {
    text-align: left;
    font-weight: bold;
  }
}


/* ============================================
   base — カスタムプロパティ・要素スタイル
   ============================================ */

@layer base {
  :root {
    /* ライトモード */
    --color-primary:    #E94D32;
    --color-accent:     #2563eb;
    --color-secondary:  #A08421;
    --color-bg:         linear-gradient(180deg, #FFFFFF 0%, #F7F4F1 100%);
    --color-base: #E94D32;
    
    /* フォント */
    --font-base: "CezanneProN-DB", sans-serif;
    --font-ja-demibold: "CezanneProN-DB", sans-serif;
    --font-ja-bold: "CezanneProN-B", sans-serif;
    --font-ja-medium: "CezanneProN-M", sans-serif;
    --font-es: "Inclusive Sans", sans-serif;

    /* レイアウト */
    --container-width: 1100px;
    --section-padding: 96px;
  }

  [data-theme="dark"] {
    /* ダークモード */
    --color-primary:    #E94D32;
    --color-accent:     #1067F4;
    --color-bg:         linear-gradient(180deg, #122A3A 0%, #0D1923 100%);
    --color-base: #fff;
  }

  html {
    font-size: clamp(12px, 0.44vw + 10px, 16px);
    scroll-behavior: smooth;
    font-feature-settings: "palt";
    letter-spacing: 0.04em;
  }

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

  body {
    font-family: var(--font-base);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-primary);
    background: var(--color-bg);
    opacity: 0;
    transition: opacity 0.8s ease, background-color var(--transition), color var(--transition);
  }

  body.is-loaded {
    opacity: 1;
  }

  a {
    color: var(--color-primary);
    text-decoration: none;
    transition: opacity var(--transition);
  }

  a:hover {
    text-decoration: underline;
  }
}


/* ============================================
   layout — コンテナ・セクション間隔
   ============================================ */

@layer layout {
  .container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
  }

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


/* ============================================
   components — ヘッダー・トグル・フッター
   ============================================ */

@layer components {

  /* ヘッダー */
  .header {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
  }

  .header-fv {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .header-fv img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* SP: 左→右パンアニメーション */
  @keyframes fv-pan {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-100% + 100vw)); }
  }

  @media (max-width: 768px) {
    .header-fv img {
      width: auto;
      height: 100%;
      max-width: none;
      object-fit: unset;
      will-change: transform;
    }
  }

  @keyframes logo-fade-in {
    from {
      opacity: 0;
      transform: translateX(-50%) translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
  }

  .header-logo {
    position: absolute;
    top: 40px;
    left: 50%;
    width: min(90%, 890px);
    transform: translateX(-50%);
    opacity: 0;
  }

  body.is-loaded .header-logo {
    animation: logo-fade-in 0.4s ease-out 0.3s both;
  }

  .header-logo img {
    width: 100%;
  }
  
  /* footer */
  .footer {
    padding-top: 120px;
    padding-bottom: 40px;
    color: #3d3d3d;
    position: relative;
  }
  [data-theme="dark"] .footer {
    color: #fff;
  }
  .footer-content {
    text-align: center;
    font-family: var(--font-es);
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.2;
  }
  .footer-darkmode-button {
    position: absolute;
    left: 18px;
    bottom: 18px;
  }
  
  /* to instagram */
  .to-instagram {
    width: 76px;
    height: 76px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    border-radius: 50%;
    background-color: var(--color-primary);
    border: 2px solid #fff;
    box-shadow: 0 0 0 4px var(--color-primary);
    transition: background-color 0.2s ease-in-out;
  }
  .to-instagram a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    position: relative;
    transition: color 0.2s ease-in-out;
  }
  .to-instagram:hover {
    background-color: #fff;
  }
  .to-instagram:hover a {
    color: var(--color-primary);
  }
  .to-instagram a svg {
    width: 32px;
    height: 32px;
    object-fit: cover;
  }
  
  @media (max-width: 768px) {
    .to-instagram {
      width: 52px;
      height: 52px;
    }
    .to-instagram a svg {
      width: 20px;
      height: 20px;
    }
  }
  
  /* セクション */
  
  /* heading */
  .section-heading {
    padding-top: 200px;
    padding-bottom: calc(180px + 9.375vw);
    position: relative;
    overflow: hidden;
  }
  .section-heading .container {
    position: relative;
    z-index: 1;
  }
  .section-heading-ja {
    font-size: 3.75rem;
    line-height: 1.2;
    text-align: center;
    font-family: var(--font-ja-demibold);
  }
  .section-heading-ja br {
    display: none;
  }

  /* 文字ごとのアニメーション */
  @keyframes char-fade-in {
    from {
      opacity: 0;
      transform: scale(0.5) translateY(6px);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }

  .section-heading-ja .char {
    display: inline-block;
    opacity: 0;
  }

  .section-heading-ja.is-animated .char {
    animation: char-fade-in 0.4s ease forwards;
  }

  .section-heading-es {
    margin-top: 1lh;
    font-size: 3rem;
    line-height: 1.2;
    text-align: center;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .section-heading-es.is-animated {
    opacity: 1;
    transform: translateY(0);
  }
  
  .section-heading-bg-left {
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-30%,-30%) rotate(180deg);
  }
  .section-heading-bg-right {
    position: absolute;
    bottom: 0;
    right: 0;
    transform: translate(30%,30%);
  }
  
  @media (max-width: 960px) {
    .section-heading-bg-left {
      top: -10%;
      left: -10%;
    }
    .section-heading-bg-right {
      bottom: -10%;
      right: -10%;
    }
  }
  
  @media (max-width: 768px) {
    .section-heading-ja br {
      display: block;
    }
  }
  
  /* about */
  .section-about {
    position: relative;
  }
  .section-about-bg-top {
    width: 100%;
    height: 9.3vw;
    z-index: 0;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-100%);
  }
  .section-about-bg-top svg {
    width: 100%;
    object-fit: cover;
  }
  .section-about-inner {
    padding-top: 60px;
    padding-bottom: 180px;
    position: relative;
    color: #fff;
    background-color: var(--color-primary);
  }
  .section-about .container {
    position: relative;
    z-index: 1;
  }
  .section-about-text {
    text-align: center;
  }
  .section-about-text-ja {
    font-size: 1.5rem;
    line-height: 2.0;
    font-family: var(--font-ja-demibold);
  }
  .section-about-text-es {
    margin-top: 2lh;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.7;
    font-family: var(--font-es);
  }
  .section-about-text-ja > * + *,
  .section-about-text-es > * + * {
    margin-top: 0.5lh;
  }
  
  @media (max-width: 768px) {
    .section-about-inner {
      padding-bottom: 120px;
    }
    .section-about-text {
      text-align: left;
    }
    .section-about-text br {
      display: none;
    }
  }
  
  /* company */
  .section-company {
    padding-top: 180px;
    padding-bottom: 180px;
  }
  .section-company-content-text-ja {
    font-size: 1.25rem;
    line-height: 1.8;
    font-family: var(--font-ja-medium);
  }
  .section-company-content-text-es {
    margin-top: 1lh;
    font-size: 1.1875rem;
    line-height: 1.7;
    font-weight: 400;
    font-family: var(--font-es);
  }
  .section-company-outline {
    margin-top: 3lh;
    color: #3d3d3d;
  }
  [data-theme="dark"] .section-company-outline {
    color: #fff;
  }
  .section-company-outline-title {
    font-size: 1.125rem;
    line-height: 1.2;
    font-family: var(--font-ja-demibold);
  }
  .section-company-outline-lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 1lh;
    font-family: var(--font-ja-medium);
  }
  .section-company-outline-list {
  }
  .section-company-outline-list > * + * {
    margin-top: 0.5lh;
  }
  .section-company-outline-list-item-heading p {
    font-family: var(--font-ja-demibold);
  }
  .section-company-outline-list-item-content {
    margin-top: 0.2lh;
  }
  .section-company-outline-list--ja {
    padding-right: 40px;
  }
  .section-company-outline-list--es {
    padding-left: 40px;
    border-left: 1px solid #3d3d3d;
  }
  
  @media (max-width: 768px) {
    .section-company {
      padding-top: 120px;
      padding-bottom: 120px;
    }
    .section-company-outline-lists {
      grid-template-columns: 1fr;
    }
    .section-company-outline-list--ja {
      padding-right: 0;
    }
    .section-company-outline-list--es {
      padding-left: 0;
      border-left: none;
      margin-top: 2lh;
    }
  }
  
  /* contact */
  .section-contact {
    padding-bottom: 120px;
  }
  .section-contact-content {
    font-family: var(--font-es);
    font-weight: 600;
    font-size: 2rem;
    line-height: 1.2;
  }
  .section-contact-content a {
    text-decoration: underline;
    text-underline-offset: 4px;
    color: var(--color-base);
  }
  .section-contact-content a:hover {
    text-decoration: none;
  }
  
  @media (max-width: 768px) {
    .section-contact-content {
      text-align: center;
    }
  }
  
  /* illustrator */
  .section-illustrator {
    padding-top: 120px;
    padding-bottom: 120px;
  }
  .section-illustrator-content {
    text-align: center;
    color: #3d3d3d;
    background-color: #fff;
    padding: 60px 120px;
    border-radius: 32px;
    margin-inline: 80px;
    font-family: var(--font-es);
    font-weight: 600;
  }
  .section-illustrator-content-title {
    position: relative;
    width: fit-content;
    margin-inline: auto;
    font-size: 1.125rem;
  }
  .section-illustrator-content-title-icon {
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
  }
  .section-illustrator-content-title-icon:first-child {
    left: -12px;
    transform: translate(-100%,-50%);
  }
  .section-illustrator-content-title-icon:last-child {
    right: -12px;
    transform: translate(100%,-50%);
  }
  .section-illustrator-content-name {
    margin-top: 0.2lh;
    font-size: 2rem;
  }
  
  @media (max-width: 768px) {
    .section-illustrator {
      padding-top: 0;
      padding-bottom: 120px;
    }
    .section-illustrator-content {
      padding: 40px 20px;
      margin-inline: 20px;
    }
  }
  

  /* テーマ切り替えボタン */
  .theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
    color: #fff;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
  }
  .theme-toggle__icon svg {
    width: 48px;
    height: 48px;
  }
  
  [data-theme="light"] .theme-toggle {
    background-color: #0D1923;
    border: 4px solid #0D1923;
  }
  [data-theme="light"] .theme-toggle:hover {
    color: #0D1923;
    background-color: transparent; 
  }
  [data-theme="light"] .theme-toggle svg {
    transform: translate(1px,-1px);
  }
  
  [data-theme="dark"] .theme-toggle {
    color: #0D1923;
    background-color: #fff;
    border: 4px solid #fff;
  }
  [data-theme="dark"] .theme-toggle:hover {
    color: #fff;
    background-color: #0D1923; 
  }

  [data-theme="light"] .theme-toggle__icon--dark  { display: none; }
  [data-theme="dark"]  .theme-toggle__icon--light { display: none; }
  
  @media (max-width: 768px) {
    .theme-toggle {
      width: 60px;
      height: 60px;
    }
    .theme-toggle__icon svg {
      width: 32px;
      height: 32px;
    }
  }
}


/* ============================================
   utilities — テキスト色・レスポンシブ
   ============================================ */

@layer utilities {
  .text-primary { color: var(--color-primary); }
  .text-accent  { color: var(--color-accent); }
  .text-base { color: var(--color-base); }
  
  .font-ja-demibold {
    font-family: var(--font-ja-demibold);
  }
  .font-ja-bold {
    font-family: var(--font-ja-bold);
  }
  .font-es {
    font-family: var(--font-es);
  }
  
  .section-grid {
    display: grid;
    row-gap: 60px;
    column-gap: 80px;
  }
  .section-title {
    width: fit-content;
    background-color: var(--color-accent);
    color: #fff;
    padding: 8px 20px;
    font-size: 1.8rem;
    line-height: 1.2;
    text-align: center;
    font-family: var(--font-es);
    font-weight: 600;
  }
  
  .icon-gazpacho {
    display: block;
    width: 100%;
    height: 100%;
    background-color: var(--color-primary);
    border-radius: 50%;
  }
  .icon-gazpacho::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    border-radius: 50%;
    border: 1px solid #fff;
  }

  @media (min-width: 1025px) {
    .section-grid {
      display: grid;
      grid-template-columns: 1fr 760px;
    }
  }
  
  @media (max-width: 768px) {
    :root {
      --section-padding: 64px;
    }
    .section-title {
      margin-inline: auto;
    }
  }
}
