/* Regal Widgets — shared design tokens & base styles */

.regal-w{
	--regal-gold: #CDA44D;
	--regal-gold-bright: #ECCD82;
	--regal-gold-dim: #8A713A;
	--regal-bg: #060504;
	--regal-card: #0F0D0B;
	--regal-card-line: rgba(201,164,77,0.35);
	--regal-ink: #F2ECE0;
	--regal-ink-dim: #B9B0A0;
	--regal-ink-faint: #6F695D;
	--regal-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);

	font-family: 'Inter', sans-serif;
	-webkit-font-smoothing: antialiased;
	position: relative;
}
.regal-w *{ box-sizing: border-box; }
.regal-w img{ max-width: 100%; }

.regal-fonts{ display:none; }

/* ---------- Card base (About / Timeline / Testimonial share this) ---------- */
.regal-card{
	background: linear-gradient(180deg, #151210 0%, #0B0A08 100%);
	border: 1px solid var(--regal-card-line);
	border-radius: 18px;
	padding: 34px 30px;
	color: var(--regal-ink);
}
.regal-eyebrow{
	font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
	color: var(--regal-gold); margin-bottom: 14px;
}
.regal-title{
	font-family: 'Playfair Display', serif;
	font-size: 26px; font-weight: 600; margin: 0 0 16px; color: var(--regal-ink);
}
.regal-body{
	font-family: 'Cormorant Garamond', serif;
	font-size: 18px; line-height: 1.65; color: var(--regal-ink-dim);
	overflow: hidden;
}
.regal-body.clamped{ display:-webkit-box; -webkit-line-clamp:6; -webkit-box-orient:vertical; }
.regal-body.expanded{ -webkit-line-clamp: unset; }
.regal-readmore{
	margin-top: 16px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--regal-gold); background: none; border: none; cursor: pointer; padding: 0;
	text-decoration: none; display: inline-block;
}
.regal-readmore:hover{ color: var(--regal-gold-bright); }

/* ---------- Slider (standalone widget) ---------- */
.regal-slider{
	position: relative;
	width: 100%;
	max-width: 340px;
	aspect-ratio: 3 / 5;
	margin: 0 auto;
	border-radius: 22px;
	overflow: hidden;
	background: var(--regal-card);
	border: 1px solid var(--regal-gold);
}
.regal-slide{
	position: absolute; inset: 0;
	opacity: 0;
	transform: scale(1.04);
	transition: opacity 1s ease, transform 1.2s ease;
}
.regal-slide.is-active{ opacity: 1; transform: scale(1); z-index: 1; }
.regal-slide img{ width:100%; height:100%; object-fit: cover; display:block; }
.regal-slider.is-mono .regal-slide img{ filter: grayscale(1) contrast(1.08); }
.regal-slider::after{
	content:''; position:absolute; inset:0; z-index:2; pointer-events:none;
	background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.6) 100%);
}
.regal-slide-caption{
	position:absolute; left:16px; right:16px; bottom:14px; z-index:3;
	font-family:'Playfair Display', serif; font-size:14px; color: var(--regal-gold-bright);
}
.regal-slide-nav{
	position:absolute; top:50%; transform:translateY(-50%);
	width:36px; height:36px; border-radius:50%;
	border:1px solid rgba(205,164,77,0.5);
	background: rgba(6,5,4,0.55);
	color: var(--regal-gold-bright);
	display:flex; align-items:center; justify-content:center;
	cursor:pointer; z-index:4;
	transition: background .2s, transform .2s;
}
.regal-slide-nav:hover{ background: rgba(205,164,77,0.25); transform: translateY(-50%) scale(1.08); }
.regal-slide-nav svg{ width:15px; height:15px; }
.regal-slide-nav.prev{ left:8px; }
.regal-slide-nav.next{ right:8px; }
.regal-dots{
	display:flex; justify-content:center; gap:7px; margin-top:16px;
}
.regal-dots span{ width:5px; height:5px; border-radius:50%; background: var(--regal-ink-faint); cursor:pointer; transition: background .3s, box-shadow .3s; }
.regal-dots span.is-active{ background: var(--regal-gold-bright); box-shadow: 0 0 8px rgba(236,205,130,0.7); }

/* ---------- Card Deck (fan of 3 cards, middle = slider) ---------- */
.regal-deck-wrap{ width:100%; max-width:100%; overflow-x:hidden; display:flex; flex-direction:column; align-items:center; }
.regal-deck-row{ width:100%; display:flex; align-items:center; justify-content:center; gap:16px; }
.regal-deck-arrow{
	flex:0 0 auto; width:44px; height:44px; border-radius:50%;
	border:1px solid rgba(205,164,77,0.28); background: rgba(255,255,255,0.02);
	color: var(--regal-gold); display:flex; align-items:center; justify-content:center; cursor:pointer;
}
.regal-deck-arrow svg{ width:16px; height:16px; }

/* Flat, non-overlapping 3-box row (no fan/rotate/perspective) — fluid across all breakpoints */
.regal-deck{ display:flex; align-items:stretch; justify-content:center; gap:clamp(8px,1.6vw,14px); width:100%; max-width:900px; height:clamp(360px,58vw,520px); }
.regal-deck-card{
	position:relative; flex:0 1 190px; min-width:56px; height:100%; overflow:hidden;
	display:flex; align-items:center; justify-content:center;
	border-radius:6px; border:1px solid var(--regal-side-frame-border, var(--regal-card-line));
	transition: flex-basis .5s cubic-bezier(.22,.9,.24,1), opacity .4s ease;
	opacity:.78; cursor:pointer;
}
.regal-deck-card.is-active{ flex:1 1 440px; opacity:1; cursor:default; }
.regal-deck-card.is-slider{ display:flex; align-items:center; justify-content:center; }
.regal-deck-card.is-slider{ border-color: var(--regal-middle-frame-border, var(--regal-card-line)); }
.regal-deck-card.is-slider .regal-slider{ width:100%; height:100%; max-width:none; border:none; border-radius:0; }
.regal-deck-card .regal-card{ width:100%; height:100%; display:flex; flex-direction:column; position:relative; z-index:1; border:none; border-radius:0; }
.regal-deck-card .regal-body{ flex:1; -webkit-line-clamp:9; }

/* Collapsed rail label (rotated title) shown on inactive cards; hidden once a card is active */
.regal-rail-label{
	display:none; width:100%; height:100%; align-items:center; justify-content:center; padding:14px 6px;
}
.regal-rail-label span{
	writing-mode: vertical-rl; transform: rotate(180deg);
	font-family:'Playfair Display', serif; font-weight:600;
	font-size: clamp(12px, 1.6vw, 15px); letter-spacing:.03em;
	color: var(--regal-ink); white-space:nowrap;
}
.regal-deck-card:not(.is-active) .regal-rail-label{ display:flex; }
.regal-deck-card:not(.is-active) .regal-card-full{ display:none; }
.regal-deck-card.is-active .regal-rail-label{ display:none; }

/* Persistent centered title above the active Gallery slider */
.regal-gallery-label{
	position:absolute; top:14px; left:0; right:0; z-index:5; text-align:center; pointer-events:none;
	font-family:'Playfair Display', serif; font-weight:600; letter-spacing:.03em;
	font-size: clamp(14px, 2vw, 18px); color: var(--regal-ink);
}

/* Stretched-link overlay: sits UNDER the card's real content/controls via
   z-index, so Read More and the slider's own arrows/dots (which get their
   own higher z-index) always keep working independently. */
.regal-card-overlay{
	position:absolute; inset:0; z-index:2;
	display:block; background:none; border:none; padding:0; margin:0;
	cursor:pointer; -webkit-appearance:none; appearance:none;
}
.regal-deck-card .regal-card .regal-readmore{ position:relative; z-index:3; }
.regal-deck-card.is-slider .regal-slide-nav,
.regal-deck-card.is-slider .regal-slide-caption{ z-index:4; }

/* ---------- Card Deck: optional Internal Content Scroll (only when .has-internal-scroll) ----------
   The ACTIVE Left/Right card keeps its size; only its body scrolls. Header + Read More stay put.
   The click overlay is made transparent to the pointer on the active card so wheel / touch
   scrolling reaches the content; regal.js forwards plain clicks to the overlay's action. */
.has-internal-scroll .regal-deck-card.is-active .regal-card-overlay{ pointer-events:none; }
.has-internal-scroll .regal-deck-card.is-active .regal-card .regal-body{
	display:block; -webkit-line-clamp:unset; min-height:0;
	overflow-x:hidden; overflow-y:auto; -webkit-overflow-scrolling:touch;
	overscroll-behavior:contain; touch-action:pan-y;
	scrollbar-width:thin; scrollbar-color:rgba(201,164,77,.45) transparent;
}
.has-internal-scroll .regal-deck-card.is-active .regal-card .regal-body::-webkit-scrollbar{ width:4px; }
.has-internal-scroll .regal-deck-card.is-active .regal-card .regal-body::-webkit-scrollbar-thumb{ background:rgba(201,164,77,.45); border-radius:2px; }
.has-internal-scroll .regal-deck-card.is-active .regal-card .regal-body::-webkit-scrollbar-track{ background:transparent; }

/* ---------- Timeline (vertical, line + dot markers) ---------- */
.regal-vtimeline{
	--regal-tl-line: var(--regal-card-line, rgba(201,164,77,0.35));
	--regal-tl-dot: var(--regal-gold, #CDA44D);
	position: relative;
	padding-left: 26px;
}
.regal-vtimeline::before{
	content:''; position:absolute; left:4px; top:6px; bottom:6px; width:1px;
	background: var(--regal-tl-line);
}
.regal-vtimeline-item{ position:relative; padding-bottom:24px; }
.regal-vtimeline-item:last-child{ padding-bottom:0; }
.regal-vtimeline-dot{
	position:absolute; left:-26px; top:5px; width:10px; height:10px; border-radius:50%;
	background: var(--regal-bg, #060504);
	border: 2px solid var(--regal-tl-dot);
	box-shadow: 0 0 0 3px var(--regal-bg, #060504);
}
.regal-vtimeline-date{
	display:block; font-size:11px; letter-spacing:0.1em; text-transform:uppercase;
	color: var(--regal-tl-dot); margin-bottom:4px;
}
.regal-vtimeline-role{ font-family:'Playfair Display', serif; font-size:17px; color: var(--regal-ink); margin:0 0 4px; }
.regal-vtimeline-desc{ font-family:'Cormorant Garamond', serif; font-size:16.5px; line-height:1.55; color: var(--regal-ink-dim); margin:0; }


/* ---------- Profile header ---------- */
.regal-profile{ display:flex; flex-direction:column; align-items:center; text-align:center; }
.regal-seal{ width:88px; height:88px; margin-bottom:10px; }
.regal-seal svg{ width:100%; height:100%; }
.regal-profile h2{ font-family:'Playfair Display', serif; font-weight:600; font-size:28px; margin:6px 0 10px; color: var(--regal-ink); }
.regal-profile .rule{ width:44px; height:2px; background: var(--regal-gold); margin:0 0 12px; }
.regal-profile p{ font-size:12px; letter-spacing:0.14em; text-transform:uppercase; color: var(--regal-ink-faint); margin:0 0 20px; }
.regal-socials{ display:flex; gap:12px; }
.regal-socials a{
	width:36px; height:36px; border-radius:50%; border:1px solid var(--regal-gold-dim);
	display:flex; align-items:center; justify-content:center; color: var(--regal-gold);
	text-decoration:none; transition: border-color .2s, background .2s, transform .2s;
}
.regal-socials a:hover{ border-color: var(--regal-gold); background: rgba(205,164,77,0.1); transform: translateY(-2px); }
.regal-socials svg{ width:15px; height:15px; }

/* ---------- Testimonial ---------- */
.regal-testimonial{ text-align:center; }
.regal-testimonial .quote-mark{ font-family:'Playfair Display', serif; font-size:44px; color: var(--regal-gold); line-height:1; margin-bottom:6px; }
.regal-testimonial .quote-text{ font-family:'Cormorant Garamond', serif; font-size:20px; line-height:1.6; color: var(--regal-ink-dim); margin:0 0 20px; }
.regal-testimonial .avatar{ width:56px; height:56px; border-radius:50%; object-fit:cover; border:1px solid var(--regal-gold); margin:0 auto 10px; display:block; }
.regal-testimonial .t-name{ font-family:'Playfair Display', serif; font-size:16px; color: var(--regal-ink); margin:0; }
.regal-testimonial .t-role{ font-size:11px; letter-spacing:0.12em; text-transform:uppercase; color: var(--regal-ink-faint); margin:2px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width:720px){
	.regal-deck-card{ flex-basis:64px; min-width:48px; }
	.regal-deck-card.is-active{ flex-basis:calc(100% - 130px); }
	.regal-deck-arrow{ width:38px; height:38px; }
	.regal-card{ padding:24px 20px; }
	.regal-title{ font-size:21px; }
	.regal-body{ font-size:16px; }
}
@media (prefers-reduced-motion: reduce){
	.regal-deck-card, .regal-slide{ transition:none; }
}

/* ---------- Built-in popup (no external plugin needed) ---------- */
.regal-popup-overlay{
	position: fixed; inset: 0; z-index: 999999;
	background: rgba(6,5,4,0.8);
	display: flex; align-items: center; justify-content: center;
	padding: 24px;
	opacity: 0; visibility: hidden;
	transition: opacity .25s ease;
}
.regal-popup-overlay.is-open{ opacity: 1; visibility: visible; }
.regal-popup-box{
	position: relative;
	max-width: 460px; width: 100%; max-height: 85vh; overflow: auto;
	background: linear-gradient(180deg, #151210 0%, #0B0A08 100%);
	border: 1px solid var(--regal-gold, #CDA44D);
	border-radius: 18px;
	padding: 40px 32px;
	box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);
	transform: translateY(12px); transition: transform .25s ease;
}
.regal-popup-overlay.is-open .regal-popup-box{ transform: translateY(0); }
.regal-popup-close{
	position: absolute; top: 14px; right: 14px;
	width: 34px; height: 34px; border-radius: 50%;
	border: 1px solid var(--regal-gold-dim, #8A713A);
	background: none; color: var(--regal-gold, #CDA44D);
	font-size: 18px; line-height: 1; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.regal-popup-close:hover{ background: rgba(205,164,77,0.12); }
.regal-popup-content .regal-card{ border: none; box-shadow: none; padding: 0; background: none; }
.regal-popup-content .regal-body{ -webkit-line-clamp: unset; }
.regal-popup-content .regal-slider{ max-width: 100%; }

/* ---------- Blog Grid (dynamic posts, CSS-column masonry) ---------- */
.regal-blog-wrap{ width:100%; }
.regal-blog-heading{
	display:flex; align-items:baseline; gap:16px;
	font-family:'Playfair Display', serif; font-weight:600;
	font-size: clamp(22px, 3vw, 34px); color: var(--regal-ink);
	margin:0 0 clamp(20px, 3vw, 34px);
}
.regal-blog-heading-line{ flex:1; height:1px; background: var(--regal-card-line); }

.regal-blog-grid{ column-count:3; column-gap:22px; width:100%; }
.regal-blog-card{
	position:relative; display:inline-block; width:100%;
	break-inside:avoid; -webkit-column-break-inside:avoid; page-break-inside:avoid;
	margin-bottom:22px; overflow:hidden;
	background: linear-gradient(180deg, #151210 0%, #0B0A08 100%);
	border:1px solid var(--regal-card-line); border-radius:10px;
}
.regal-blog-card-media{ width:100%; overflow:hidden; }
.regal-blog-card-media img{ width:100%; height:auto; display:block; object-fit:cover; transition: transform .5s ease; }
.regal-blog-card:hover .regal-blog-card-media img{ transform:scale(1.045); }
.regal-blog-card-body{ padding:22px 20px; position:relative; z-index:1; }
.regal-blog-meta{ display:flex; align-items:center; gap:10px; font-size:11px; letter-spacing:.1em; text-transform:uppercase; margin:0 0 10px; }
.regal-blog-cat{ color: var(--regal-gold); }
.regal-blog-date{ color: var(--regal-ink-faint); }
.regal-blog-title{ font-family:'Playfair Display', serif; font-size:19px; font-weight:600; line-height:1.32; margin:0 0 10px; }
.regal-blog-title a{ position:relative; z-index:3; color: var(--regal-ink); text-decoration:none; }
.regal-blog-title a:hover{ color: var(--regal-gold-bright); }
.regal-blog-excerpt{ font-family:'Cormorant Garamond', serif; font-size:16px; line-height:1.6; color: var(--regal-ink-dim); margin:0 0 14px; }
.regal-blog-readmore{
	position:relative; z-index:3; display:inline-block;
	font-size:12px; letter-spacing:.12em; text-transform:uppercase;
	color: var(--regal-gold); text-decoration:none;
}
.regal-blog-readmore:hover{ color: var(--regal-gold-bright); }
.regal-blog-empty{ text-align:center; color: var(--regal-ink-faint); padding:30px 0; }

@media (max-width:600px){
	.regal-blog-card-body{ padding:18px 16px; }
	.regal-blog-title{ font-size:17px; }
}
