/*
Theme Name: Taxi Przeworsk
Description: Jednostronicowy motyw dla Taxi Przeworsk. Żółto-czarna kolorystyka banera, numer telefonu zawsze pod ręką.
Version: 1.9.0
Requires at least: 5.9
Requires PHP: 7.4
Text Domain: taxi-przeworsk
*/

/* Layout: yellow name band, the film, then the number on black as on the banner; below it one yellow call strip, then quiet black sections. The green road-sign board is the single loud element. */
:root {
  color-scheme: dark;
  --yellow: #f9f00e;
  --black: #050400;
  --panel: #14130a;
  --paper: #f5f3e6;
  --muted: #b1ae93;
  --line: #3b3912;
  --sign: #0a6a3a;
  --sign-fg: #ffffff;
  --glint: rgba(255, 255, 255, 0.22);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --display: "Krona One", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--black);
  color: var(--paper);
  font: 400 1.0625rem/1.55 var(--body);
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; }
a { color: var(--yellow); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }

.wrap {
  max-width: 68rem;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* Link to the sister site */
.topbar {
  display: block; text-align: center; text-decoration: none;
  background: var(--black); color: var(--paper);
  font-weight: 600; font-size: 0.9375rem; line-height: 1.3;
  padding: 0.5rem max(16px, env(safe-area-inset-right, 0px)) 0.5rem max(16px, env(safe-area-inset-left, 0px));
}
.topbar span { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; margin-left: 0.4em; white-space: nowrap; }
.topbar:hover span { color: var(--paper); }

/* Name band */
.brand { background: var(--yellow); color: var(--black); }
.brand .wrap { max-width: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 2rem; padding-block: 0.9rem; }
.brand-mark { color: var(--black); text-decoration: none; text-transform: uppercase; font: 400 clamp(0.8rem, 2.4vw, 1.15rem)/1.1 var(--display); letter-spacing: 0.04em; }
.brand-mark span { display: block; font-size: 2.6em; letter-spacing: 0; }
.brand-hours { margin: 0; font-weight: 700; font-size: clamp(1rem, 2.4vw, 1.375rem); white-space: nowrap; }

/* Photo loop */
.hero { position: relative; overflow: hidden; background: var(--black); }
/* The whole frame is always shown; on wide screens a dimmed, blurred still fills the sides */
.hero::before {
  content: ""; position: absolute; inset: -48px;
  background: var(--poster, none) center / cover no-repeat;
  filter: blur(28px) brightness(0.45);
}
.slides { position: relative; width: 100%; aspect-ratio: 1920 / 1072; max-height: min(72vh, 46rem); }
.slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; }
.slides img:first-child { opacity: 1; }

/* Call strip */
.call { background: var(--black); color: var(--paper); }
.call .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem 2rem; padding-block: 1.5rem;
}
.call-label { margin: 0; color: var(--yellow); font-weight: 600; font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; }
.call-number {
  display: block; margin: 0; color: var(--paper); text-decoration: none; white-space: nowrap;
  font: 400 clamp(1.75rem, 7vw, 3.75rem)/1.1 var(--display);
  font-variant-numeric: tabular-nums;
}
.call-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.6rem 1.4rem;
  border: 2px solid var(--yellow); border-radius: 4px;
  font: 700 1.0625rem/1.2 var(--body); text-decoration: none; cursor: pointer;
}
.btn-solid { background: var(--yellow); color: var(--black); }
.btn-line { background: transparent; color: var(--yellow); }
.btn:hover { background: var(--paper); border-color: var(--paper); color: var(--black); }

/* Sections */
.section { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.section + .section { border-top: 1px solid var(--line); }
h1, h2 { font-family: var(--display); font-weight: 400; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.5rem, 4.6vw, 2.75rem); line-height: 1.2; }
h2 { font-size: clamp(1.2rem, 3vw, 1.75rem); line-height: 1.25; }
.lead { max-width: 38rem; margin: 1.25rem 0 0; font-size: 1.1875rem; color: var(--paper); }
.note { max-width: 38rem; color: var(--muted); }

/* Services */
.services {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 0 2.5rem; margin: 2rem 0 0;
}
.services div { padding-block: 1.1rem; border-top: 1px solid var(--line); min-width: 0; }
.services dt { font-weight: 700; font-size: 1.1875rem; }
.services dd { margin: 0.25rem 0 0; color: var(--muted); }

/* Distances: styled after the green roadside distance board */
.reach { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 2rem 3.5rem; align-items: start; }
.reach > * { min-width: 0; }
.board {
  margin: 0; padding: 1.1rem 1.4rem; list-style: none;
  background: var(--sign); color: var(--sign-fg);
  border: 3px solid var(--sign-fg); border-radius: 14px;
  box-shadow: 0 0 0 3px var(--sign);
  font-weight: 600; font-size: 1.3125rem; line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.board li { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding-block: 0.35rem; }
.board li span:last-child { white-space: nowrap; }
.board-caption { margin: 0.9rem 0 0; font-size: 0.9375rem; color: var(--muted); }

/* How to order */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1.75rem 2.5rem; margin: 2rem 0 0; padding: 0; list-style: none; counter-reset: step;
}
.steps li { counter-increment: step; min-width: 0; }
.steps li::before { content: counter(step); display: block; font: 400 2.25rem/1 var(--display); color: var(--yellow); }
.steps h3 { margin: 0.75rem 0 0.25rem; font-size: 1.1875rem; font-weight: 700; }
.steps p { margin: 0; color: var(--muted); }

/* Footer */
.foot { background: var(--panel); border-top: 1px solid var(--line); }
.foot .wrap { padding-block: 2.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem 3rem; }
.foot-number { display: block; color: var(--yellow); text-decoration: none; white-space: nowrap; font: 400 clamp(1.5rem, 6vw, 2.5rem)/1.15 var(--display); }
.foot p { margin: 0; color: var(--muted); }
.foot strong { color: var(--paper); }
.foot-side { text-align: right; margin-left: auto; }
.credit { margin-top: 0.3rem; font-size: 0.875rem; }

/* Phone-only call bar */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: block; text-align: center; text-decoration: none;
  background: var(--yellow); color: var(--black);
  font-weight: 700; font-size: 1.125rem;
  padding: 0.85rem max(16px, env(safe-area-inset-right, 0px)) calc(0.85rem + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  border-top: 2px solid var(--black);
}
@media (max-width: 47.49rem) { .foot .wrap { padding-bottom: 6rem; } }
@media (min-width: 47.5rem) { .dock { display: none; } }

/* Ordinary WordPress pages and posts */
.prose { max-width: 42rem; }
.prose h1 { margin-bottom: 1.5rem; }
.prose img { height: auto; }

/* Lane markings under the call strip */
.road { position: relative; height: 18px; overflow: hidden; background: var(--panel); }
.road::before {
  content: ""; position: absolute; left: 0; right: -72px; top: 7px; height: 4px;
  background: repeating-linear-gradient(90deg, var(--yellow) 0 36px, transparent 36px 72px);
}

/* Hover */
.btn { transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease); }
.btn:active { transform: scale(0.97); }
.services dt { transition: color 0.25s, transform 0.25s var(--ease); }
.services div:hover dt { color: var(--yellow); transform: translateX(6px); }

/* Motion: everything below is skipped for visitors who ask for reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .brand .wrap > * { animation: rise 0.6s var(--ease) both; }
  /* Four photos, 3 s each, cross-fading in an endless 12 s loop */
  .slides img { animation: slide 12s linear infinite; }
  .slides img:nth-child(2) { animation-delay: 3s; }
  .slides img:nth-child(3) { animation-delay: 6s; }
  .slides img:nth-child(4) { animation-delay: 9s; }
  .hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 42%, var(--glint) 50%, transparent 58%);
    animation: glint 1.3s ease-out 0.9s both;
  }
  .call .wrap > * { animation: rise 0.6s var(--ease) 0.35s both; }
  .call .wrap > * + * { animation-delay: 0.5s; }
  .btn-solid { animation: ring 2.6s ease-out 2s infinite; }
  .road::before { animation: lane 1.1s linear infinite; }
  .dock { animation: dock 0.5s var(--ease) 0.8s both; }

  .reveal { transition: opacity 0.6s ease, transform 0.6s var(--ease); }
  .reveal.pre { opacity: 0; transform: translateY(18px); }

  @keyframes slide {
    0% { opacity: 0; z-index: 2; }
    6.67% { opacity: 1; z-index: 2; }
    25% { opacity: 1; z-index: 1; }
    31.67% { opacity: 1; z-index: 1; }
    31.68%, 100% { opacity: 0; z-index: 1; }
  }
  @keyframes arrive { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: none; } }
  @keyframes glint { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  @keyframes ring {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--yellow) 55%, transparent); }
    45%, 100% { box-shadow: 0 0 0 14px transparent; }
  }
  @keyframes lane { to { transform: translateX(-72px); } }
  @keyframes dock { from { transform: translateY(100%); } to { transform: none; } }
}
