/*
 * nd-global.css — ニコルデジマ Global Components
 * ================================================
 * Shared components that appear on more than one page.
 * All values reference tokens from nd-tokens.css.
 *
 * After uploading, these styles are available but most won't
 * be visible until the header/footer HTML is added in Step 7.
 * You can test pills and buttons on your test page using
 * Custom HTML blocks.
 *
 * DEPENDS ON: nd-tokens.css, nd-base.css
 *
 * SECTIONS:
 *  1. Layout containers
 *  2. Header
 *  3. Breadcrumb
 *  4. Pills / badges
 *  5. Buttons
 *  6. Section heads
 *  7. Newsletter banner
 *  8. Card base patterns
 *  9. Tag cloud
 * 10. Pagination
 * 11. Footer
 * 12. Global responsive
 */


/* ═══════════════════════════════════════════════
   1. LAYOUT CONTAINERS
   ═══════════════════════════════════════════════ */

.wrap {
  max-width: var(--container-wide);    /* 1240px */
  margin: 0 auto;
  padding: 0 var(--s-8);              /* 0 32px */
}

.wrap-narrow {
  max-width: var(--container-narrow);  /* 760px */
  margin: 0 auto;
  padding: 0 var(--s-8);              /* 0 32px */
}

/* Blog post with sidebar — built in nd-blog-post.css but
   container defined here since .with-side is referenced globally */
.with-side {
  max-width: var(--container-medium);  /* 1100px */
  margin: 0 auto;
  padding: 0 var(--s-8);              /* 0 32px */
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: var(--s-16);                    /* 64px */
  align-items: start;
}

.with-side .breadcrumb {
  grid-column: 1 / -1;
  padding-bottom: var(--s-2);
  margin-bottom: var(--s-2);
}


/* ═══════════════════════════════════════════════
   2. HEADER
   ═══════════════════════════════════════════════ */

.hdr {
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
}

/* Blog post only: sticky header (applied via body class) */
.single-post .hdr {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);           /* 50 */
}

/* WP admin bar offset when sticky */
.admin-bar.single-post .hdr {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar.single-post .hdr {
    top: 46px;
  }
}

.hdr-inner {
  display: flex;
  align-items: center;
  gap: var(--s-8);                     /* 32px */
  padding: var(--s-4_5) 0;            /* 18px 0 */
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: var(--s-2_5);                   /* 10px */
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: var(--r-ctrl);        /* 6px */
}

.brand-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.brand-sub {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 1px;
  margin-top: var(--s-0_5);           /* 2px */
}

/* Navigation */
.nav {
  display: flex;
  gap: var(--s-7);                     /* 28px */
  margin-left: var(--s-6);            /* 24px */
}

.nav a {
  font-size: 13px;
  color: var(--ink-2);
  transition: color 0.15s;
  position: relative;
  padding-bottom: var(--s-0_5);       /* 2px */
}

.nav a:hover {
  color: var(--ink);
}

.nav a.active {
  color: var(--ink);
  font-weight: 500;
}

/* Active nav underline — Article Index style */
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  height: 2px;
  background: var(--kaki);
}

/* Search pill */
.search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--s-2);                     /* 8px */
  border: 1px solid var(--hairline);
  border-radius: var(--r-circle);      /* 999px */
  padding: 7px 14px;
  width: 240px;
  background: var(--paper);
}

.search svg {
  flex-shrink: 0;
  color: var(--ink-3);
}

.search input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  font: inherit;
  font-size: 12px;
  color: var(--ink);
}

.search input::placeholder {
  color: var(--ink-3);
}

/* Hamburger button — hidden on desktop, shown on mobile */
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--r-ctrl);        /* 6px */
  background: var(--paper);
  cursor: pointer;
  flex-shrink: 0;
}

.hamburger svg {
  color: var(--ink-2);
  width: 18px;
  height: 18px;
}

/* Mobile nav drawer — hidden by default, toggled by JS */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--z-overlay);          /* 200 */
  background: rgba(0, 0, 0, 0.15);
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--paper);
  border-left: 1px solid var(--hairline);
  padding: var(--s-8);                 /* 32px */
  overflow-y: auto;
}

.mobile-drawer-close {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: var(--s-8);          /* 32px */
}

.mobile-drawer-close button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  border-radius: var(--r-ctrl);
  background: var(--paper);
  color: var(--ink-2);
  cursor: pointer;
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-drawer-nav a {
  font-size: 15px;
  color: var(--ink-2);
  padding: var(--s-3_5) 0;            /* 14px 0 */
  border-bottom: 1px dashed var(--hairline-2);
  transition: color var(--hover-dur) var(--ease-soft);
}

.mobile-drawer-nav a:last-child {
  border-bottom: none;
}

.mobile-drawer-nav a:hover {
  color: var(--kaki);
}

.mobile-drawer-nav a.active {
  color: var(--ink);
  font-weight: 500;
}


/* ═══════════════════════════════════════════════
   3. BREADCRUMB
   ═══════════════════════════════════════════════ */

.breadcrumb,
.rank-math-breadcrumb {
  padding: var(--s-6) 0 0;            /* 24px 0 0 */
  font-size: 11px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: var(--s-2);                     /* 8px */
  flex-wrap: wrap;
}

.breadcrumb a,
.rank-math-breadcrumb a {
  transition: color 0.15s;
  color: var(--ink-3);
}

.breadcrumb a:hover,
.rank-math-breadcrumb a:hover {
  color: var(--kaki);
}

.breadcrumb .sep,
.rank-math-breadcrumb .separator {
  color: var(--hairline);
}

.breadcrumb .current,
.rank-math-breadcrumb .last {
  color: var(--ink-2);
}


/* ═══════════════════════════════════════════════
   4. PILLS / BADGES
   ═══════════════════════════════════════════════ */

.pill {
  font-size: 10px;
  font-weight: 500;
  padding: var(--s-0_5) var(--s-2);   /* 3px 8px — using closest tokens */
  border-radius: var(--r-pill);        /* 3px */
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-block;
}

.pill-kaki {
  background: var(--kaki-soft);
  color: var(--kaki);
}

.pill-matcha {
  background: var(--matcha-soft);
  color: var(--matcha-ink);
}

.pill-ink {
  background: var(--ink-soft);
  color: var(--ink-2);
}

.pill-outline {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--ink-2);
}

/* Kicker — uppercase Latin micro-label */
.kicker {
  font-size: 11px;
  color: var(--kaki);
  letter-spacing: 3px;
  font-weight: 500;
  margin-bottom: var(--s-5);          /* 20px */
}

/* "NEW" badge on cards */
.new-badge {
  font-size: 10px;
  color: var(--kaki);
  font-weight: 600;
  letter-spacing: 1.5px;
  white-space: nowrap;
}

/* Tag chips */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1_5);                   /* 6px */
}

.tag-cloud .tag {
  font-size: 11px;
  color: var(--ink-2);
  background: var(--paper-2);
  padding: 5px 10px;
  border-radius: var(--r-pill);        /* 3px */
  cursor: pointer;
  transition: all 0.15s;
}

.tag-cloud .tag:hover {
  background: var(--kaki-soft);
  color: var(--kaki);
}


/* ═══════════════════════════════════════════════
   5. BUTTONS
   ═══════════════════════════════════════════════ */

.btn-primary {
  background: var(--kaki);
  color: var(--on-accent);
  border: none;
  padding: 13px 22px;
  border-radius: var(--r-ctrl);        /* 6px */
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);                     /* 8px */
  transition: background 0.15s;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--kaki-hover);
}

/* Canonicalised padding: 9px 18px (from blog post version) */
.btn-outline {
  border: 1px solid var(--ink);
  padding: 9px 18px;
  border-radius: var(--r-ctrl);        /* 6px */
  font-size: 12px;
  color: var(--ink);
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);                     /* 8px */
  transition: all 0.15s;
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-text {
  font-size: 13px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);                     /* 8px */
  transition: color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.btn-text:hover {
  color: var(--kaki);
}

/* Submit button (newsletter, comment form) */
form.fluent_form_3 .ff-btn-submit.nl-submit,
.comment-submit {
  background: var(--kaki);
  color: var(--on-accent);
  border: none;
  padding: 11px 20px;
  border-radius: var(--r-ctrl);        /* 6px */
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.comment-submit:hover {
  background: var(--kaki-hover);
}

form.fluent_form_3 button.ff-btn-submit.nl-submit {
  background-color: #d96a3a;
}

/* Share button */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1_5);                   /* 6px */
  border: 1px solid var(--hairline);
  background: var(--paper);
  padding: 8px 14px;
  border-radius: var(--r-ctrl);        /* 6px */
  font-size: 11px;
  color: var(--ink-2);
  transition: all 0.15s;
  cursor: pointer;
}

.share-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.share-btn svg {
  width: 14px;
  height: 14px;
}

/* Arrow utility */
.arrow {
  display: inline-block;
}


/* ═══════════════════════════════════════════════
   6. SECTION HEADS
   ═══════════════════════════════════════════════ */

.section {
  padding: var(--s-22) 0;             /* 88px 0 */
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--s-9);          /* 36px */
  flex-wrap: wrap;
  gap: var(--s-3);                     /* 12px */
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: var(--s-3_5);                   /* 14px */
  flex-wrap: wrap;
}

.section-title h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: 0.5px;
  margin: 0;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}

.section-title .en {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 2.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.section-link {
  font-size: 12px;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: var(--s-1_5);                   /* 6px */
  transition: color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.section-link:hover {
  color: var(--kaki);
}


/* ═══════════════════════════════════════════════
   7. NEWSLETTER BANNER
   ═══════════════════════════════════════════════ */

.newsletter {
  background: var(--paper-2);
  border-radius: var(--r-banner);      /* 10px */
  padding: var(--s-9) var(--s-12);     /* 36px 48px */
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--s-9);                     /* 36px */
  align-items: center;
}

.nl-mark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px dashed var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink-2);
  position: relative;
  flex-shrink: 0;
}

.nl-mark::after {
  content: "nikorudejima";
  position: absolute;
  bottom: -14px;
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--ink-3);
  font-family: var(--sans);
  white-space: nowrap;
}

.nl-copy {
  padding-left: var(--s-2);           /* 8px */
}

.nl-copy h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 16px;
  margin: 0 0 var(--s-1_5);           /* 0 0 6px */
  color: var(--ink);
  line-height: 1.5;
}

.nl-copy p {
  font-size: 12px;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.7;
}

.nl-form {
  display: flex;
  align-items: center;
  gap: var(--s-2_5);                   /* 10px */
}

.nl-input {
  border: 1px solid var(--hairline);
  background: var(--paper);
  padding: 11px 16px;
  border-radius: var(--r-ctrl);        /* 6px */
  font: inherit;
  font-size: 12px;
  color: var(--ink);
  width: 240px;
  outline: none;
}

.nl-input::placeholder {
  color: var(--ink-3);
}

/* Newsletter mini (sidebar variant) */
.nl-mini {
  background: var(--paper-2);
  border-radius: var(--r-card);        /* 8px */
  padding: var(--s-5_5);               /* 22px */
  display: flex;
  flex-direction: column;
  gap: var(--s-3_5);                   /* 14px */
}

.nl-mini .top {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3_5);                   /* 14px */
}

.nl-mini .mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px dashed var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink-2);
  flex-shrink: 0;
}

.nl-mini p {
  font-size: 11px;
  line-height: 1.85;
  color: var(--ink-2);
  margin: 0;
  font-family: var(--serif);
}

.nl-mini input {
  border: 1px solid var(--hairline);
  background: var(--paper);
  padding: 9px 12px;
  border-radius: var(--r-ctrl);        /* 6px */
  font: inherit;
  font-size: 12px;
  color: var(--ink);
  outline: none;
  width: 100%;
}

.nl-mini button {
  background: var(--kaki);
  color: var(--on-accent);
  border: none;
  padding: 10px;
  border-radius: var(--r-ctrl);        /* 6px */
  font-size: 12px;
  font-weight: 500;
  width: 100%;
  cursor: pointer;
}


/* ═══════════════════════════════════════════════
   8. CARD BASE PATTERNS
   ═══════════════════════════════════════════════
   Shared meta/date/read-time rules used across
   all card variants (feat-art, latest-row, arc-art,
   rel-art, art-row, side-recent-item).
   Page-specific card layouts live in their own CSS files.
   ═══════════════════════════════════════════════ */

/* Shared meta row */
.meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);                     /* 8px */
  flex-wrap: nowrap;
}

.meta .date {
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  flex-shrink: 0;
}

.meta .read,
.read-time {
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
}

/* Image placeholder gradient — reusable on any card thumbnail */
.placeholder-img {
  background: linear-gradient(135deg, var(--placeholder-from), var(--placeholder-to));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
}


/* ═══════════════════════════════════════════════
   9. PAGINATION
   ═══════════════════════════════════════════════
   Canonicalised to kaki active state (Article Index version)
   ═══════════════════════════════════════════════ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--s-1);                     /* 4px */
  margin-top: var(--s-12);            /* 48px */
}

.pagination span,
.pagination a,
.pagination .page-numbers {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--ink-2);
  border: 1px solid transparent;
  border-radius: var(--r-thumb);       /* 4px */
  cursor: pointer;
  padding: 0 var(--s-2);              /* 0 8px */
}

.pagination span.active,
.pagination .page-numbers.current {
  border-color: var(--kaki);
  color: var(--kaki);
  font-weight: 500;
  background: var(--kaki-soft);
}

.pagination span.dots {
  cursor: default;
  color: var(--ink-3);
}

.pagination span:hover:not(.active):not(.dots),
.pagination .page-numbers:hover:not(.current) {
  background: var(--paper-2);
}


/* ═══════════════════════════════════════════════
   10. FOOTER
   ═══════════════════════════════════════════════
   margin-top canonicalised to 64px (from 96/48/64 divergence)
   ═══════════════════════════════════════════════ */

.footer {
  border-top: 1px solid var(--hairline);
  padding: var(--s-14) 0 var(--s-9);   /* 56px 0 36px */
  margin-top: var(--s-16);             /* 64px — canonicalised */
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--s-12);
  margin-bottom: var(--s-9);
}

.footer-brand .brand-name {
  font-size: 16px;
}

.footer-brand p {
  font-size: 12px;
  line-height: 1.85;
  color: var(--ink-2);
  margin: var(--s-3_5) 0 var(--s-4);  /* 14px 0 16px */
  max-width: 280px;
}

.footer-col h5 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--ink-3);
  margin: 0 0 var(--s-4);             /* 0 0 16px */
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2_5);                   /* 10px */
}

.footer-col li {
  font-size: 13px;
  color: var(--ink-2);
}

.footer-col li a {
  color: var(--ink-2);
  transition: color 0.15s;
}

.footer-col li a:hover {
  color: var(--ink);
}

.footer-base {
  padding-top: var(--s-6);            /* 24px */
  border-top: 1px solid var(--hairline-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--ink-3);
  flex-wrap: wrap;
  gap: var(--s-3);                     /* 12px */
}


/* ═══════════════════════════════════════════════
   11. GLOBAL RESPONSIVE
   ═══════════════════════════════════════════════ */

/* bp-lg: sidebar collapse, grid simplification */
@media (max-width: 1000px) {  /* --bp-lg */
  .with-side {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: var(--container-narrow);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-8);                   /* 32px */
  }
}

/* bp-md: hide nav, show hamburger, compact typography */
@media (max-width: 880px) {  /* --bp-md */
  .nav,
  .search {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .newsletter {
    grid-template-columns: 1fr;
    padding: var(--s-6);               /* 24px */
    gap: var(--s-4_5);                 /* 18px */
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .newsletter .nl-mark {
    display: none;
  }

  .newsletter .nl-copy h3,
  .newsletter .nl-copy p {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
  }

  .nl-form {
    flex-direction: column;
  }

  .nl-input {
    width: 100%;
  }

  .nl-submit {
    width: 100%;
  }
}

/* bp-sm: single column, most compact */
@media (max-width: 640px) {  /* --bp-sm */
  .wrap,
  .wrap-narrow,
  .with-side {
    padding: 0 var(--s-4);            /* 0 16px — tighter on small screens */
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--s-6);                   /* 24px */
  }
}