/* Besere Oil — shared layer for inner pages (implements the common patterns
   of the *.dc.html designs: page entrance, reveals, footer links, nav wrap,
   logo fallback, label/content split collapse, reduced motion).
   Page-specific keyframes live in assets/css/<page>.css. */

@keyframes pageIn { from { transform: translateX(100%); } to { transform: none; } }
@keyframes reveal { from { opacity: 0; transform: translateY(1.4rem); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(1.8rem); } to { opacity: 1; transform: none; } }
@keyframes drawX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0.12; } }

body { overflow-x: clip; }
a:hover { color: var(--color-accent-600); }

/* Scroll-driven reveals — same contract as home.css. Browsers without
   animation-timeline simply play the animation on load. */
.sr { animation: reveal 0.8s both; animation-timeline: view(); animation-range: entry 0% entry 30%; }
.sr-d1 { animation-delay: 0.1s; }
.drawx {
  transform-origin: left;
  animation: drawX 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-timeline: view(); animation-range: entry 0% entry 40%;
}
@supports not (animation-timeline: view()) {
  .sr, .drawx { animation-timeline: auto; animation-range: normal; }
}

/* — footer links — */
.m-flink { color: inherit; text-decoration: none; font-size: 0.9rem; }
.m-flink:hover { color: var(--color-accent-700); }

/* — logo fallback (used until assets/img/logo.png loads) — */
.logo-fallback {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 1.35rem; letter-spacing: 0.02em; white-space: nowrap;
  color: var(--color-text);
}
.logo-fallback em { font-style: normal; color: var(--color-accent); }

/* — responsive — */
/* label/content two-column sections stack on small screens */
@media (max-width: 720px) {
  .m-split { grid-template-columns: 1fr !important; gap: var(--space-4) !important; }
}
@media (max-width: 640px) {
  .m-nav { gap: var(--space-3) !important; }
}

/* — reduced motion — */
@media (prefers-reduced-motion: reduce) {
  .sr, .drawx,
  [style*="animation"] { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* — inner-page hero: dark editorial band, optional photo background — */
.ihero {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
  min-height: clamp(24rem, 58vh, 36rem);
  background:
    repeating-linear-gradient(to right,
      color-mix(in srgb, var(--color-bg) 5%, transparent) 0,
      color-mix(in srgb, var(--color-bg) 5%, transparent) 0.0625rem,
      transparent 0.0625rem, transparent 8rem),
    var(--color-neutral-900);
  border-bottom: calc(var(--space-1) / 2) solid var(--color-divider);
}
.ihero-media { position: absolute; inset: 0; }
.ihero-media img, .ihero-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ihero-photo { min-height: 100svh; }
.ihero-photo::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to top,
      color-mix(in srgb, var(--color-neutral-900) 90%, transparent),
      color-mix(in srgb, var(--color-neutral-900) 42%, transparent) 45%,
      color-mix(in srgb, var(--color-neutral-900) 10%, transparent) 78%);
}
.ihero-mark {
  position: absolute; top: clamp(var(--space-6), 6vh, calc(var(--space-8) * 1.5));
  inset-inline-end: clamp(var(--space-4), 3vw, var(--space-8));
  z-index: 2; pointer-events: none; line-height: 0.9;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: clamp(3.4rem, 11vw, 9.5rem); letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 0.09rem color-mix(in srgb, var(--color-bg) 30%, transparent);
  filter: drop-shadow(0 0 0.0625rem color-mix(in srgb, var(--color-neutral-900) 60%, transparent));
}
.ihero-inner {
  position: relative; z-index: 3; width: 100%; max-width: 78rem; margin-inline: auto;
  padding: calc(var(--space-8) * 3.2) clamp(var(--space-4), 4vw, var(--space-8)) calc(var(--space-8) * 1.4);
}
.ihero-inner h6 { color: var(--color-accent-400); margin: 0 0 var(--space-3); }
.ihero-inner h1 {
  color: var(--color-bg); font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin: 0 0 var(--space-4); max-width: 22ch; text-wrap: balance; letter-spacing: -0.02em;
}
.ihero-rule {
  width: min(16rem, 36%); height: calc(var(--space-1) / 2); background: var(--color-accent);
  transform-origin: left; margin-bottom: var(--space-4);
  animation: drawX 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}
[dir="rtl"] .ihero-rule { transform-origin: right; }
.ihero-inner p { color: var(--color-neutral-300); font-size: 1.05rem; max-width: 58ch; margin: 0; }
@media (prefers-reduced-motion: reduce) { .ihero-rule { animation: none; transform: none; } }
