/* Attach Part - Styles */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Copse&family=Courier+Prime&family=Noto+Sans+JP:wght@400&display=swap');

/* Unifont via jsDelivr */
@import url('https://cdn.jsdelivr.net/npm/@fontsource/unifont@5/index.min.css');

/* Self-hosted: Jost (full OpenType features) */
@font-face {
  font-family: 'Jost';
  src: url('fonts/Jost-400.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Self-hosted: Lazenby Computer */
@font-face {
  font-family: 'Lazenby Computer';
  src: url('fonts/LazenbyCompSmooth.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg: #fff8d4;
  --color-text: #000000;
  --color-accent: #56a2c4;
  --color-muted: #666;

  --font-body: 'Noto Sans JP', sans-serif;
  --font-logo: 'Jost', sans-serif;
  --font-bartleby: 'Copse', serif;
  --font-candide: 'Lazenby Computer', monospace;
  --font-mono: 'Courier Prime', monospace;

  /* Type Scale - Perfect Fifth (1.5 ratio), base 18px */
  --text-xs: 0.75rem;      /* 12px - captions, metadata */
  --text-sm: 0.875rem;     /* 14px - small text, labels */
  --text-base: 1.125rem;   /* 18px - body text */
  --text-md: 1.375rem;     /* 22px - lead text, intros */
  --text-lg: 1.75rem;      /* 28px - h4 */
  --text-xl: 2.5rem;       /* 40px - h3 */
  --text-2xl: 3.75rem;     /* 60px - h2 */
  --text-3xl: 5rem;        /* 80px - h1 */
  --text-hero: clamp(3rem, 8vw, 5rem);  /* fluid - logo, hero */

  --max-width: 1200px;
  --gap: 2rem;
  --margin-interior: 2rem;

  /* Spacing tokens for block system */
  --space-block: 2rem;      /* vertical space between blocks */
  --space-heading: 0.5rem;  /* space below headings */
  --space-line: 2rem;       /* space above/below blue line dividers */

  --border-accent: 1px solid var(--color-accent);
  --border-muted: 1px solid var(--color-muted);
}

/* ===========================================
   Internal Border System
   - Borders only between elements, not on outside edges
   - Use for grids, lists, forms with divider lines
   =========================================== */

/* Box with accent border - for form fields, cards, etc */
.accent-box {
  border: var(--border-accent);
}

/* ===========================================
   Block System
   - Consistent spacing for content blocks
   - Headings have no top margin, consistent bottom
   =========================================== */

/* Heading spacing - bottom margin for all headings */
h1, h2, h3 {
  margin-bottom: var(--space-heading);
}

/* Blue line divider utility */
.divider {
  border: none;
  border-top: var(--border-accent);
  margin: var(--space-line) 0;
}

.container > .divider {
  margin: 0;
  padding: 0;
}

/* Text color utilities */
.text-accent { color: var(--color-accent); }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: #000;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.5;
}

/* Base Typography - Semantic Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-accent);
  text-shadow:
    1px 1px 0 rgba(255, 255, 255, 0.5),
    -1px -1px 0 rgba(0, 0, 0, 0.1);
  filter: url(#deboss-noise);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5, h6 { font-size: var(--text-base); font-weight: 600; }

/* Font Family Utilities */
.font-logo { font-family: var(--font-logo); font-feature-settings: "ss01" 1; }
.font-bartleby { font-family: var(--font-bartleby); }
.font-candide { font-family: var(--font-candide); }

/* Lists - blue bullets aligned with text */
ul {
  list-style: disc;
  padding-left: 1.25em;
  margin-left: 0;
}

ul li {
  padding-left: 0.25em;
}

ul li::marker {
  color: var(--color-accent);
}

/* Vignette overlay - in CSS for instant paint, no flash */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.8) 100%);
  transition: opacity 0.25s ease-out;
  opacity: 0.99; /* Safari compositing bug workaround */
}

body.flash::before {
  opacity: 0;
}

/* Layout */
.container {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.container > * {
  padding-left: var(--margin-interior);
  padding-right: var(--margin-interior);
}

.narrow-row {
  max-width: 75%;
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

/* Prose - long-form text content */

.prose p,
.prose ul,
.prose ol {
  max-width: 66ch;
  margin-bottom: 1em;
  line-height: 1.6;
}

.prose h2,
.prose h3 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.prose hr {
  border: none;
  border-top: var(--border-accent);
  margin: var(--gap) calc(-1 * var(--margin-interior));
}

.prose > img {
  display: block;
  max-width: 75%;
  height: auto;
  margin: 0 auto 1em;
  border-radius: 10px;
  box-shadow: 1px 1px 0 0 rgba(0, 0, 0, 0.4);
}

.prose > figure {
  max-width: 75%;
  margin: var(--gap) auto;
}

.prose > figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 1px 1px 0 0 rgba(0, 0, 0, 0.4);
  margin-bottom: 0.5em;
}

.prose > .figure-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  max-width: 75%;
  margin: var(--gap) auto;
}

.prose > .figure-row figure {
  max-width: 100%;
  margin: 0;
  min-width: 0;
}

.prose > .figure-row figure img:not(.tape) {
  width: 100%;
  height: auto;
}

/* Taped images in prose */
.prose .taped-image {
  max-width: 75%;
  margin: 0 auto 1em;
}

.newsletter-date {
  display: block;
  max-width: 75%;
  margin: 1rem auto 1em;
  font-family: var(--font-logo);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--color-text);
  text-align: center;
  letter-spacing: 0.05em;
}

.newsletter-toc {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: var(--gap);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.newsletter-toc a {
  color: var(--color-text);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border: var(--border-accent);
  width: fit-content;
}

.newsletter-toc a:hover {
  background: var(--color-accent);
  color: var(--color-bg);
}

.prose > .figure-row .taped-image {
  max-width: 100%;
  margin: 0;
}

.prose figcaption {
  padding: 0 var(--margin-interior);
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* Bilingual - two column JP/EN layout */
.bilingual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.bilingual > .lang-jp {
  order: 1;
}

.bilingual > .lang-en {
  order: 2;
}

.bilingual p,
.bilingual ul,
.bilingual ol {
  margin-bottom: 1em;
  line-height: 1.6;
}

.bilingual h2,
.bilingual h3 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

/* ===========================================
   About Section - 2 column intro
   =========================================== */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.about-image .taped-image {
  aspect-ratio: 3 / 4;
  max-width: 100%;
}

.about-image .taped-image img:not(.tape) {
  object-fit: cover;
  height: 100%;
}

.about-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-text h2 {
  margin-top: 0;
  margin-bottom: 0.5em;
}

.about-text p {
  max-width: 50ch;
  margin-bottom: 1em;
  line-height: 1.6;
}

/* ===========================================
   Timeline - bars + entries layout
   =========================================== */
.timeline > h2 {
  margin-bottom: var(--gap);
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(5, 26px) 1rem 1fr;
  column-gap: 2px;
}

.bar-seg {
  background: var(--bar-color);
  border-radius: 3px;
  box-shadow: 1px 1px 0 0 rgba(0, 0, 0, 0.4);
  margin: 1px 0;
}

.bar-label {
  position: sticky;
  top: calc(50vh - 2em);
  display: block;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  color: white;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  padding: 3px 1px;
  margin: 1rem auto;
}

.timeline-grid > article {
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  border-left: var(--border-accent);
}

.timeline-grid > article time {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text);
  font-family: var(--font-mono);
  margin-bottom: 0.25rem;
}

.timeline-grid > article h3 {
  font-size: var(--text-lg);
  margin-bottom: 0.5rem;
}

.timeline-grid > article a {
  color: var(--color-accent);
  text-decoration: none;
}

.timeline-grid > article a:hover {
  text-decoration: underline;
}

.timeline-text {
  float: left;
  width: 50%;
  margin: 0 1rem 0.5rem 0;
}

.timeline-gallery .pg-gallery {
  display: block !important;
  direction: rtl;
  --photo-size: 170px;
}

.timeline-gallery .pg-gallery > * {
  display: inline-block !important;
  vertical-align: top;
  float: none !important;
  margin: 8px;
}

.timeline-grid > article::after {
  content: "";
  display: block;
  clear: both;
}

.timeline-entries article p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.timeline-entries article ul {
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
}

.timeline-entries article li {
  margin-bottom: 0.25rem;
}

/* Non-home pages get min viewport height */
body:not(.page-home) .container {
  min-height: calc(100vh - 80px);
}


/* Hero */

.hero-image {
  position: relative;
  z-index: 3;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}


/* Tape - skeuomorphic tape strips */
.tape {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  width: 94px;
  height: auto;
}

/* Hero tapes - two pieces at 25% and 75% from top */
.hero .tape-left {
  top: 0;
  left: 25%;
  transform: translateX(-50%) translateY(-50%) rotate(1.5deg);
}

.hero .tape-right {
  top: 0;
  left: 75%;
  transform: translateX(-50%) translateY(-50%) rotate(-1deg);
}

/* Product image tapes - diagonal corners */
.product-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.taped-image {
  position: relative;
  padding-top: 25px;
}

.taped-image .tape-top {
  top: 25px;
  left: 50%;
  width: 94px;
  transform: translateX(-50%) translateY(-50%) rotate(1.5deg);
}

/* Generic taped image/video styling */
.taped-image img:not(.tape),
.taped-image video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 1px 1px 0 0 rgba(0, 0, 0, 0.4);
}

/* Newsletter Row */
.newsletter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  padding-bottom: var(--space-line);
  align-items: center;
  max-width: 100%;
  position: relative;
}

.newsletter-row::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  border-bottom: var(--border-accent);
}

.newsletter-row.no-border::after {
  display: none;
}

.newsletter-row.no-border .newsletter-blurb {
  text-align: right;
}

.newsletter-row.no-border {
  max-width: 100%;
}

.newsletter-blurb p {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.4;
}

.newsletter-blurb p:last-child {
  margin-bottom: 0;
}

.newsletter-form-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Intro */
.intro {
  padding-bottom: var(--space-line);
  border-bottom: var(--border-accent);
}

.intro h2 {
  margin-top: 0.5em;
  margin-bottom: 0.25rem;
}

.intro-taglines {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.intro .tagline {
  font-size: var(--text-lg);
  line-height: 1.4;
}

/* Products Grid */
.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap) 5rem;
}

.product {
  display: block;
  position: relative;
}

.product:nth-child(2) {
  border-left: var(--border-accent);
  padding-left: 2.5rem;
  margin-left: -2.5rem;
  margin-top: calc(-1 * var(--gap));
  padding-top: var(--gap);
  margin-bottom: calc(-1 * var(--gap));
  padding-bottom: var(--gap);
}

.product-content {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.product-features {
  flex: 0 0 auto;
  list-style: none;
  padding-left: 0;
}

.product-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  max-width: 100%;
  height: auto;
}

/* Sprite Animation */
.sprite-player {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
}

.sprite-player img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  /* No transition - instant swap to prevent flicker */
}

.sprite-player img.active {
  opacity: 1;
}

.product h2 {
  margin-bottom: 0.25rem;
}

/* Console - two column on desktop, stacked on mobile */
.product-console {
  grid-column: 1 / -1;
  padding-top: var(--gap);
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 75%;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.product-console::before {
  content: '';
  position: absolute;
  top: 0;
  left: -16.667%;
  width: 133.333%;
  border-top: var(--border-accent);
}

.product-console .console-text {
  display: flex;
  flex-direction: column;
}

.product-console h2 {
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.product-console .product-image {
  display: flex;
  align-items: flex-start;
}

.product-console .product-image img:not(.tape) {
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.product-tagline {
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.product-features li {
  margin-bottom: 0.25rem;
}

.product-specs ul {
  font-family: var(--font-mono);
}

.product-specs li::marker {
  color: var(--color-text);
}

/* Bilingual spec lists — JP left, EN right with accent borders */
.bilingual-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: var(--border-accent);
}

.bilingual-specs > ul {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.bilingual-specs > ul:first-child {
  padding-right: 1.5rem;
}

.bilingual-specs > ul:last-child {
  border-left: var(--border-accent);
  padding-left: 1.5rem;
}


/* Footer */
footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: var(--border-accent);
  margin-top: var(--gap);
  padding-bottom: 2rem;
}

.footer-nav {
  grid-column: 1 / -1;
  display: flex;
  border-bottom: var(--border-accent);
}

.footer-nav a {
  flex: 1;
  padding: 0.75rem var(--gap);
  text-decoration: none;
  color: var(--color-accent);
  text-align: center;
  font-family: var(--font-mono);
}

.footer-nav a + a {
  border-left: var(--border-accent);
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-left {
  padding: var(--gap);
  padding-left: var(--margin-interior);
  display: flex;
  align-items: center;
}

.footer-right {
  border-left: var(--border-accent);
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
}

/* Right column items with borders between them */
.footer-right > * {
  padding: 0.75rem var(--gap);
}

.footer-right > * + * {
  border-top: var(--border-accent);
}

/* Contact rows */
a.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: inherit;
  font-family: var(--font-mono);
}

.contact-address {
  color: var(--color-accent);
  justify-self: start;
}

a.contact-row:hover .contact-address {
  text-decoration: underline;
}

.contact-label {
  color: var(--color-accent);
  justify-self: end;
}

.footer-right .text-accent {
  text-align: right;
}

/* Newsletter form - accent box style */
.newsletter-form {
  display: flex;
  width: 100%;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-family: var(--font-body);
  color: var(--color-accent);
}

.newsletter-form input[type="email"]::placeholder {
  color: var(--color-accent);
}

.newsletter-form input[type="email"]:focus {
  outline: none;
}

.newsletter-form button {
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: var(--color-bg);
  border: none;
  font-size: 0.875rem;
  cursor: pointer;
}

.newsletter-form button:hover {
  opacity: 0.9;
}

/* Corner Symbols - positioned at page corners */
.corner-symbol {
  position: absolute;
  font-family: 'Unifont', monospace;
  font-size: 1rem;
  color: #d8d0a8; /* slightly darker than page bg #fff8d4 */
  z-index: 50;
}

.te-page .corner-top-left {
  top: 0.75rem;
  left: calc(var(--margin-interior) + 0.25rem);
}

.te-page .corner-top-right {
  top: 0.75rem;
  right: calc(var(--margin-interior) + 0.25rem);
}

/* Bottom corners - aligned with content margin */
.te-page .corner-bottom-left {
  bottom: 0.25rem;
  left: calc(var(--margin-interior) + 0.25rem);
}

.te-page .corner-bottom-right {
  bottom: 0.25rem;
  right: calc(var(--margin-interior) + 0.25rem);
}

/* Page Header */

.page-header h1 {
  font-size: var(--text-hero);
}

/* Page Info Box - top right of page header */
.page-info {
  float: right;
  display: grid;
  grid-template-columns: auto auto;
  border-left: var(--border-accent);
  border-bottom: var(--border-accent);
  line-height: 1;
  margin-right: calc(-1 * var(--margin-interior) - 1rem);
  font-family: var(--font-mono);
}

.page-info dt,
.page-info dd {
  padding: 1rem;
}

.page-info dt {
  color: var(--color-accent);
  border-right: var(--border-accent);
}

.page-info dd {
  margin: 0;
  text-align: center;
}

.page-info dt:nth-of-type(2),
.page-info dd:last-of-type {
  border-top: var(--border-accent);
}

/* ===========================================
   Mobile Layout
   All mobile styles consolidated in one place
   =========================================== */
@media (max-width: 768px) {
  .page-info {
    display: none;
  }

  /* ===========================================
     Mobile Type Scale
     =========================================== */
  :root {
    --text-xl: 2rem;        /* 32px - h3 mobile */
    --text-2xl: 2.5rem;     /* 40px - h2 mobile */
    --text-3xl: 3rem;       /* 48px - h1 mobile */
    --text-hero: clamp(2rem, 10vw, 3rem);
  }

  /* ===========================================
     General Layout
     =========================================== */
  .container {
    padding: 0;
  }


  .narrow-row {
    max-width: 100%;
    grid-template-columns: 1fr;
  }

  /* ===========================================
     Content Margins
     Text content: 16px inset (20px from page edge)
     =========================================== */
  .container > * {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Nested elements: no extra padding (parents already have 8px) */
  .bilingual {
    padding-left: 0;
    padding-right: 0;
  }

  /* Timeline: hide bars on mobile, full-width entries */
  .timeline-grid {
    grid-template-columns: 1fr;
  }

  .bar-seg {
    display: none;
  }

  .timeline-grid > article {
    grid-column: 1;
    padding-left: 0.5rem;
    padding-right: 0;
  }

  .timeline-text {
    float: none;
    width: 100%;
    margin: 0 0 0.5rem 0;
  }

  .timeline-gallery .pg-gallery {
    --photo-size: 100px;
  }

  /* ===========================================
     Bilingual Layout
     =========================================== */
  .bilingual {
    grid-template-columns: 1fr;
  }

  .bilingual > .lang-jp {
    order: 2;
  }

  .bilingual > .lang-en {
    order: 1;
  }

  /* ===========================================
     About Section
     =========================================== */
  .about-section {
    grid-template-columns: 1fr;
  }

  .about-image .taped-image {
    max-width: 75%;
    margin: 0 auto;
  }


  /* ===========================================
     Tape
     =========================================== */
  .tape {
    width: 48px;
  }

  .taped-image {
    padding-top: 12px;
  }

  .taped-image .tape-top {
    top: 12px;
    width: 48px;
  }

  /* ===========================================
     Newsletter Row
     =========================================== */
  .newsletter-row {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 1rem;
  }

  .newsletter-row::after {
    left: 0;
    width: 100%;
  }

  /* ===========================================
     Intro
     =========================================== */
  .intro {
    border-bottom: var(--border-accent);
  }

  .intro-taglines {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* ===========================================
     Products Grid
     =========================================== */
  .products {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

  .product-bartleby {
    padding-bottom: var(--space-line);
  }

  .product:nth-child(2) {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    margin-top: 0;
    padding-top: var(--space-line);
    margin-bottom: 0;
    padding-bottom: var(--space-line);
  }

  .product:nth-child(2)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -16px;
    right: -16px;
    border-top: var(--border-accent);
  }

  /* ===========================================
     Console
     =========================================== */
  .product-console {
    grid-template-columns: 1fr;
    max-width: 100%;
    margin-top: 0;
    padding-top: var(--space-line);
    padding-bottom: var(--space-line);
  }

  .product-console::before {
    left: 0;
    width: 100%;
  }

  .product-console .product-image img {
    max-height: none;
  }

  /* ===========================================
     Footer
     =========================================== */
  footer {
    grid-template-columns: 1fr;
    border-top: var(--border-accent);
    margin-top: var(--gap);
  }

  .footer-nav a {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
  }

  .footer-left {
    padding: 0.75rem 0.5rem;
  }

  .footer-right {
    border-left: none;
    border-top: var(--border-accent);
    padding-left: 0;
    padding-top: 0;
    margin-top: 0;
  }

  .footer-right > * {
    padding: 0.75rem 0.5rem;
  }

  a.contact-row {
    font-size: 0.875rem;
  }

  .newsletter-form input[type="email"] {
    font-size: 0.75rem;
  }

  .newsletter-form input[type="email"]::placeholder {
    font-size: 0.75rem;
  }
}

/* ===========================================
   Products Page - Section Layouts
   =========================================== */

/* Shared Product Section Styles */
.product-section p {
  margin-bottom: 1em;
}

/* Bilingual two-column layout (JP left, EN right) */
.bilingual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.product-section h2 {
  margin-bottom: 0.5em;
}

.product-section h3 {
  margin-bottom: 0.5em;
}

.product-description {
  max-width: 66ch;
  line-height: 1.6;
  margin-bottom: 1.5em;
}

.product-section .product-benefits,
.product-section .product-features {
  margin-bottom: 1.5em;
}

.product-section .product-benefits ul,
.product-section .product-features ul {
  list-style: disc;
  padding-left: 1.25em;
}

.product-section .product-benefits li,
.product-section .product-features li {
  margin-bottom: 0.25em;
  padding-left: 0.25em;
}

.product-other {
  margin-top: var(--gap);
  padding-top: var(--gap);
  border-top: var(--border-accent);
}

.product-other p {
  margin-bottom: 0.5em;
}

/* Taped images in product sections - override only */
.product-section .taped-image img:not(.tape),
.product-section .taped-image video {
  object-fit: cover;
}

/* ===========================================
   Layout 1: Hero Stack (Cartridge System)
   Full-width hero, centered content, 3+1 gallery
   =========================================== */
.product-section-hero-stack .product-hero-full,
.product-section-console .product-hero-full {
  margin-bottom: var(--gap);
}

.cta-link {
  display: inline-block;
  margin: 1.5rem 0;
  padding: 0.5rem 1.25rem;
  border: var(--border-accent);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-decoration: none;
  color: var(--color-text);
}

.cta-link:hover {
  background: var(--color-accent);
  color: var(--color-bg);
}

.product-section-hero-stack .product-hero-full .taped-image {
  max-width: 100%;
}

.product-section-hero-stack .product-content-centered {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--gap);
}

.product-section-hero-stack .product-content-centered .product-description {
  margin-left: auto;
  margin-right: auto;
}

.product-section-hero-stack .product-gallery-3-1 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.product-section-hero-stack .product-gallery-3-1 .gallery-center {
  grid-column: 2;
}

.product-section-hero-stack .product-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.product-section-hero-stack .product-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}

/* ===========================================
   Layout 2: Split Left (Bartleby)
   Hero left 55%, content right 45%, 4-col gallery
   =========================================== */
.product-section-split-left .product-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.product-section-split-left .product-hero-col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.product-section-split-left .product-info-col {
  display: flex;
  flex-direction: column;
}

/* Gallery inside hero column — smaller photos to flow 2-3 across */
.product-hero-col > .pg-gallery {
  --photo-size: 160px;
  margin: 1rem 0 0 0;
}

/* Font family now set via .font-bartleby class in HTML */

.product-section-split-left .product-gallery-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  margin-bottom: var(--gap);
}

/* ===========================================
   Layout 3: Split Right (Candide)
   Content left 45%, hero right 55%, 2x2 gallery
   =========================================== */
.product-section-split-right .product-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.product-section-split-right .product-hero-col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.product-section-split-right .product-info-col {
  display: flex;
  flex-direction: column;
}

/* Font family now set via .font-candide class in HTML */

.product-section-split-right .product-gallery-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  max-width: 60%;
  margin-bottom: var(--gap);
}

/* ===========================================
   Layout 4: Editorial (Attach Part Console)
   Masonry-style offset images with varying sizes
   =========================================== */
/* Font family now set via .font-logo class in HTML */

.product-section-editorial .product-editorial-header {
  margin-bottom: var(--gap);
}

.product-section-editorial .product-editorial-header .product-description {
  max-width: 60ch;
}

/* Editorial grid removed - using single hero image */

.product-section-editorial .product-editorial-hero {
  margin-bottom: var(--gap);
}

/* Editorial thumb/wide elements removed - using single hero image */

.product-section-editorial .product-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

/* ===========================================
   Layout 5: Console (narrow left-aligned)
   =========================================== */
/* Font family now set via .font-logo class in HTML */

.product-content-narrow {
  max-width: 60ch;
}

.product-content-narrow p {
  margin-bottom: 1rem;
}

.product-closer {
  font-size: 1.5rem;
  font-weight: 400;
  margin-top: 1.5rem;
}

/* ===========================================
   Products Page - Mobile Styles
   =========================================== */
@media (max-width: 768px) {
  /* Hero Stack Mobile */
  .product-section-hero-stack .product-gallery-3-1 {
    grid-template-columns: 1fr 1fr;
  }

  .product-section-hero-stack .product-gallery-3-1 .gallery-center {
    grid-column: auto;
  }

  .product-section-hero-stack .product-details-grid {
    grid-template-columns: 1fr;
  }

  /* Split Left Mobile */
  .product-section-split-left .product-split-grid {
    grid-template-columns: 1fr;
  }

  .product-section-split-left .product-hero-col {
    order: -1;
  }

  .product-section-split-left .product-hero-col .taped-image {
    max-width: 75%;
    margin: 0 auto;
  }

  .product-section-split-left .product-gallery-4 {
    grid-template-columns: 1fr 1fr;
  }

  /* Split Right Mobile */
  .product-section-split-right .product-split-grid {
    grid-template-columns: 1fr;
  }

  .product-section-split-right .product-hero-col {
    order: -1;
  }

  .product-section-split-right .product-hero-col .taped-image {
    max-width: 75%;
    margin: 0 auto;
  }

  .product-section-split-right .product-gallery-2x2 {
    max-width: 100%;
  }

  /* Editorial Mobile */
  .product-section-editorial .product-details-grid {
    grid-template-columns: 1fr;
  }

  .bilingual-grid {
    grid-template-columns: 1fr;
  }

  .bilingual-specs {
    grid-template-columns: 1fr;
  }

  .bilingual-specs > ul {
    padding-left: 1.25em;
    padding-right: 0;
  }

  .bilingual-specs > ul:first-child {
    padding-right: 0;
  }

  .bilingual-specs > ul:last-child {
    border-left: none;
    border-top: var(--border-accent);
    padding-left: 1.25em;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
  }

}
