/* GauravWatchDiaries Phase 3 — Heritage Luxury motion system */
:root {
  --bg-page: #F6F3EA;
  --bg-surface: #FFFEFA;
  --bg-subtle: #EDE7D9;
  --bg-header: rgba(246,243,234,.94);
  --text-primary: #17251E;
  --text-secondary: #4B5B51;
  --text-muted: #78857C;
  --accent-forest: #194B38;
  --accent-forest-hover: #123A2B;
  --accent-brass: #C5A15B;
  --accent-brass-soft: rgba(197,161,91,.17);
  --border-subtle: rgba(25,75,56,.16);
  --border-strong: rgba(197,161,91,.52);
  --shadow-card: 0 10px 28px rgba(24,39,30,.065);
  --shadow-elevated: 0 22px 48px rgba(24,39,30,.15);
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --luxury-ease: cubic-bezier(.2,.75,.25,1);
}
html[data-theme="dark"] {
  --bg-page: #0D1913;
  --bg-surface: #14251C;
  --bg-subtle: #1D3428;
  --bg-header: rgba(13,25,19,.94);
  --text-primary: #F4F0E5;
  --text-secondary: #C6D0C8;
  --text-muted: #93A398;
  --accent-forest: #5B9B78;
  --accent-forest-hover: #70B38D;
  --accent-brass: #D8B66F;
  --accent-brass-soft: rgba(216,182,111,.16);
  --border-subtle: rgba(231,238,231,.13);
  --border-strong: rgba(216,182,111,.42);
  --shadow-card: 0 12px 32px rgba(0,0,0,.25);
  --shadow-elevated: 0 24px 52px rgba(0,0,0,.42);
}

/* Global editorial rhythm and premium surface treatment. */
body { font-family: var(--font-sans); }
h1,h2,h3,.hero-title,.page-heading,.section-title,.watch-card__title,.footer-title,
.evo-daily h2,.evo-achievement h2,.modal-head h2 { font-family: var(--font-serif); }
.page-heading { letter-spacing: -.025em; }
.eyebrow,.hero-eyebrow,.watch-card__brand { letter-spacing: .15em; }
.site-header { box-shadow: 0 5px 22px rgba(18,39,27,.045); border-bottom-color: var(--border-subtle); }
.brand-name { letter-spacing: -.025em; }
.main-nav a,.gwd-sidebar-nav a,.footer-links a { transition: color .28s var(--luxury-ease), background .28s var(--luxury-ease), border-color .28s var(--luxury-ease), transform .28s var(--luxury-ease); }
.main-nav a { position: relative; }
.main-nav a:not(.nav-primary-action)::after { content:""; position:absolute; left:.55rem; right:.55rem; bottom:3px; height:1.5px; background:linear-gradient(90deg,transparent,var(--accent-brass),transparent); transform:scaleX(0); transform-origin:center; transition:transform .38s var(--luxury-ease); }
.main-nav a:not(.nav-primary-action):hover::after,.main-nav a[aria-current="page"]::after { transform:scaleX(1); }
.gwd-sidebar-nav a:hover { transform:translateX(2px); }
.theme-toggle,.btn,.btn--primary,.btn--secondary,.nav-primary-action { transition: transform .28s var(--luxury-ease), box-shadow .28s var(--luxury-ease), background-color .28s ease, border-color .28s ease; }
.btn:hover,.theme-toggle:hover,.nav-primary-action:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(25,75,56,.15); }

/* Perimeter-only animated watch-card frame. The mask keeps the centre/photo clear. */
@property --gwd-border-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.watch-card { position:relative; isolation:isolate; border:1px solid var(--border-subtle); transition:transform .48s var(--luxury-ease),box-shadow .48s var(--luxury-ease),border-color .35s ease; }
.watch-card::before { content:""; position:absolute; inset:0; z-index:5; pointer-events:none; border-radius:inherit; padding:1.5px; opacity:.48; background:conic-gradient(from var(--gwd-border-angle),transparent 0deg,transparent 250deg,var(--gwd-motion-color,var(--accent-brass)) 286deg,#fff 300deg,var(--gwd-motion-color,var(--accent-brass)) 315deg,transparent 330deg); -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); mask-composite:exclude; animation:gwdBorderOrbit 9s linear infinite; }
@keyframes gwdBorderOrbit { to { --gwd-border-angle:360deg; } }
.watch-card:hover,.watch-card:focus-within { transform:translateY(-6px); border-color:var(--border-strong); box-shadow:var(--shadow-elevated),0 0 0 1px rgba(197,161,91,.08); }
.watch-card:hover::before,.watch-card:focus-within::before { opacity:.95; animation-duration:4.5s; }
.watch-card__media { isolation:isolate; }
.watch-card__media::after { content:""; position:absolute; z-index:2; inset:0; pointer-events:none; opacity:0; background:radial-gradient(circle at var(--gwd-spot-x,50%) var(--gwd-spot-y,50%),rgba(246,220,164,.34),rgba(197,161,91,.10) 18%,transparent 48%); transition:opacity .45s ease; mix-blend-mode:soft-light; }
.watch-card:hover .watch-card__media::after,.watch-card:focus-within .watch-card__media::after { opacity:1; }
.watch-card__carousel-image { transition:opacity .34s ease,transform .75s var(--luxury-ease),filter .4s ease; will-change:opacity,transform; }
.watch-card:hover .watch-card__carousel-image { transform:scale(1.025); }
.watch-card__carousel-image.is-changing { opacity:0 !important; transform:scale(1.015); }
.watch-card__gallery-controls { z-index:4; box-shadow:0 8px 22px rgba(12,28,19,.22); backdrop-filter:blur(12px); }
.watch-card__gallery-arrow { transition:transform .25s var(--luxury-ease),background .25s ease,color .25s ease; }
.watch-card__gallery-arrow:hover { transform:scale(1.1); }

/* Rich editorial cards across collectors, community, battles, marketplace and insights. */
.evo-member-card,.evo-post,.evo-battle,.evo-achievement,.evo-stat,.toolbar-card,.analog-clock-card,
.marketplace-card,.panel,.card { transition:transform .38s var(--luxury-ease),box-shadow .38s var(--luxury-ease),border-color .3s ease,background-color .3s ease; }
.evo-member-card:hover,.evo-post:hover,.evo-battle:hover,.evo-achievement:hover,.evo-stat:hover { transform:translateY(-3px); box-shadow:var(--shadow-elevated); border-color:var(--border-strong); }
.evo-profile-hero { border-color:var(--border-strong); box-shadow:var(--shadow-card); }
.evo-battle-pair img,.evo-linked-watch img,.evo-gallery-item img { transition:transform .45s var(--luxury-ease),filter .35s ease; }
.evo-battle-pair a:hover img,.evo-linked-watch:hover img { transform:scale(1.035); }
.evo-badge,.evo-gallery-item { transition:transform .28s var(--luxury-ease),border-color .28s ease,box-shadow .28s ease; }
.evo-badge:hover,.evo-gallery-item:hover { transform:translateY(-2px); border-color:var(--accent-brass); box-shadow:var(--shadow-card); }

/* Mechanical horology page-transition veil: a rotating escapement-inspired ring. */
.gwd-transition-veil { position:fixed; inset:0; z-index:9999; display:grid; place-items:center; pointer-events:none; opacity:0; background:rgba(12,28,19,.0); transition:opacity .22s ease,background .22s ease; }
.gwd-transition-veil.is-active { opacity:1; background:rgba(12,28,19,.13); }
.gwd-transition-dial { width:54px; height:54px; border:1px solid var(--accent-brass); border-radius:50%; display:grid; place-items:center; color:var(--accent-brass); background:var(--bg-surface); box-shadow:0 10px 30px rgba(0,0,0,.15); position:relative; }
.gwd-transition-dial::before,.gwd-transition-dial::after { content:""; position:absolute; border:1px dashed var(--accent-brass); border-radius:50%; inset:5px; animation:gwdGearTurn 3s linear infinite; }
.gwd-transition-dial::after { inset:12px; border-style:solid; animation-direction:reverse; animation-duration:5s; }
.gwd-transition-dial span { font-family:var(--font-serif); font-size:1.4rem; line-height:1; }
@keyframes gwdGearTurn { to { transform:rotate(360deg); } }
.gwd-page-leaving .site-main { opacity:.78; transform:translateY(3px); transition:opacity .22s ease,transform .22s ease; }

/* Gentle reveal-on-scroll, activated only when JS is available. */
.gwd-reveal { opacity:0; transform:translateY(18px); transition:opacity .7s var(--luxury-ease),transform .7s var(--luxury-ease); }
.gwd-reveal.is-visible { opacity:1; transform:translateY(0); }
.gwd-reveal--delay-1 { transition-delay:.08s; } .gwd-reveal--delay-2 { transition-delay:.16s; } .gwd-reveal--delay-3 { transition-delay:.24s; }
.flash { animation:gwdFlashIn .45s var(--luxury-ease) both; }
@keyframes gwdFlashIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

/* Dark theme: warm metallic highlights, never pure white or neon. */
html[data-theme="dark"] .watch-card::before { opacity:.55; }
html[data-theme="dark"] .watch-card__media::after { background:radial-gradient(circle at var(--gwd-spot-x,50%) var(--gwd-spot-y,50%),rgba(236,199,119,.25),rgba(197,161,91,.08) 20%,transparent 52%); }
html[data-theme="dark"] .gwd-transition-veil.is-active { background:rgba(0,0,0,.28); }
html[data-theme="dark"] .evo-profile-hero { background:linear-gradient(135deg,var(--bg-surface),rgba(216,182,111,.07)); }

@media (max-width:900px) {
  .watch-card::before { animation-duration:12s; opacity:.35; }
  .watch-card:hover::before { animation-duration:7s; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
  .gwd-reveal { opacity:1; transform:none; }
  .gwd-transition-veil { display:none !important; }
  .watch-card::before { animation:none !important; }
}

/* Preserve the approved compact single-row header above the one icon rail. */
@media (min-width:901px) {
  .site-header .header-inner { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:0 clamp(12px,2vw,26px); }
  .site-header .brand-link { flex:0 1 270px; min-width:205px; }
  .site-header .header-main { flex:1 1 auto; min-width:0; display:flex; flex-direction:row; align-items:center; justify-content:flex-end; gap:.8rem; }
  .site-header .main-nav { display:flex; flex:1 1 auto; justify-content:flex-end; align-items:center; flex-wrap:nowrap; gap:clamp(2px,.45vw,8px); min-width:0; }
  .site-header .main-nav a { flex:0 1 auto; min-height:42px; padding-inline:clamp(3px,.42vw,8px); font-size:clamp(.67rem,.76vw,.82rem); white-space:nowrap; }
  .site-header .header-controls { flex:0 0 auto; }
}
@media (max-width:900px) {
  .site-header .header-inner { display:flex; align-items:center; justify-content:space-between; }
  .site-header .header-main { display:flex; flex-direction:row; align-items:center; justify-content:flex-end; }
}


/* ================================================================
   GWD border boost: high-visibility perimeter animation
   - Applies to the live analog clock card on the homepage.
   - Strengthens the existing watch-card frame without covering photos.
   ================================================================ */
.analog-clock-card {
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(197,161,91,.78);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(197,161,91,.12);
}
.analog-clock-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 8;
  pointer-events: none;
  border-radius: inherit;
  padding: 4px;
  opacity: 1;
  background: conic-gradient(
    from var(--gwd-border-angle),
    var(--gwd-motion-color,var(--accent-brass)) 0deg,
    color-mix(in srgb,var(--gwd-motion-color,var(--accent-brass)) 68%,white) 42deg,
    #fff 68deg,
    var(--gwd-motion-color,var(--accent-brass)) 104deg,
    color-mix(in srgb,var(--gwd-motion-color,var(--accent-brass)) 22%,transparent) 145deg,
    var(--gwd-motion-color,var(--accent-brass)) 210deg,
    color-mix(in srgb,var(--gwd-motion-color,var(--accent-brass)) 68%,white) 270deg,
    #fff 292deg,
    var(--gwd-motion-color,var(--accent-brass)) 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  filter: drop-shadow(0 0 3px rgba(197,161,91,.42));
  animation: gwdBorderOrbit 4.8s linear infinite;
}
.analog-clock-card:hover::before,
.analog-clock-card:focus-within::before {
  animation-duration: 2.7s;
  filter: drop-shadow(0 0 6px rgba(197,161,91,.65));
}
.analog-clock-card > * { position: relative; z-index: 1; }

/* A visibly thicker, brighter travelling gold band around each watch card. */
.watch-card::before {
  padding: 4px !important;
  opacity: .94 !important;
  background: conic-gradient(
    from var(--gwd-border-angle),
    transparent 0deg,
    transparent 205deg,
    var(--gwd-motion-color,var(--accent-brass)) 232deg,
    color-mix(in srgb,var(--gwd-motion-color,var(--accent-brass)) 68%,white) 258deg,
    #fff 278deg,
    var(--gwd-motion-color,var(--accent-brass)) 302deg,
    transparent 326deg,
    transparent 360deg
  ) !important;
  filter: drop-shadow(0 0 3px rgba(197,161,91,.38));
  animation-duration: 6.2s !important;
}
.watch-card:hover::before,
.watch-card:focus-within::before {
  opacity: 1 !important;
  padding: 4.5px !important;
  animation-duration: 3.2s !important;
  filter: drop-shadow(0 0 6px rgba(197,161,91,.62));
}
html[data-theme="dark"] .analog-clock-card {
  border-color: rgba(215,182,111,.82);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(215,182,111,.18);
}
html[data-theme="dark"] .analog-clock-card::before {
  filter: drop-shadow(0 0 5px rgba(215,182,111,.52));
}
html[data-theme="dark"] .watch-card::before {
  filter: drop-shadow(0 0 4px rgba(215,182,111,.48));
}
@media (max-width: 900px) {
  .analog-clock-card::before { animation-duration: 7.5s; }
  .watch-card::before { animation-duration: 8s !important; opacity: .82 !important; }
}
@media (prefers-reduced-motion: reduce) {
  .analog-clock-card::before,
  .watch-card::before {
    animation: none !important;
    opacity: .95 !important;
    filter: none;
  }
}

/* Random accent override: use the per-page selected colour on clock and watch frames. */
.analog-clock-card { border-color:var(--gwd-motion-color,var(--accent-brass)) !important; box-shadow:var(--shadow-card),0 0 0 1px color-mix(in srgb,var(--gwd-motion-color,var(--accent-brass)) 28%,transparent) !important; }
.analog-clock-card::before { background:conic-gradient(from var(--gwd-border-angle),var(--gwd-motion-color,var(--accent-brass)) 0deg,color-mix(in srgb,var(--gwd-motion-color,var(--accent-brass)) 68%,white) 42deg,#fff 68deg,var(--gwd-motion-color,var(--accent-brass)) 104deg,color-mix(in srgb,var(--gwd-motion-color,var(--accent-brass)) 22%,transparent) 145deg,var(--gwd-motion-color,var(--accent-brass)) 210deg,color-mix(in srgb,var(--gwd-motion-color,var(--accent-brass)) 68%,white) 270deg,#fff 292deg,var(--gwd-motion-color,var(--accent-brass)) 360deg) !important; }
.watch-card::before { background:conic-gradient(from var(--gwd-border-angle),transparent 0deg,transparent 205deg,var(--gwd-motion-color,var(--accent-brass)) 232deg,color-mix(in srgb,var(--gwd-motion-color,var(--accent-brass)) 68%,white) 258deg,#fff 278deg,var(--gwd-motion-color,var(--accent-brass)) 302deg,transparent 326deg,transparent 360deg) !important; }


/* Session-based journal and watch popularity counters. */
.gwd-session-counter{display:inline-flex;align-items:center;gap:.48rem;padding:.42rem .68rem;border:1px solid var(--border-strong);border-radius:999px;background:var(--bg-surface);color:var(--text-secondary);white-space:nowrap;box-shadow:0 4px 14px rgba(24,39,30,.05)}
.gwd-session-counter>svg{width:18px;height:18px;fill:none;stroke:var(--accent-brass);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.gwd-session-counter>span{display:grid;line-height:1.12;gap:.1rem}
.gwd-session-counter strong{font-size:.78rem;color:var(--text-primary);font-variant-numeric:tabular-nums}
.gwd-session-counter small{font-size:.58rem;letter-spacing:.055em;color:var(--text-muted)}
.gwd-watch-visit-line{display:flex;align-items:center;flex-wrap:wrap;gap:.4rem .55rem;margin:.42rem 0 .62rem;font-size:.68rem;line-height:1.35;color:var(--text-muted)}
.gwd-watch-views{display:inline-flex;align-items:center;gap:.25rem;font-variant-numeric:tabular-nums}
.gwd-watch-views>span{color:var(--accent-brass);font-size:.82rem}
.gwd-watch-rank{display:inline-flex;align-items:center;padding:.19rem .45rem;border-radius:999px;border:1px solid var(--border-strong);background:var(--accent-brass-soft);color:var(--text-primary);font-size:.63rem;font-weight:800;letter-spacing:.015em}
.gwd-watch-rank--1{background:linear-gradient(110deg,rgba(226,190,91,.22),rgba(255,247,215,.72));border-color:#c9a33f;color:#765515}
.gwd-watch-rank--2{background:linear-gradient(110deg,rgba(157,169,180,.2),rgba(239,243,246,.8));border-color:#aab5bf;color:#52616d}
.gwd-watch-rank--3{background:linear-gradient(110deg,rgba(180,112,70,.16),rgba(247,225,207,.8));border-color:#bd8968;color:#805032}
.gwd-watch-visit-line--detail{margin:.1rem 0 1rem;font-size:.76rem}
@media(max-width:700px){.gwd-session-counter{padding:.36rem .48rem}.gwd-session-counter small{display:none}.gwd-session-counter strong{font-size:.72rem}.header-controls{gap:.35rem}.gwd-watch-visit-line{font-size:.64rem}}


/* Counter visibility restoration: keep analytics visible on the final card layout. */
.gwd-session-counter {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  z-index: 6;
  color: var(--text-primary);
}
.gwd-session-counter strong,
.gwd-session-counter small {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.gwd-watch-visit-line {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 1.1rem;
  margin: .35rem 0 .55rem !important;
  position: relative;
  z-index: 1;
}
.gwd-watch-views,
.gwd-watch-rank {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}
