/* =========================================================================
   Pappenfüs Design Gallery. Shared styles.
   Surface: cream blueprint paper with subtle dark grid.
   Mockups inside each concept card render the live dark site.
   ========================================================================= */

:root {
  /* Paper surface tokens. Outer document. */
  --paper:        #f0e4cb;
  --paper-soft:   #e7d9b9;
  --paper-warm:   #ede1c5;
  --ink-d:        #1f1b17;
  --ink-d-soft:   #5d5246;
  --ink-d-mute:   #87796a;
  --line-d:       rgba(31, 27, 23, 0.14);
  --line-d-soft:  rgba(31, 27, 23, 0.08);
  --rust:         #9a4f2a;
  --copper:       #c8946a;
  --copper-deep:  #9a6c40;
  --shop-shadow:  0 24px 70px rgba(50, 30, 12, 0.18);

  /* Dark mockup tokens. Inside the live-site previews. */
  --bg-deep:   #0c0a08;
  --bg-panel:  #15110d;
  --bg-elev:   #1c1812;
  --line:      #2a2218;
  --ink:       #f1ebde;
  --ink-mute:  #b8ad97;
  --ink-soft:  #847a66;
  --accent:        #c89464;
  --accent-deep:   #9a6c40;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body {
  background-color: var(--paper);
  color: var(--ink-d);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body {
  /* Workshop blueprint grid. */
  background-image:
    linear-gradient(rgba(31, 27, 23, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 27, 23, 0.05) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}
/* Slow drifting warm light, like sun across a workbench. */
body::before, body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}
body::before {
  inset: -40vh -20vw -40vh -20vw;
  background: radial-gradient(circle 60vmax at 22% 18%,
    rgba(154, 79, 42, 0.10) 0%,
    rgba(154, 79, 42, 0.05) 38%,
    rgba(154, 79, 42, 0.01) 70%,
    transparent 100%);
  animation: gDriftA 130s linear infinite;
}
body::after {
  inset: -40vh -20vw -40vh -20vw;
  background: radial-gradient(circle 55vmax at 82% 78%,
    rgba(200, 148, 100, 0.08) 0%,
    rgba(200, 148, 100, 0.04) 42%,
    rgba(200, 148, 100, 0.01) 78%,
    transparent 100%);
  animation: gDriftB 100s linear infinite;
}
@keyframes gDriftA {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1); }
  50%  { transform: translate3d(2%, 1%, 0) scale(1.05); }
  100% { transform: translate3d(-2%, -1%, 0) scale(1); }
}
@keyframes gDriftB {
  0%   { transform: translate3d(2%, 1%, 0) scale(1.02); }
  50%  { transform: translate3d(-2%, -1%, 0) scale(1.07); }
  100% { transform: translate3d(2%, 1%, 0) scale(1.02); }
}

/* =========================================================================
   Document chrome.
   ========================================================================= */
.doc {
  max-width: 1480px;
  margin: 0 auto;
  padding: 56px 32px 96px;
  position: relative;
  z-index: 1;
}

/* Top utility bar. Sticky for easy navigation between page galleries. */
.gallery-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  margin: 0 -28px 32px;
  border-bottom: 1px solid var(--line-d);
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(240, 228, 203, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(50, 30, 12, 0.06);
}
.gallery-chrome .brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.gallery-chrome .brand img {
  height: 38px;
  width: auto;
  /* Logo asset is light cream. Filter to dark for paper background. */
  filter: brightness(0) saturate(100%) invert(11%) sepia(20%) saturate(720%) hue-rotate(2deg) brightness(96%);
}
.gallery-chrome .brand-meta {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-d-mute);
}
.gallery-chrome nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.gallery-chrome nav a {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-d-soft);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.gallery-chrome nav a:hover { color: var(--rust); border-bottom-color: var(--rust); }
.gallery-chrome nav a.current { color: var(--rust); border-bottom-color: var(--rust); }

/* Document header card sitting on the paper. */
.doc-header {
  border: 1px solid var(--line-d);
  background: rgba(247, 240, 222, 0.65);
  backdrop-filter: blur(4px);
  padding: 48px 56px;
  margin-bottom: 56px;
  box-shadow: var(--shop-shadow);
  position: relative;
}
.doc-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 18px;
}
.doc-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 48px;
  line-height: 1.05;
  color: var(--ink-d);
  margin-bottom: 20px;
  letter-spacing: -0.015em;
  max-width: 22ch;
}
.doc-lede {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.55;
  color: var(--ink-d-soft);
  max-width: 760px;
  margin-bottom: 28px;
}
.doc-howto {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-d-mute);
  max-width: 800px;
  border-top: 1px solid var(--line-d);
  padding-top: 24px;
}
.doc-howto strong { color: var(--ink-d-soft); font-weight: 500; }

/* =========================================================================
   Treatment / concept-card structure.
   Each concept-card = one selectable variant.
   ========================================================================= */
.treatment {
  margin-bottom: 80px;
  position: relative;
}
.treatment-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  border-bottom: 1px solid var(--line-d);
  padding-bottom: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.treatment-tag {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rust);
  flex-shrink: 0;
}
.treatment-name {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  color: var(--ink-d);
  letter-spacing: -0.005em;
  flex-shrink: 0;
}
.treatment-intent {
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  color: var(--ink-d-mute);
  margin-left: auto;
  text-align: right;
  max-width: 460px;
}

.concept-grid {
  display: grid;
  gap: 36px;
}

.concept-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.32fr) minmax(0, 1fr);
  border: 1px solid var(--line-d);
  background: rgba(247, 240, 222, 0.55);
  box-shadow: var(--shop-shadow);
  overflow: hidden;
  position: relative;
}
.concept-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--copper-deep), transparent);
  opacity: 0.6;
  z-index: 5;
}

/* Notes panel (left side of each concept-card) */
.concept-notes {
  padding: 32px 28px;
  border-right: 1px solid var(--line-d);
  background: rgba(237, 225, 197, 0.45);
  display: flex;
  flex-direction: column;
}
.concept-kicker {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 600;
  margin-bottom: 14px;
}
.concept-name {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink-d);
  margin-bottom: 8px;
}
.concept-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-d-soft);
  line-height: 1.45;
  margin-bottom: 24px;
}
.concept-meta {
  list-style: none;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-d-soft);
  margin-top: auto;
}
.concept-meta li {
  padding: 12px 0;
  border-top: 1px solid var(--line-d);
}
.concept-meta li:last-child { border-bottom: 1px solid var(--line-d); }
.concept-meta strong {
  display: block;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 4px;
  font-weight: 600;
}
.concept-pick {
  margin-top: 22px;
  padding: 10px 0 0;
  border-top: 1px solid var(--line-d);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-d-mute);
}
.concept-pick::before {
  content: "Reference label .";
  display: block;
  font-size: 9px;
  letter-spacing: 0.32em;
  color: var(--ink-d-mute);
  opacity: 0.6;
  margin-bottom: 4px;
  font-weight: 400;
}
.concept-pick { font-weight: 600; color: var(--rust); }

/* =========================================================================
   Mockup. The dark live-site preview inside each concept-card.
   ========================================================================= */
.mockup {
  position: relative;
  background: var(--bg-deep);
  overflow: hidden;
  min-height: 640px;
  box-shadow:
    0 1px 0 rgba(241, 235, 222, 0.06) inset,
    inset 0 0 0 1px rgba(0, 0, 0, 0.5);
  /* Suppress any inner scrollbar that might leak to the right edge */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mockup::-webkit-scrollbar { display: none; }
.mockup *::-webkit-scrollbar { display: none; }
.mockup * { scrollbar-width: none; -ms-overflow-style: none; }
.mockup-bar {
  height: 32px;
  background: #0a0907;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 6px;
  border-bottom: 1px solid var(--line);
}
.mockup-bar i {
  width: 10px; height: 10px; border-radius: 50%;
  background: #2a2218; display: block;
}
.mockup-bar .url {
  margin-left: 18px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

/* Site nav inside the dark mockup */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 36px;
  position: absolute;
  top: 32px; left: 0; right: 0;
  z-index: 5;
}
.site-nav.solid { position: relative; top: auto; padding: 18px 36px; background: rgba(12,10,8,0.85); border-bottom: 1px solid var(--line); }
.nav-brand { display: block; }
.nav-brand img { display: block; height: 36px; width: auto; }
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-decoration: none;
}
.nav-cta {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 9px 16px;
  border: 1px solid var(--accent-deep);
  text-decoration: none;
}

/* CTAs */
.btn-primary, .btn-secondary {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 30px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}
.btn-primary { color: var(--bg-deep); background: var(--accent); }
.btn-secondary {
  color: var(--ink);
  border: 1px solid var(--ink-soft);
  background: transparent;
  font-weight: 400;
}

/* =========================================================================
   Reusable rotating gallery component.
   ========================================================================= */
.rot {
  position: relative;
  overflow: hidden;
}
.rot-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: rotFade 24s infinite;
}
.rot-slide video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.rot-slide:nth-child(1) { animation-delay: 0s; }
.rot-slide:nth-child(2) { animation-delay: 6s; }
.rot-slide:nth-child(3) { animation-delay: 12s; }
.rot-slide:nth-child(4) { animation-delay: 18s; }
.rot-3 .rot-slide { animation-duration: 18s; }
.rot-3 .rot-slide:nth-child(1) { animation-delay: 0s; }
.rot-3 .rot-slide:nth-child(2) { animation-delay: 6s; }
.rot-3 .rot-slide:nth-child(3) { animation-delay: 12s; }
@keyframes rotFade {
  0%   { opacity: 0; }
  4%   { opacity: 1; }
  25%  { opacity: 1; }
  29%  { opacity: 0; }
  100% { opacity: 0; }
}

/* Pulse for live-element indicators. */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(200, 148, 100, 0.18); }
  50%      { box-shadow: 0 0 0 9px rgba(200, 148, 100, 0.05); }
}

/* =========================================================================
   Single-variant mobile mode. When a .concept-card is targeted via URL hash
   (e.g. #home-a), the page hides everything except that one mockup so it can
   be embedded in an iPhone-style iframe for the mobile demo.
   ========================================================================= */
body:has(.concept-card:target) {
  background: var(--bg-deep);
  background-image: none;
}
body:has(.concept-card:target)::before,
body:has(.concept-card:target)::after { display: none; }
body:has(.concept-card:target) .gallery-chrome,
body:has(.concept-card:target) .doc-header,
body:has(.concept-card:target) .treatment-header,
body:has(.concept-card:target) .feedback,
body:has(.concept-card:target) .footer-note,
body:has(.concept-card:target) .concept-notes { display: none; }
body:has(.concept-card:target) .doc { padding: 0; max-width: none; }
body:has(.concept-card:target) .treatment { margin: 0; }
body:has(.concept-card:target) .concept-card { display: none; }
body:has(.concept-card:target) .concept-card:target {
  display: block;
  grid-template-columns: 1fr;
  border: none;
  box-shadow: none;
  background: transparent;
}
body:has(.concept-card:target) .concept-card::before { display: none; }
body:has(.concept-card:target) .mockup {
  border: none;
  box-shadow: none;
  min-height: 100vh;
}
body:has(.concept-card:target) .mockup-bar { display: none; }

/* =========================================================================
   Subtle zoom-on-view. Apply data-zoom-on-view to any element with a
   background image or to a wrapper around an <img>.
   ========================================================================= */
[data-zoom-on-view] {
  background-size: cover;
  transition: background-size 2800ms cubic-bezier(0.19, 1, 0.22, 1),
              transform 2800ms cubic-bezier(0.19, 1, 0.22, 1);
  will-change: background-size, transform;
}
[data-zoom-on-view].zoom-active {
  background-size: 110%;
}
[data-zoom-on-view] img {
  transform: scale(1.005);
  transform-origin: center center;
  transition: transform 2800ms cubic-bezier(0.19, 1, 0.22, 1);
  will-change: transform;
}
[data-zoom-on-view].zoom-active img {
  transform: scale(1.085);
}

/* =========================================================================
   Hub page (pappenfus-design-gallery.html).
   Grid of cards linking to each page-type gallery.
   ========================================================================= */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}
.hub-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-d);
  background: rgba(247, 240, 222, 0.7);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shop-shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 80px rgba(50, 30, 12, 0.24);
}
.hub-card-thumb {
  height: 180px;
  background: var(--bg-deep);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.hub-card-thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,10,8,0.0) 50%, rgba(12,10,8,0.55) 100%);
}
.hub-card-body {
  padding: 22px 26px 26px;
}
.hub-card-num {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 10px;
  font-weight: 600;
}
.hub-card-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-d);
  margin-bottom: 8px;
}
.hub-card-deck {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-d-soft);
  line-height: 1.5;
  margin-bottom: 14px;
}
.hub-card-arrow {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 600;
}

/* =========================================================================
   Footer feedback prompt.
   ========================================================================= */
.feedback {
  margin-top: 80px;
  border: 1px solid var(--line-d);
  background: rgba(247, 240, 222, 0.7);
  backdrop-filter: blur(4px);
  padding: 56px 56px;
  text-align: center;
  box-shadow: var(--shop-shadow);
}
.feedback-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 16px;
}
.feedback-q {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink-d);
  max-width: 760px;
  margin: 0 auto 16px;
}
.feedback-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--ink-d-soft);
  max-width: 600px;
  margin: 0 auto;
}
.footer-note {
  text-align: center;
  margin-top: 32px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-d-mute);
}
.footer-note code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  background: rgba(31, 27, 23, 0.06);
  padding: 2px 6px;
  letter-spacing: 0.02em;
  color: var(--ink-d-soft);
  text-transform: none;
}

/* =========================================================================
   Mobile.
   ========================================================================= */
@media (max-width: 1000px) {
  .concept-card { grid-template-columns: 1fr; }
  .concept-notes { border-right: none; border-bottom: 1px solid var(--line-d); padding: 22px 22px; }
  .concept-meta { margin-top: 16px; }
  .mockup { min-height: 520px; }
}
@media (max-width: 700px) {
  .doc { padding: 28px 14px 64px; }
  .doc-header { padding: 24px 22px; }
  .doc-title { font-size: 30px; }
  .doc-lede { font-size: 16px; }
  .gallery-chrome { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 18px; margin: 0 -14px 22px; }
  .gallery-chrome nav { gap: 14px; font-size: 10px; }
  .treatment-header { gap: 8px; }
  .treatment-name { font-size: 22px; }
  .treatment-intent { margin-left: 0; text-align: left; font-size: 14px; max-width: 100%; }
  .site-nav { padding: 14px 18px; top: 22px; flex-wrap: wrap; gap: 10px; }
  .nav-links { display: none; }
  .nav-brand img { height: 28px; }
  .feedback { padding: 32px 22px; }
  .feedback-q { font-size: 22px; }
  .hub-card-title { font-size: 22px; }
}
