/* ===================================================================
   UniqTrix - OUR STORY  (about.html)
   1. the story panel   2. the journey (milestone timeline)   3. day mode   4. tablets and phones
   The texts, highlights, buttons, picture and every milestone come from Admin > About Us (js/story.js draws them).
   =================================================================== */

/* ───────────── 1. THE STORY PANEL ───────────── */
.story-section { position: relative; z-index: 1; padding: 36px 0 56px; }
.story-panel {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center;
  padding: 58px 56px; border-radius: 32px;
  background: linear-gradient(155deg, rgba(123,108,246,.14) 0%, rgba(56,189,248,.05) 52%, rgba(255,255,255,.025) 100%);
  border: 1px solid rgba(123,108,246,.28);
  box-shadow: 0 36px 90px -36px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.07);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.story-panel::before, .story-panel::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.story-panel::before { width: 440px; height: 440px; left: -150px; top: -180px; background: radial-gradient(circle, rgba(123,108,246,.34), transparent 68%); }
.story-panel::after  { width: 400px; height: 400px; right: -130px; bottom: -170px; background: radial-gradient(circle, rgba(56,189,248,.26), transparent 70%); }

.story-copy { min-width: 0; }
.story-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 16px 7px 12px; margin-bottom: 20px; border-radius: 999px;
  background: rgba(123,108,246,.14); border: 1px solid rgba(123,108,246,.34);
  font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #C4BCFF;
}
.story-eyebrow i { color: var(--secondary); font-size: .8rem; }
.story-title { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; margin-bottom: 24px; color: var(--text-primary); }
.story-title span { background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.story-lead {
  font-size: 1.1rem; line-height: 1.75; color: var(--text-primary); opacity: .92; margin-bottom: 18px; white-space: pre-line;
  padding-left: 18px; border-left: 3px solid transparent; border-image: linear-gradient(180deg, #7B6CF6, #38BDF8) 1;
}
.story-text { font-size: .98rem; line-height: 1.8; color: var(--text-secondary); margin-bottom: 4px; white-space: pre-line; }
.story-values { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.story-values li {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(123,108,246,.26); color: var(--text-primary);
  font-size: .84rem; font-weight: 500; transition: transform .3s var(--uq-ease, ease), border-color .3s ease, background-color .3s ease;
}
.story-values li::before {
  content: '\2713'; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: var(--gradient-fill); color: #fff; font-size: .68rem; font-weight: 800;
}
@media (hover: hover) { .story-values li:hover { transform: translateY(-3px); border-color: rgba(56,189,248,.6); background: rgba(123,108,246,.14); } }
.story-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
/* something the owner switched off (cleared text, empty button, hidden section) takes no room */
.story-section [hidden], .journey-section [hidden], .journey-section[hidden] { display: none !important; }

/* the picture side */
.story-visual { position: relative; min-width: 0; display: grid; place-items: center; padding: 14px 18px 22px; }
.story-frame {
  position: relative; width: min(100%, 400px); aspect-ratio: 4 / 5; border-radius: 30px;
  background: linear-gradient(160deg, rgba(123,108,246,.22), rgba(56,189,248,.08));
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 70px -28px rgba(0,0,0,.8);
}
.story-frame::before {                                 /* a second, tilted outline behind the picture: depth */
  content: ''; position: absolute; inset: -14px; z-index: -1; border-radius: 36px; transform: rotate(5deg);
  background: linear-gradient(135deg, rgba(123,108,246,.55), rgba(56,189,248,.35)); opacity: .5;
}
.story-frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.story-emblem { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; border-radius: inherit; }
.story-emblem[hidden] { display: none; }
.story-ring { position: absolute; border-radius: 50%; border: 1.5px solid rgba(123,108,246,.4); }
.story-ring.r1 { width: 86%; aspect-ratio: 1; animation: storySpin 34s linear infinite; }
.story-ring.r2 { width: 62%; aspect-ratio: 1; border-style: dashed; border-color: rgba(56,189,248,.45); animation: storySpin 26s linear infinite reverse; }
.story-ring.r3 { width: 38%; aspect-ratio: 1; border-color: rgba(168,85,247,.45); }
.story-ring.r1::after, .story-ring.r2::after {         /* a small light travelling around the ring */
  content: ''; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--secondary); box-shadow: 0 0 16px var(--secondary);
}
.story-ring.r1::after { top: -6px; left: 50%; margin-left: -6px; }
.story-ring.r2::after { bottom: -6px; left: 50%; margin-left: -6px; background: #A78BFA; box-shadow: 0 0 16px #A78BFA; }
.story-core {
  position: relative; z-index: 1; display: grid; place-items: center; width: 34%; aspect-ratio: 1; border-radius: 30%;
  background: var(--gradient-fill); color: #fff; font-size: clamp(1.8rem, 4.4vw, 2.8rem);
  box-shadow: 0 22px 60px -12px rgba(123,108,246,.7), inset 0 1px 0 rgba(255,255,255,.35);
}
.story-core.uqb-has-logo { width: auto; aspect-ratio: auto; border-radius: 0; background: none; box-shadow: none; }     /* the real logo - never in a coloured box */
@keyframes storySpin { to { transform: rotate(360deg); } }

.story-chip {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-radius: 18px;
  background: rgba(14,12,38,.74); border: 1px solid rgba(255,255,255,.16); color: #F0EEFF;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 18px 44px -14px rgba(0,0,0,.7);
  animation: storyFloat 6.5s ease-in-out infinite;
}
.story-chip strong { font-family: 'Space Grotesk', sans-serif; font-size: 1.9rem; font-weight: 800; line-height: 1; background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.story-chip span { font-size: .78rem; line-height: 1.25; max-width: 96px; color: rgba(240,238,255,.86); }
.story-chip-a { left: 0; bottom: 12%; }
.story-chip-b { right: 0; top: 9%; animation-delay: -3s; padding: 11px 16px; }
.story-chip-b i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--gradient-fill); color: #fff; font-size: .8rem; flex: none; }
.story-chip-b span { max-width: none; font-weight: 600; font-size: .84rem; white-space: nowrap; }
@keyframes storyFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ───────────── 2. THE JOURNEY (milestones) ───────────── */
.journey-section { position: relative; z-index: 1; padding: 36px 0 72px; }
.journey-section .section-header { margin-bottom: 44px; }
.journey { --jr-node: 56px; --jr-c: 40px; position: relative; list-style: none; margin: 0 auto; padding: 0; max-width: 1040px; }
.jr-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr); align-items: start; padding-bottom: 46px; }
.jr-item:last-child { padding-bottom: 0; }
/* the line from this node down to the next one: a faint track, and the same line filled in while the visitor reads down the page */
.jr-item::before, .jr-item::after { content: ''; position: absolute; left: 50%; top: var(--jr-c); height: 100%; width: 3px; margin-left: -1.5px; border-radius: 3px; }
.jr-item::before { background: rgba(123,108,246,.2); }
.jr-item::after  { background: linear-gradient(180deg, #7B6CF6, #38BDF8); box-shadow: 0 0 14px rgba(123,108,246,.55); transform-origin: top; transform: scaleY(var(--seg, 0)); }
.jr-item:last-child::before, .jr-item:last-child::after { display: none; }

.jr-node {
  grid-column: 2; grid-row: 1; justify-self: center; position: relative; z-index: 2; margin-top: calc(var(--jr-c) - var(--jr-node) / 2);
  display: grid; place-items: center; width: var(--jr-node); height: var(--jr-node); border-radius: 50%; font-size: 1.15rem;
  background: #0E0C26; color: #A99CFF; border: 2px solid rgba(123,108,246,.5);
  transition: background-color .5s ease, color .5s ease, box-shadow .5s ease, border-color .5s ease, transform .5s var(--uq-spring, ease);
}
.jr-item.on .jr-node { background: var(--gradient-fill); color: #fff; border-color: transparent; transform: scale(1.08); box-shadow: 0 0 0 7px rgba(123,108,246,.2), 0 0 34px rgba(123,108,246,.6); }

.jr-card {
  grid-row: 1; position: relative; min-width: 0; padding: 24px 26px 22px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(123,108,246,.12), rgba(255,255,255,.03));
  border: 1px solid rgba(123,108,246,.24); box-shadow: 0 18px 46px -26px rgba(0,0,0,.8);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.jr-item:nth-child(odd)  .jr-card { grid-column: 1; margin-right: 8px; }
.jr-item:nth-child(even) .jr-card { grid-column: 3; margin-left: 8px; }
.jr-card::before {                                      /* a small arrow towards the line */
  content: ''; position: absolute; top: calc(var(--jr-c) - 8px); width: 14px; height: 14px; background: inherit; border: inherit; border-width: 1px 1px 0 0;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.jr-item:nth-child(odd)  .jr-card::before { right: -8px; transform: rotate(45deg); }
.jr-item:nth-child(even) .jr-card::before { left: -8px; transform: rotate(-135deg); }
.jr-yr { display: none; margin-bottom: 10px; padding: 4px 12px; border-radius: 999px; background: rgba(123,108,246,.16); border: 1px solid rgba(123,108,246,.34); color: #C4BCFF; font: 700 .78rem 'Space Grotesk', sans-serif; letter-spacing: .06em; }
.jr-title { font-size: 1.22rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.jr-desc { font-size: .9rem; line-height: 1.7; color: var(--text-secondary); margin-bottom: 14px; }
.jr-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; font-size: .76rem; font-weight: 600; color: #D6D0FF; background: rgba(123,108,246,.14); border: 1px solid rgba(123,108,246,.3); }
.jr-badge i { color: var(--secondary); font-size: .74rem; }
.jr-item:last-child .jr-badge { background: var(--gradient-fill); border-color: transparent; color: #fff; }
.jr-item:last-child .jr-badge i { color: #fff; }

.jr-year { grid-row: 1; align-self: start; margin-top: calc(var(--jr-c) - 1.8rem); font: 800 3.1rem/1 'Space Grotesk', sans-serif; letter-spacing: -.03em; opacity: .72; transition: opacity .5s ease; }
.jr-year span { background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.jr-item:nth-child(odd)  .jr-year { grid-column: 3; padding-left: 26px; text-align: left; }
.jr-item:nth-child(even) .jr-year { grid-column: 1; padding-right: 26px; text-align: right; }
.jr-item.on .jr-year { opacity: 1; }
/* (the lift + glow of a hovered card is the site-wide card hover, css/motion.css) */

/* ───────────── 3. DAY MODE (kept apart from night, as everywhere on the site) ───────────── */
body.day-mode .story-panel {
  background: linear-gradient(155deg, #FFFFFF 0%, #F3F1FF 60%, #EAF4FF 100%); border-color: rgba(84,72,200,.2);
  box-shadow: 0 30px 70px -34px rgba(70,60,170,.38), inset 0 1px 0 #fff; -webkit-backdrop-filter: none; backdrop-filter: none;
}
body.day-mode .story-panel::before { background: radial-gradient(circle, rgba(123,108,246,.2), transparent 68%); }
body.day-mode .story-panel::after  { background: radial-gradient(circle, rgba(14,165,233,.16), transparent 70%); }
body.day-mode .story-eyebrow { background: rgba(84,72,200,.1); border-color: rgba(84,72,200,.28); color: #3D32A8; }
body.day-mode .story-eyebrow i { color: #0369A1; }
body.day-mode .story-title { color: #0F0D2E; }
body.day-mode .story-lead { color: #1B1850; opacity: 1; }
body.day-mode .story-text { color: rgba(15,13,46,.76); }
body.day-mode .story-values li { background: #fff; border-color: rgba(84,72,200,.24); color: #1B1850; }
@media (hover: hover) { body.day-mode .story-values li:hover { background: #EFEDFF; border-color: #5448C8; } }
body.day-mode .story-frame { background: linear-gradient(160deg, #E7E3FF, #DDF0FF); border-color: rgba(84,72,200,.2); box-shadow: 0 28px 60px -26px rgba(70,60,170,.5); }
body.day-mode .story-frame::before { opacity: .38; }
body.day-mode .story-ring { border-color: rgba(84,72,200,.38); }
body.day-mode .story-ring.r2 { border-color: rgba(3,105,161,.42); }
body.day-mode .story-ring.r3 { border-color: rgba(126,34,206,.4); }
body.day-mode .story-ring.r1::after { background: #0369A1; box-shadow: 0 0 14px rgba(3,105,161,.7); }
body.day-mode .story-ring.r2::after { background: #7E22CE; box-shadow: 0 0 14px rgba(126,34,206,.6); }
body.day-mode .story-chip { background: rgba(255,255,255,.94); border-color: rgba(84,72,200,.22); color: #0F0D2E; box-shadow: 0 16px 38px -14px rgba(70,60,170,.45); -webkit-backdrop-filter: none; backdrop-filter: none; }
body.day-mode .story-chip span { color: rgba(15,13,46,.78); }

body.day-mode .journey-section .section-desc { color: rgba(15,13,46,.74); }
body.day-mode .jr-item::before { background: rgba(84,72,200,.2); }
body.day-mode .jr-item::after { background: linear-gradient(180deg, #5448C8, #0277BD); box-shadow: 0 0 12px rgba(84,72,200,.35); }
body.day-mode .jr-node { background: #fff; color: #5448C8; border-color: rgba(84,72,200,.45); }
body.day-mode .jr-item.on .jr-node { background: var(--gradient-fill); color: #fff; border-color: transparent; box-shadow: 0 0 0 7px rgba(84,72,200,.16), 0 10px 28px rgba(84,72,200,.4); }
body.day-mode .jr-card { background: #fff; border-color: rgba(84,72,200,.16); box-shadow: 0 18px 44px -26px rgba(70,60,170,.38); -webkit-backdrop-filter: none; backdrop-filter: none; }
body.day-mode .jr-title { color: #0F0D2E; }
body.day-mode .jr-desc { color: rgba(15,13,46,.76); }
body.day-mode .jr-yr { background: rgba(84,72,200,.1); border-color: rgba(84,72,200,.28); color: #3D32A8; }
body.day-mode .jr-badge { background: rgba(84,72,200,.09); border-color: rgba(84,72,200,.26); color: #3D32A8; }
body.day-mode .jr-badge i { color: #0369A1; }
body.day-mode .jr-item:last-child .jr-badge { background: var(--gradient-fill); border-color: transparent; color: #fff; }
body.day-mode .jr-item:last-child .jr-badge i { color: #fff; }

/* ───────────── 4. TABLETS AND PHONES ───────────── */
@media (max-width: 980px) {
  .story-panel { grid-template-columns: 1fr; gap: 40px; padding: 40px 30px; }
  .story-visual { order: 2; padding: 10px 14px 18px; }
  .story-frame { width: min(100%, 360px); }
  .journey { --jr-node: 46px; --jr-c: 34px; max-width: 640px; }
  .jr-item { grid-template-columns: 46px minmax(0, 1fr); column-gap: 18px; }
  .jr-item::before, .jr-item::after { left: 23px; }
  .jr-node { grid-column: 1; font-size: 1rem; }
  .jr-item:nth-child(odd)  .jr-card, .jr-item:nth-child(even) .jr-card { grid-column: 2; margin: 0; }
  .jr-item:nth-child(odd)  .jr-card::before, .jr-item:nth-child(even) .jr-card::before { left: -8px; right: auto; transform: rotate(-135deg); }
  .jr-year { display: none; }
  .jr-yr { display: inline-block; }
}
@media (max-width: 560px) {
  .story-section { padding: 18px 0 40px; }
  .story-panel { padding: 30px 20px 26px; border-radius: 26px; gap: 32px; }
  .story-title { margin-bottom: 18px; }
  .story-lead { font-size: 1.02rem; padding-left: 14px; }
  .story-values { gap: 8px; margin-top: 20px; }
  .story-values li { font-size: .8rem; padding: 7px 13px 7px 10px; }
  .story-actions { margin-top: 24px; gap: 10px; }
  .story-actions .btn { flex: 1 1 100%; justify-content: center; }
  .story-frame { width: min(100%, 300px); }
  .story-chip { padding: 10px 13px; gap: 9px; }
  .story-chip strong { font-size: 1.5rem; }
  .story-chip-a { left: -4px; } .story-chip-b { right: -4px; }
  .journey-section { padding: 20px 0 48px; }
  .journey-section .section-header { margin-bottom: 30px; }
  .journey { --jr-node: 40px; --jr-c: 30px; }
  .jr-item { grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; padding-bottom: 30px; }
  .jr-item::before, .jr-item::after { left: 20px; }
  .jr-card { padding: 18px 18px 16px; border-radius: 18px; }
  .jr-title { font-size: 1.08rem; }
  .jr-desc { font-size: .86rem; }
}

@media (prefers-reduced-motion: reduce) {
  .story-ring, .story-chip { animation: none !important; }
  .jr-item::after, .jr-node, .jr-year { transition: none !important; }
}
@media print {
  .story-ring, .story-chip { animation: none !important; }
  .jr-item::after { transform: scaleY(1) !important; }
  .jr-item .jr-node { background: none !important; box-shadow: none !important; }
}
