/*
Theme Name: PerfectionImage TimeKeeper
Author: PerfectionImage
Version: 2.1.2
*/
:root {
  --navy: #102d43;
  --navy-deep: #0b2438;
  --navy-soft: #244960;
  --ink: #17384f;
  --muted: #526b79;
  --paper: #f3eee4;
  --paper-soft: #f8f4ec;
  --mist: #e5ecef;
  --mist-deep: #d9e3e8;
  --brass: #a88c58;
  --brass-soft: #c5b185;
  --line: #aebfc7;
  --white: #fffdf8;
  --header: 72px;
  --journey: 52px;
  --wrap: 1240px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + var(--journey)); }
body.timekeeper-public-site { margin: 0; overflow-x: hidden; background: var(--paper-soft); color: var(--ink); font: 17px/1.58 "Source Sans 3", sans-serif; text-rendering: optimizeLegibility; }
body.admin-bar .tk-header { top: 32px; }
body.admin-bar { --header: 104px; }
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.tk-wrap { width: min(var(--wrap), calc(100% - 64px)); margin-inline: auto; }
.tk-skip { position: fixed; top: -100px; left: 18px; z-index: 10000; padding: 10px 16px; background: white; color: var(--navy); }
.tk-skip:focus { top: 10px; }

/* Fixed masthead */
.tk-header { position: fixed; z-index: 1000; inset: 0 0 auto; height: 72px; color: var(--white); background: var(--navy-deep); border-bottom: 1px solid rgba(197,177,133,.56); transition: box-shadow .25s ease; }
.tk-header.is-scrolled { box-shadow: 0 12px 34px rgba(16,45,67,.18); }
.tk-header-inner { height: 100%; display: flex; align-items: center; gap: 34px; }
.tk-brand { display: flex; align-items: center; gap: 13px; flex: none; text-decoration: none; }
.tk-medallion { width: 84px; height: 84px; margin-top: 12px; flex: none; overflow: hidden; border: 1px solid var(--brass-soft); border-radius: 50%; background: #ead6a3; box-shadow: 0 8px 20px rgba(5,22,34,.25); }
.tk-medallion img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.tk-brand-copy { display: flex; flex-direction: column; line-height: 1; }
.tk-brand-copy strong { font: 700 25px/1 "Cormorant Garamond", Georgia, serif; }
.tk-brand-copy small { margin-top: 4px; color: #cbd6dc; font-size: 10px; }
.tk-nav { display: flex; align-items: center; gap: 25px; margin-left: auto; font-size: 14px; font-weight: 700; }
.tk-nav > a, .tk-signin { color: #edf1f1; text-decoration: none; transition: color .2s ease; }
.tk-nav > a:hover, .tk-nav > a:focus-visible, .tk-nav a[aria-current="page"], .tk-signin:hover { color: #dcc9a2; }
.tk-nav-actions { display: flex; align-items: center; gap: 16px; margin-left: 8px; }
.tk-menu-toggle { display: none; border: 0; background: none; color: white; font-size: 23px; }
.tk-scroll-progress { position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background: var(--brass-soft); transform: scaleX(0); transform-origin: left; will-change: transform; }

.tk-btn { display: inline-flex; min-height: 48px; padding: 11px 20px; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--navy); border-radius: 3px; background: var(--navy); color: var(--white); font-size: 14px; font-weight: 800; text-decoration: none; transition: transform .25s ease, background .25s ease, box-shadow .25s ease; }
.tk-btn:hover, .tk-btn:focus-visible { transform: translateY(-2px); background: var(--navy-soft); box-shadow: 0 9px 24px rgba(16,45,67,.13); }
.tk-btn-outline { border-color: #637b87; background: rgba(255,255,255,.24); color: var(--navy); }
.tk-btn-outline:hover { background: var(--white); }
.tk-btn-small { min-height: 38px; padding: 7px 14px; border-color: var(--brass-soft); background: var(--brass-soft); color: var(--navy-deep); }
.tk-btn-paper { border-color: #e2d0a7; background: var(--paper); color: var(--navy-deep); }
.tk-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* Hero */
.tk-scroll-story { padding-top: 72px; }
.tk-story-panel { position: relative; --scene-progress: .5; --scene-focus: 1; }
.tk-hero { min-height: calc(100svh - 72px); overflow: hidden; display: grid; align-items: center; background: var(--paper); isolation: isolate; }
.tk-hero::before { content: ""; position: absolute; z-index: -2; inset: 0; opacity: .34; background: url("assets/handwriting-texture.jpg") center top / cover no-repeat; filter: sepia(.25); }
.tk-hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(247,243,234,.98) 0%, rgba(247,243,234,.92) 44%, rgba(247,243,234,.43) 74%, rgba(247,243,234,.72) 100%); }
.tk-hero-grid { min-height: calc(100svh - 72px); display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; padding-block: 86px 96px; }
.tk-hero-text { position: relative; z-index: 3; max-width: 650px; }
.tk-eyebrow { margin: 0 0 17px; color: #816a40; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.tk-hero h1, .tk-scene h2, .tk-connect h2, .tk-final-cta h2 { margin: 0; color: var(--navy); font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; letter-spacing: -.025em; line-height: .94; }
.tk-hero h1 { padding-bottom: .12em; font-size: clamp(70px, 7vw, 112px); line-height: 1.03; }
.tk-hero h1 span { display: block; white-space: nowrap; }
.tk-hero-text.tk-reveal { clip-path: none; }
.tk-hero-lede { max-width: 570px; margin: 28px 0 0; color: #324e61; font: 600 clamp(18px,1.65vw,22px)/1.55 "Cormorant Garamond", Georgia, serif; }
.tk-hero-collage { position: relative; min-height: min(58vw,660px); transform: translate3d(0, calc((var(--scene-progress) - .5) * -34px), 0); will-change: transform; }
.tk-hero-photo { position: absolute; margin: 0; overflow: hidden; border: 9px solid rgba(248,244,236,.92); background: #ddd6c9; box-shadow: 0 22px 54px rgba(24,47,59,.19); }
.tk-hero-photo img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.2) saturate(.74); }
.tk-hero-photo-main { top: 5%; right: 0; width: 70%; height: 70%; transform: rotate(1.3deg); }
.tk-hero-photo-small { bottom: 5%; left: 0; width: 48%; height: 50%; transform: rotate(-2deg); }
.tk-hero-medallion { position: absolute; right: 5%; bottom: 2%; width: 31%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--brass); border-radius: 50%; box-shadow: 0 16px 38px rgba(28,49,58,.22); }
.tk-scroll-cue { position: absolute; z-index: 4; bottom: 21px; left: 50%; display: flex; gap: 10px; align-items: center; color: var(--navy); font-size: 12px; font-weight: 700; text-decoration: none; transform: translateX(-50%); }
.tk-scroll-cue i { animation: tk-bob 1.8s ease-in-out infinite; }
@keyframes tk-bob { 50% { transform: translateY(5px); } }

/* Story navigation and scroll scenes */
.tk-journey { position: sticky; z-index: 30; top: 72px; height: 52px; display: flex; justify-content: center; align-items: center; overflow-x: auto; background: rgba(16,45,67,.97); color: white; border-block: 1px solid rgba(197,177,133,.4); backdrop-filter: blur(12px); }
.tk-journey a { position: relative; min-height: 100%; display: flex; align-items: center; padding: 0 27px; color: #e7edef; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background .25s ease, color .25s ease; }
.tk-journey a + a::before { content: ""; position: absolute; top: 16px; bottom: 16px; left: 0; width: 1px; background: #657e8d; }
.tk-journey a span { margin-right: 8px; color: #cbb68c; }
.tk-journey a.is-active { background: rgba(255,255,255,.08); color: #f3dfb7; }
.tk-scene { min-height: 118vh; padding: 0; }
.tk-scene-paper { background: var(--paper-soft); }
.tk-scene-blue { background: var(--mist); }
.tk-scene-inner { position: sticky; top: 144px; min-height: calc(100vh - 164px); display: grid; grid-template-columns: minmax(260px,.62fr) minmax(0,1.38fr); gap: clamp(48px,7vw,100px); align-items: center; padding-block: 54px; }
.tk-scene-inner-reverse { grid-template-columns: minmax(0,1.38fr) minmax(260px,.62fr); }
.tk-scene-inner-reverse .tk-scene-copy { order: 2; }
.tk-scene-copy { max-width: 430px; }
.tk-step { display: inline-block; color: var(--ink); font-size: 13px; font-weight: 700; }
.tk-rule { display: inline-block; width: 45px; margin: 0 0 4px 12px; border-top: 1px solid #718894; }
.tk-scene h2, .tk-connect h2 { margin-top: 13px; font-size: clamp(53px,5vw,78px); }
.tk-flourish { display: block; margin: 17px 0 21px; color: var(--brass); font-size: 14px; }
.tk-scene-copy > p { color: #415d6d; font-size: 18px; line-height: 1.6; }
.tk-detail-list { margin: 25px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.tk-detail-list li { padding: 9px 0; color: #526a78; border-bottom: 1px solid rgba(174,191,199,.7); font-size: 14px; }
.tk-product-frame { margin: 0; padding: 10px; overflow: hidden; background: rgba(255,253,248,.72); border: 1px solid #bdc9cd; border-radius: 5px; box-shadow: 0 24px 58px rgba(37,65,78,.13); }
.tk-product-frame img { width: 100%; border-radius: 2px; }
.tk-product-frame figcaption { padding: 10px 5px 1px; color: #637987; font-size: 12px; }
[data-scene-media] { opacity: calc(.78 + var(--scene-focus) * .22); transform: translate3d(0, calc((var(--scene-progress) - .5) * -54px), 0) scale(calc(.965 + var(--scene-focus) * .035)); will-change: transform, opacity; }

/* Restore comparison */
.tk-restore-visual { width: 100%; }
.tk-before-after { position: relative; width: 100%; height: min(65vh,620px); overflow: hidden; background: #d1d9dc; border: 9px solid rgba(255,253,248,.84); box-shadow: 0 22px 58px rgba(34,62,76,.16); }
.tk-before-after figure { position: absolute; inset: 0; margin: 0; }
.tk-before-after img { width: 100%; height: 100%; object-fit: contain; background: #d9e2e6; }
.tk-before-after figcaption { position: absolute; top: 14px; padding: 6px 10px; background: rgba(16,45,67,.84); color: white; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tk-after figcaption { right: 14px; }
.tk-before figcaption { left: 14px; }
.tk-before { z-index: 2; }
.tk-before-after input { position: absolute; z-index: 5; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; }
.tk-compare-handle { position: absolute; z-index: 4; top: 0; bottom: 0; width: 2px; background: white; transform: translateX(-1px); pointer-events: none; }
.tk-compare-handle i { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: white; color: var(--navy); box-shadow: 0 4px 18px rgba(0,0,0,.2); transform: translate(-50%,-50%); }
.tk-tool-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 25px; }
.tk-tool-list span { padding: 6px 10px; color: #465f6e; border: 1px solid #a9bbc3; border-radius: 999px; background: rgba(255,255,255,.25); font-size: 12px; }

/* Understanding and connections */
.tk-identity-map { display: grid; grid-template-columns: 1.18fr .82fr; gap: 22px; align-items: center; padding: 24px; background: rgba(255,255,255,.42); border: 1px solid #c8c1b2; box-shadow: 0 20px 50px rgba(38,57,64,.1); }
.tk-identity-map figure { margin: 0; }
.tk-identity-map figure img { width: 100%; }
.tk-identity-map dl { display: grid; gap: 0; margin: 0; }
.tk-identity-map dl div { padding: 12px 0; border-bottom: 1px solid #cbbfa8; }
.tk-identity-map dl div:last-child { border: 0; }
.tk-identity-map dt { color: var(--navy); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tk-identity-map dt i { width: 19px; color: var(--brass); }
.tk-identity-map dd { margin: 3px 0 0 20px; color: #667780; font-size: 12px; }
.tk-text-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 20px; color: var(--navy); font-weight: 800; text-decoration: none; border-bottom: 1px solid var(--brass); }
.tk-connect { min-height: 105vh; display: grid; align-items: center; overflow: hidden; background: var(--paper); }
.tk-connect-grid { min-height: 90vh; display: grid; grid-template-columns: minmax(250px,.55fr) minmax(0,1.45fr); gap: 50px; align-items: center; }
.tk-network { margin: 0; transform-origin: center; }
.tk-network img { width: 100%; mix-blend-mode: multiply; }

/* Finale */
.tk-final-cta { min-height: 76vh; display: grid; align-items: center; overflow: hidden; isolation: isolate; background: var(--navy-deep); color: white; }
.tk-final-cta::before { content: ""; position: absolute; z-index: -2; inset: 0; background: var(--tk-history-texture) center / cover no-repeat; opacity: .13; filter: grayscale(1) contrast(1.15); }
.tk-final-cta::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(11,36,56,.93), rgba(11,36,56,.72)); }
.tk-final-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,430px); gap: 80px; align-items: center; padding-block: 80px; }
.tk-final-copy { max-width: 760px; }
.tk-final-cta h2 { color: #f5ead8; font-size: clamp(52px,5.8vw,80px); line-height: 1.02; }
.tk-final-copy p { max-width: 600px; margin: 25px 0 30px; color: #d1dce1; font-size: 18px; }
.tk-final-medallion { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--brass-soft); border-radius: 50%; box-shadow: 0 24px 58px rgba(0,0,0,.28); }

/* Reveal choreography */
.tk-reveal { opacity: 0; clip-path: inset(0 0 13% 0); transform: translateY(38px); transition: opacity .95s ease, transform 1.05s cubic-bezier(.18,.72,.18,1), clip-path 1.05s cubic-bezier(.18,.72,.18,1); }
.tk-reveal.is-visible { opacity: 1; clip-path: inset(0); transform: translateY(0); }
.tk-footer { padding: 24px 0; background: #081e31; color: #bfcdd4; border-top: 1px solid #536b79; font-size: 12px; }
.tk-footer-inner { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.tk-footer a { color: #dec89d; text-decoration: none; }
:focus-visible { outline: 3px solid #a88c58; outline-offset: 3px; }

@media (max-width: 1050px) {
  .tk-nav { gap: 15px; }
  .tk-nav > a { display: none; }
  .tk-hero-grid { grid-template-columns: 1fr 1fr; }
  .tk-scene-inner, .tk-scene-inner-reverse { gap: 44px; }
  .tk-identity-map { grid-template-columns: 1fr; }
  .tk-identity-map dl { grid-template-columns: repeat(2,1fr); column-gap: 20px; }
}
@media (max-width: 760px) {
  :root { --header: 68px; --journey: 46px; }
  body.admin-bar { --header: 114px; }
  .tk-wrap { width: min(var(--wrap), calc(100% - 34px)); }
  .tk-header { height: 68px; }
  .tk-header-inner { gap: 10px; }
  .tk-medallion { width: 62px; height: 62px; margin-top: 0; }
  .tk-brand-copy strong { font-size: 21px; }
  .tk-brand-copy small { font-size: 9px; }
  .tk-menu-toggle { display: block; margin-left: auto; }
  .tk-nav { position: fixed; top: 68px; right: 0; left: 0; display: none; align-items: stretch; flex-direction: column; gap: 0; padding: 18px; background: var(--navy-deep); border-top: 1px solid #506a79; }
  .menu-open .tk-nav { display: flex; }
  .tk-nav > a { display: block; padding: 12px; }
  .tk-nav-actions { margin: 8px 0 0; align-items: stretch; flex-direction: column; }
  .tk-signin { padding: 12px; }
  .tk-scroll-story { padding-top: 68px; }
  .tk-hero-grid { min-height: calc(100svh - 68px); grid-template-columns: 1fr; gap: 24px; padding-block: 72px 88px; text-align: center; }
  .tk-hero h1 { font-size: clamp(56px,17vw,78px); }
  .tk-hero h1 span { white-space: normal; }
  .tk-hero-lede { margin-inline: auto; font-size: 18px; }
  .tk-hero .tk-actions { justify-content: center; }
  .tk-hero-collage { display: none; }
  .tk-scroll-cue { bottom: 14px; }
  .tk-journey { top: 68px; height: 46px; justify-content: flex-start; padding-inline: 8px; }
  .tk-journey a { padding: 0 14px; }
  .tk-scene { min-height: auto; padding: 78px 0; }
  .tk-scene-inner, .tk-scene-inner-reverse { position: static; min-height: 0; grid-template-columns: 1fr; gap: 42px; padding: 0; }
  .tk-scene-inner-reverse .tk-scene-copy { order: 0; }
  .tk-scene-copy { max-width: none; }
  .tk-scene h2, .tk-connect h2 { font-size: 51px; }
  [data-scene-media] { transform: none !important; }
  .tk-before-after { height: 108vw; }
  .tk-identity-map dl { grid-template-columns: 1fr 1fr; }
  .tk-connect { min-height: 0; padding: 78px 0; }
  .tk-connect-grid { min-height: 0; grid-template-columns: 1fr; gap: 36px; }
  .tk-final-layout { grid-template-columns: 1fr; gap: 42px; text-align: center; }
  .tk-final-copy { margin-inline: auto; }
  .tk-final-cta h2 { font-size: 48px; }
  .tk-final-medallion { width: min(72vw,300px); margin: auto; }
  .tk-footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tk-reveal { opacity: 1; clip-path: none; transform: none; transition: none; }
  [data-scene-media] { transform: none !important; }
  .tk-scroll-cue i { animation: none; }
}
