/*
Theme Name: LOFY
Theme URI: https://lofy.kr/
Author: Lofy Inc.
Author URI: https://lofy.kr/
Description: PERBEAUHAUTE, addict curl, Accessory 세 브랜드를 소개하는 로피(LOFY) 바이어 대상 브랜드 소개 홈페이지 테마. 한국어/영어/일본어를 지원하는 자체 언어 전환 기능을 포함합니다.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: lofy
*/

  :root {
    --ink: #111111;
    --ink-soft: #63615d;
    --paper: #ffffff;
    --paper-soft: #f4f3f1;
    --paper-card: #ffffff;
    --line: rgba(17, 17, 17, 0.14);
    --line-strong: rgba(17, 17, 17, 0.34);
    --teal: #3f7d6c;
    --teal-ink: #2c5c4f;
    --red: #a51c30;
    --red-ink: #7e1526;
    --shadow: 0 24px 48px -30px rgba(17, 17, 17, 0.35);
    --logo-invert: 0;
    --logo-plate: transparent;
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --ink: #f0efec;
      --ink-soft: #b6b2ac;
      --paper: #121212;
      --paper-soft: #1a1a19;
      --paper-card: #171717;
      --line: rgba(240, 239, 236, 0.16);
      --line-strong: rgba(240, 239, 236, 0.34);
      --teal: #74c2b0;
      --teal-ink: #8fd0c1;
      --red: #e4667c;
      --red-ink: #ef8494;
      --shadow: 0 24px 55px -25px rgba(0, 0, 0, 0.65);
      --logo-invert: 1;
      --logo-plate: #ffffff;
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --ink: #f0efec; --ink-soft: #b6b2ac; --paper: #121212; --paper-soft: #1a1a19; --paper-card: #171717;
    --line: rgba(240, 239, 236, 0.16); --line-strong: rgba(240, 239, 236, 0.34);
    --teal: #74c2b0; --teal-ink: #8fd0c1; --red: #e4667c; --red-ink: #ef8494;
    --shadow: 0 24px 55px -25px rgba(0, 0, 0, 0.65);
    --logo-invert: 1; --logo-plate: #ffffff;
    color-scheme: dark;
  }
  :root[data-theme="light"] {
    --ink: #111111; --ink-soft: #63615d; --paper: #ffffff; --paper-soft: #f4f3f1; --paper-card: #ffffff;
    --line: rgba(17, 17, 17, 0.14); --line-strong: rgba(17, 17, 17, 0.34);
    --teal: #3f7d6c; --teal-ink: #2c5c4f; --red: #a51c30; --red-ink: #7e1526;
    --shadow: 0 24px 48px -30px rgba(17, 17, 17, 0.35);
    --logo-invert: 0; --logo-plate: transparent;
    color-scheme: light;
  }

  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR",
      "Malgun Gothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
  }
  img { max-width: 100%; display: block; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; color: inherit; cursor: pointer; }
  ::selection { background: var(--paper-soft); color: var(--ink); }
  h1, h2, h3, h4 { margin: 0; text-wrap: balance; font-weight: 700; }
  p { margin: 0; }

  .serif {
    font-family: Georgia, "Iowan Old Style", "Times New Roman", "Apple SD Gothic Neo", "Noto Serif KR", serif;
  }
  em, .em { font-style: italic; }

  .eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--teal-ink);
  }
  .eyebrow.red { color: var(--red-ink); }
  .eyebrow.mono { color: var(--ink-soft); }

  .wrap { max-width: 1280px; margin: 0 auto; padding-inline: clamp(1.25rem, 4vw, 3rem); }

  /* ---------- header ---------- */
  header.site {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .util-row {
    display: flex; justify-content: flex-end; gap: 1.1rem;
    padding: 0.45rem clamp(1.25rem, 4vw, 3rem);
    border-bottom: 1px solid var(--line);
    font-size: 0.7rem; letter-spacing: 0.06em;
  }
  .lang-switch { display: flex; gap: 0.9rem; }
  .lang-switch button {
    border: none; background: none; padding: 0 0 2px; font-weight: 700;
    color: var(--ink-soft); border-bottom: 1px solid transparent; text-transform: uppercase;
  }
  .lang-switch button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
  .theme-toggle { border: none; background: none; color: var(--ink-soft); font-size: 0.85rem; }

  .nav-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.1rem; }
  .logo { display: flex; align-items: center; }
  .logo img { height: 54px; width: auto; }
  nav.primary { display: flex; align-items: center; gap: 2.2rem; }
  nav.primary a {
    font-size: 0.76rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
    padding-block: 0.3rem; border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease; white-space: nowrap;
  }
  nav.primary a:hover { border-color: var(--ink); }

  .head-actions { display: flex; align-items: center; gap: 1rem; }
  .cta-btn {
    background: transparent; color: var(--ink); border: 1px solid var(--ink);
    padding: 0.62rem 1.5rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; white-space: nowrap; transition: background 0.25s ease, color 0.25s ease;
  }
  .cta-btn:hover { background: var(--ink); color: var(--paper); }

  .menu-btn {
    display: none; border: 1px solid var(--line-strong); background: transparent;
    width: 34px; height: 34px; font-size: 1.05rem; align-items: center; justify-content: center;
  }
  .mobile-menu { display: none; flex-direction: column; padding: 0.4rem clamp(1.25rem, 4vw, 3rem) 1.2rem; border-top: 1px solid var(--line); }
  .mobile-menu.open { display: flex; }
  .mobile-menu a { padding: 0.8rem 0.1rem; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
  .mobile-menu .cta-btn { text-align: center; margin-top: 0.8rem; }

  /* ---------- hero ---------- */
  .hero { background: var(--paper-soft); }
  .hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; align-items: stretch; min-height: 560px; }
  .hero-media { position: relative; overflow: hidden; }
  .hero-media img { width: 100%; height: 100%; object-fit: cover; }
  .hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 5vw, 4rem); }
  .hero-copy h1 {
    font-family: Georgia, "Iowan Old Style", "Times New Roman", "Apple SD Gothic Neo", "Noto Serif KR", serif;
    font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.25; margin-top: 0.8rem;
  }
  .hero-copy h1 em { color: var(--teal-ink); font-style: italic; }
  .hero-sub { margin-top: 1.3rem; font-size: 0.98rem; color: var(--ink-soft); max-width: 42ch; }
  .hero-actions { margin-top: 2rem; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
  .hero-link { font-size: 0.82rem; font-weight: 700; border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; }

  @media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; min-height: 0; }
    .hero-media { height: 280px; }
  }

  /* ---------- ticker ---------- */
  .ticker-strip { border-block: 1px solid var(--line); overflow: hidden; padding-block: 0.8rem; }
  .ticker-track {
    display: flex; gap: 2.6rem; width: max-content; animation: ticker 28s linear infinite;
    font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft);
  }
  .ticker-track span { display: flex; align-items: center; gap: 2.6rem; white-space: nowrap; }
  .ticker-track span::after { content: "—"; margin-left: 2.6rem; color: var(--line-strong); }
  @keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
  @media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

  /* ---------- manifesto ---------- */
  .manifesto { padding-block: clamp(3.5rem, 8vw, 6rem); text-align: center; }
  .manifesto blockquote {
    margin: 0 auto; max-width: 720px;
    font-family: Georgia, "Iowan Old Style", "Times New Roman", "Apple SD Gothic Neo", "Noto Serif KR", serif;
    font-style: italic; font-size: clamp(1.25rem, 2.2vw, 1.7rem); line-height: 1.55; color: var(--ink);
  }

  /* ---------- history ---------- */
  .history { padding-block: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--line); }
  .section-head { max-width: 640px; margin-bottom: clamp(2rem, 5vw, 3rem); }
  .section-head h2 { font-family: Georgia, serif; font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-top: 0.6rem; }
  .timeline { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1.2rem; }
  .timeline-item { border-top: 2px solid var(--ink); padding-top: 0.9rem; }
  .timeline-year { font-family: Georgia, serif; font-weight: 700; font-size: 1.3rem; }
  .timeline-fact { margin-top: 0.6rem; font-size: 0.78rem; color: var(--ink-soft); line-height: 1.5; }
  @media (max-width: 980px) {
    .timeline { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 560px) {
    .timeline { grid-template-columns: 1fr; }
  }

  /* ---------- chapters ---------- */
  .chapter { padding-block: clamp(3.5rem, 8vw, 6.5rem); border-top: 1px solid var(--line); }
  .chapter.tint { background: var(--paper-soft); }
  .chapter-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: end; margin-bottom: clamp(2rem, 5vw, 3rem); }
  .brand-mark { display: flex; align-items: baseline; gap: 0.7rem; margin-top: 0.6rem; }
  .brand-name { font-family: Georgia, serif; font-weight: 700; font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
  .brand-rule { width: 48px; height: 3px; background: var(--ink); }
  .chapter.red .brand-rule { background: var(--red); }
  .brand-sub { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red-ink); }
  .brand-logo { height: clamp(30px, 4vw, 44px); width: auto; }
  .brand-logo.pb { filter: invert(var(--logo-invert)); }
  .logo-plate {
    display: inline-block; background: var(--logo-plate); padding: 0.5rem 0.9rem;
    transition: background 0.3s ease;
  }
  .chapter-desc { font-size: 0.94rem; color: var(--ink-soft); max-width: 46ch; justify-self: end; }

  .chapter-hero { margin-bottom: clamp(2rem, 5vw, 3rem); aspect-ratio: 21 / 9; overflow: hidden; background: var(--paper-soft); }
  .chapter-hero img { width: 100%; height: 100%; object-fit: cover; }

  .group-label {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft);
    border-top: 1px solid var(--line); padding-top: 1rem; margin: 0 0 1.2rem;
  }
  .product-grid + .group-label { margin-top: 2.2rem; }
  .product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 1.6rem); }
  .product-grid.single { grid-template-columns: minmax(240px, 340px); }
  .card { background: var(--paper-card); border: 1px solid var(--line); display: flex; flex-direction: column; transition: border-color 0.25s ease; }
  .card:hover { border-color: var(--line-strong); }
  .card-media { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--paper-soft); display: grid; place-items: center; padding: 1.1rem; }
  .card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.4s ease; }
  .card:hover .card-media img { transform: scale(1.03); }
  .badge {
    position: absolute; top: 0.8rem; left: 0.8rem; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; padding: 0.3rem 0.55rem; border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  }
  .card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; border-top: 1px solid var(--line); }
  .card-name { font-size: 1rem; font-weight: 700; }
  .card-tagline { font-size: 0.85rem; color: var(--ink-soft); flex: 1; }
  .card-foot { display: flex; justify-content: flex-end; margin-top: 0.4rem; }
  .card-link { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.03em; border-bottom: 1px solid var(--line-strong); }
  .chapter-note { margin-top: 1.6rem; font-size: 0.82rem; color: var(--ink-soft); text-align: center; }

  @media (max-width: 900px) {
    .chapter-head { grid-template-columns: 1fr; }
    .chapter-desc { justify-self: start; max-width: none; }
    .product-grid { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 560px) {
    .product-grid { grid-template-columns: 1fr; }
  }

  /* ---------- certifications ---------- */
  .certs { padding-block: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--line); }
  .cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
  .cert-item { padding: 1.6rem 1.6rem 1.6rem 0; border-top: 1px solid var(--line); }
  .cert-item:nth-child(3n) { padding-right: 0; }
  .cert-label { font-size: 0.95rem; font-weight: 700; }
  .cert-desc { margin-top: 0.5rem; font-size: 0.82rem; color: var(--ink-soft); line-height: 1.55; }
  @media (max-width: 900px) { .cert-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 560px) { .cert-grid { grid-template-columns: 1fr; } }

  /* ---------- partners ---------- */
  .partners { padding-block: clamp(2.5rem, 6vw, 4rem); border-top: 1px solid var(--line); text-align: center; }
  .partners-row { margin-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 2.4rem; }
  .partners-row span {
    font-family: Georgia, serif; font-size: 1.05rem; letter-spacing: 0.03em; color: var(--ink-soft);
  }

  /* ---------- footer ---------- */
  footer.site { background: var(--ink); color: var(--paper); padding-block: clamp(3rem, 6vw, 4.5rem) 1.6rem; }
  .foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.1fr 1.2fr; gap: 2.5rem; }
  .foot-logo { height: 52px; width: auto; margin-bottom: 1.1rem; }
  .foot-about { font-size: 0.85rem; color: rgba(255,255,255,0.68); max-width: 34ch; }
  .foot-col h4 { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 1rem; }
  .foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
  .foot-col a, .foot-col p { font-size: 0.85rem; opacity: 0.85; }
  .foot-col a:hover { opacity: 1; }
  .foot-news p { font-size: 0.85rem; color: rgba(255,255,255,0.68); margin-bottom: 0.9rem; }
  .news-row { display: flex; gap: 0.5rem; }
  .news-row input {
    flex: 1; background: transparent; border: 1px solid rgba(255,255,255,0.3);
    padding: 0.55rem 0.9rem; color: var(--paper); font-size: 0.82rem;
  }
  .news-row input::placeholder { color: rgba(255,255,255,0.45); }
  .news-row button {
    background: var(--paper); color: var(--ink); border: 1px solid var(--paper);
    padding: 0.55rem 1.1rem; font-weight: 700; font-size: 0.76rem; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
  }
  .foot-bottom {
    margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,0.16);
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.8rem;
    font-size: 0.74rem; color: rgba(255,255,255,0.5);
  }
  .foot-bottom .lang-switch button { color: rgba(255,255,255,0.6); }
  .foot-bottom .lang-switch button[aria-pressed="true"] { color: var(--paper); border-color: var(--paper); }

  .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  :focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

  /* ---------- product detail modal ---------- */
  body.modal-open { overflow: hidden; }
  .detail-modal { position: fixed; inset: 0; z-index: 100; display: none; }
  .detail-modal.open { display: block; }
  .detail-modal-backdrop { position: absolute; inset: 0; background: rgba(17, 17, 17, 0.6); }
  .detail-modal-panel {
    position: relative; margin: 3vh auto; width: min(850px, 92vw); max-height: 94vh;
    background: var(--paper); box-shadow: var(--shadow); display: flex; flex-direction: column;
  }
  .detail-modal-head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.2rem; border-bottom: 1px solid var(--line);
  }
  .detail-modal-head h3 { font-size: 0.92rem; font-weight: 700; }
  .detail-modal-close {
    flex: none; width: 32px; height: 32px; border: 1px solid var(--line-strong);
    background: transparent; font-size: 1.05rem; line-height: 1;
  }
  .detail-modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .detail-modal-body img { width: 100%; display: block; }
  .detail-modal-notice {
    padding: 0.85rem 1.2rem; font-size: 0.8rem; color: var(--ink-soft);
    background: var(--paper-soft); border-bottom: 1px solid var(--line);
  }
  .detail-modal-ingredients { padding: 1.3rem 1.2rem 1.6rem; border-top: 1px solid var(--line); }
  .detail-modal-ingredients h4 {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--ink-soft); margin-bottom: 0.6rem;
  }
  .detail-modal-ingredients p { font-size: 0.78rem; line-height: 1.7; color: var(--ink-soft); }

  @media (max-width: 900px) {
    nav.primary { display: none; }
    .menu-btn { display: flex; }
    .util-row .lang-switch { display: none; }
    .foot-grid { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 560px) {
    .foot-grid { grid-template-columns: 1fr; gap: 2rem; }
  }
