@layer base, layout, components, utilities, pages;

/**
 * Privacy Policy Page - 2025 Design
 *
 * Aesthetic: Editorial/Magazine + Luxury Minimal
 * Features:
 * - Bilingual JP/EN typography
 * - Bento-grid inspired layout
 * - Glassmorphism accents
 * - Scroll-triggered animations
 * - Dynamic typography with variable fonts
 */

/* Import distinctive fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

@layer pages {

  /* ==========================================================================
     CSS Custom Properties (Page-specific)
     ========================================================================== */

  .privacy {
    --pp-font-en: 'Outfit', var(--font-sans);
    --pp-font-jp: 'Zen Kaku Gothic New', var(--font-sans);

    --pp-dark: #0a0e17;
    --pp-navy: #0f172a;
    --pp-slate: #1e293b;
    --pp-muted: #64748b;
    --pp-light: #f1f5f9;
    --pp-white: #ffffff;
    --pp-accent: #3b82f6;
    --pp-accent-soft: rgba(59, 130, 246, 0.12);

    --pp-glass: rgba(255, 255, 255, 0.03);
    --pp-glass-border: rgba(255, 255, 255, 0.08);
    --pp-glass-light: rgba(255, 255, 255, 0.85);
    --pp-glass-light-border: rgba(15, 23, 42, 0.06);

    --pp-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --pp-ease-out: cubic-bezier(0, 0, 0.2, 1);
  }

  /* ==========================================================================
     Animation Keyframes
     ========================================================================== */

  @keyframes pp-fade-up {
    from {
      opacity: 0;
      transform: translateY(32px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes pp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes pp-grid-pulse {
    0%, 100% { opacity: 0.03; }
    50% { opacity: 0.06; }
  }

  @keyframes pp-gradient-shift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-5%, 5%) scale(1.05); }
    100% { transform: translate(0, 0) scale(1); }
  }

  @keyframes pp-number-glow {
    0%, 100% { text-shadow: 0 0 20px rgba(59, 130, 246, 0); }
    50% { text-shadow: 0 0 40px rgba(59, 130, 246, 0.3); }
  }

  /* ==========================================================================
     Base Animation Classes
     ========================================================================== */

  [data-animate] {
    opacity: 0;
  }

  [data-animate].is-visible {
    animation: pp-fade-up 0.8s var(--pp-ease) forwards;
  }

  [data-animate][data-delay="100"].is-visible { animation-delay: 0.1s; }
  [data-animate][data-delay="200"].is-visible { animation-delay: 0.2s; }
  [data-animate][data-delay="300"].is-visible { animation-delay: 0.3s; }
  [data-animate][data-delay="400"].is-visible { animation-delay: 0.4s; }

  /* ==========================================================================
     Hero Section
     ========================================================================== */

  .privacy-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--pp-dark) 0%, var(--pp-navy) 50%, var(--pp-slate) 100%);
    overflow: hidden;
  }

  .privacy-hero__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  .privacy-hero__grid {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: pp-grid-pulse 8s ease-in-out infinite;
  }

  .privacy-hero__gradient {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    animation: pp-gradient-shift 12s ease-in-out infinite;
  }

  .privacy-hero__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 48px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: end;
  }

  .privacy-hero__content {
    max-width: 720px;
  }

  .privacy-hero__eyebrow {
    display: inline-block;
    font-family: var(--pp-font-en);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--pp-accent);
    margin-bottom: 24px;
    padding: 6px 14px;
    background: var(--pp-accent-soft);
    border-radius: 100px;
  }

  .privacy-hero__titles {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
  }

  .privacy-hero__title-en {
    font-family: var(--pp-font-en);
    font-size: clamp(56px, 8vw, 96px);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--pp-white);
    margin: 0;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .privacy-hero__title-jp {
    font-family: var(--pp-font-jp);
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 500;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.6);
    margin: 12px 0 0;
  }

  .privacy-hero__lead {
    font-family: var(--pp-font-jp);
    font-size: 16px;
    line-height: 2;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
  }

  .privacy-hero__meta {
    flex-shrink: 0;
    align-self: end;
  }

  .privacy-hero__meta-card {
    padding: 20px 28px;
    background: var(--pp-glass);
    border: 1px solid var(--pp-glass-border);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
  }

  .privacy-hero__meta-label {
    display: block;
    font-family: var(--pp-font-en);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
  }

  .privacy-hero__meta-date {
    display: block;
    font-family: var(--pp-font-en);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--pp-white);
  }

  /* ==========================================================================
     Table of Contents (Sticky Navigation)
     ========================================================================== */

  .privacy-toc {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--pp-glass-light);
    border-bottom: 1px solid var(--pp-glass-light-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .privacy-toc__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
    display: flex;
    align-items: center;
    gap: 32px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .privacy-toc__inner::-webkit-scrollbar {
    display: none;
  }

  .privacy-toc__label {
    flex-shrink: 0;
    font-family: var(--pp-font-en);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--pp-muted);
    padding: 20px 0;
  }

  .privacy-toc__list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc-counter;
  }

  .privacy-toc__list li {
    counter-increment: toc-counter;
  }

  .privacy-toc__list a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 20px 16px;
    font-family: var(--pp-font-jp);
    font-size: 13px;
    font-weight: 500;
    color: var(--pp-slate);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.25s var(--pp-ease);
  }

  .privacy-toc__list a::before {
    content: counter(toc-counter, decimal-leading-zero);
    font-family: var(--pp-font-en);
    font-size: 10px;
    font-weight: 600;
    color: var(--pp-muted);
    transition: color 0.25s var(--pp-ease);
  }

  .privacy-toc__list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--pp-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--pp-ease);
  }

  .privacy-toc__list a:hover,
  .privacy-toc__list a.is-active {
    color: var(--pp-navy);
  }

  .privacy-toc__list a:hover::before,
  .privacy-toc__list a.is-active::before {
    color: var(--pp-accent);
  }

  .privacy-toc__list a:hover::after,
  .privacy-toc__list a.is-active::after {
    transform: scaleX(1);
  }

  /* ==========================================================================
     Main Content Area
     ========================================================================== */

  .privacy-main {
    background: var(--pp-white);
    padding: 80px 0 120px;
  }

  .privacy-main__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 48px;
  }

  /* ==========================================================================
     Section Blocks
     ========================================================================== */

  .privacy-section {
    margin-bottom: 64px;
    padding-bottom: 64px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  }

  .privacy-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }

  .privacy-section__header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
  }

  .privacy-section__num {
    flex-shrink: 0;
    font-family: var(--pp-font-en);
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--pp-light);
    transition: color 0.4s var(--pp-ease);
  }

  .privacy-section:hover .privacy-section__num {
    color: var(--pp-accent);
    animation: pp-number-glow 2s ease-in-out infinite;
  }

  .privacy-section__titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
  }

  .privacy-section__en {
    font-family: var(--pp-font-en);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pp-accent);
  }

  .privacy-section__jp {
    font-family: var(--pp-font-jp);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--pp-navy);
    margin: 0;
  }

  .privacy-section__body {
    padding-left: 72px;
  }

  .privacy-section__body p {
    font-family: var(--pp-font-jp);
    font-size: 15px;
    line-height: 2;
    color: var(--pp-slate);
    margin: 0 0 20px;
  }

  .privacy-section__body p:last-child {
    margin-bottom: 0;
  }

  /* ==========================================================================
     List Styling
     ========================================================================== */

  .privacy-list {
    list-style: none;
    margin: 24px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .privacy-list li {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    font-family: var(--pp-font-jp);
    font-size: 14px;
    line-height: 1.8;
    color: var(--pp-slate);
    background: linear-gradient(135deg, var(--pp-light) 0%, rgba(241, 245, 249, 0.5) 100%);
    border-radius: 12px;
    transition: all 0.3s var(--pp-ease);
  }

  .privacy-list li:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
    transform: translateX(4px);
  }

  .privacy-list li::before {
    content: '';
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    margin-top: 8px;
    background: var(--pp-accent);
    border-radius: 50%;
    transition: transform 0.3s var(--pp-ease);
  }

  .privacy-list li:hover::before {
    transform: scale(1.5);
  }

  /* ==========================================================================
     Contact Section
     ========================================================================== */

  .privacy-section--contact {
    margin-top: 64px;
    padding: 0;
    border-bottom: none;
  }

  .privacy-contact {
    margin-top: 32px;
    padding: 40px 48px;
    background: var(--pp-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
  }

  .privacy-contact__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .privacy-contact__company {
    font-family: var(--pp-font-jp);
    font-size: 18px;
    font-weight: 700;
    color: var(--pp-navy);
    margin: 0;
  }

  .privacy-contact__dept {
    font-family: var(--pp-font-jp);
    font-size: 13px;
    color: var(--pp-muted);
    margin: 0 0 12px;
  }

  .privacy-contact__address {
    font-family: var(--pp-font-jp);
    font-size: 14px;
    line-height: 1.7;
    color: var(--pp-slate);
    margin: 0;
    white-space: pre-line;
  }

  .privacy-contact__tel {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0;
  }

  .privacy-contact__tel-label {
    font-family: var(--pp-font-en);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--pp-muted);
  }

  .privacy-contact__tel-number {
    font-family: var(--pp-font-en);
    font-size: 16px;
    font-weight: 600;
    color: var(--pp-navy);
  }

  .privacy-contact__btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    font-family: var(--pp-font-jp);
    font-size: 14px;
    font-weight: 600;
    color: var(--pp-white);
    background: var(--pp-navy);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s var(--pp-ease);
  }

  .privacy-contact__btn:hover {
    background: var(--pp-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
  }

  .privacy-contact__btn-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.25s var(--pp-ease);
  }

  .privacy-contact__btn:hover .privacy-contact__btn-icon {
    transform: translateX(3px);
  }

  /* ==========================================================================
     Responsive - Tablet
     ========================================================================== */

  @media (max-width: 1024px) {
    .privacy-hero__inner {
      padding: 64px 32px;
      gap: 32px;
    }

    .privacy-hero__title-en {
      font-size: clamp(48px, 7vw, 72px);
    }

    .privacy-toc__inner {
      padding: 0 32px;
    }

    .privacy-main__inner {
      padding: 0 32px;
    }

    .privacy-section__body {
      padding-left: 64px;
    }

    .privacy-section--contact {
      padding: 48px 40px;
    }
  }

  /* ==========================================================================
     Responsive - Mobile
     ========================================================================== */

  @media (max-width: 768px) {
    .privacy-hero {
      min-height: 480px;
    }

    .privacy-hero__inner {
      grid-template-columns: 1fr;
      padding: 48px 24px;
      gap: 40px;
      align-items: stretch;
    }

    .privacy-hero__eyebrow {
      font-size: 10px;
      margin-bottom: 20px;
    }

    .privacy-hero__title-en {
      font-size: 48px;
    }

    .privacy-hero__title-jp {
      font-size: 16px;
    }

    .privacy-hero__lead {
      font-size: 14px;
    }

    .privacy-hero__lead .sp-only {
      display: inline;
    }

    .privacy-hero__meta {
      align-self: stretch;
    }

    .privacy-hero__meta-card {
      padding: 16px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .privacy-hero__meta-label {
      margin-bottom: 0;
    }

    .privacy-hero__meta-date {
      font-size: 18px;
    }

    .privacy-toc {
      position: relative;
    }

    .privacy-toc__inner {
      padding: 0 20px;
      gap: 16px;
    }

    .privacy-toc__label {
      display: none;
    }

    .privacy-toc__list {
      gap: 0;
    }

    .privacy-toc__list a {
      padding: 16px 12px;
      font-size: 12px;
    }

    .privacy-main {
      padding: 56px 0 80px;
    }

    .privacy-main__inner {
      padding: 0 24px;
    }

    .privacy-section {
      margin-bottom: 48px;
      padding-bottom: 48px;
    }

    .privacy-section__header {
      flex-direction: column;
      gap: 12px;
    }

    .privacy-section__num {
      font-size: 36px;
    }

    .privacy-section__titles {
      padding-top: 0;
    }

    .privacy-section__en {
      font-size: 10px;
    }

    .privacy-section__jp {
      font-size: 18px;
    }

    .privacy-section__body {
      padding-left: 0;
    }

    .privacy-section__body p {
      font-size: 14px;
    }

    .privacy-list li {
      padding: 14px 16px;
      font-size: 13px;
    }

    .privacy-section--contact {
      margin-top: 48px;
    }

    .privacy-contact {
      flex-direction: column;
      align-items: stretch;
      padding: 28px 24px;
      gap: 24px;
    }

    .privacy-contact__company {
      font-size: 16px;
    }

    .privacy-contact__btn {
      width: 100%;
      justify-content: center;
      padding: 14px 20px;
    }
  }

  /* ==========================================================================
     Utility: Desktop-only line break
     ========================================================================== */

  .sp-only {
    display: none;
  }

  @media (max-width: 768px) {
    .sp-only {
      display: inline;
    }
  }

  /* ==========================================================================
     Print Styles
     ========================================================================== */

  @media print {
    .privacy-hero {
      background: #fff;
      color: #000;
      min-height: auto;
      padding: 40px 0;
    }

    .privacy-hero__bg,
    .privacy-toc {
      display: none;
    }

    .privacy-hero__title-en,
    .privacy-hero__title-jp,
    .privacy-hero__lead {
      color: #000;
      -webkit-text-fill-color: #000;
    }

    .privacy-section--contact {
      background: #f5f5f5;
    }
  }
}
