/* ==========================================================================
   Gold keys – buttons and menu as gold keys (from mattes-art.de, Konzept & Kunst)
   Under the pointer: the key rises (neighbours a little, like a hand over piano keys),
   fills with gold leaf from below, a light runs over it, two rings sound out,
   an arrow flies in, and the button follows the mouse a little (magnetism).
   Needs goldkeys.js (adds the fill/ring/arrow elements; mouse screens only).
   ========================================================================== */

:root {
	--gk-gold: #C9A063;
	--gk-gold-ink: #8C6627;
	--gk-gold-deep: #6F4F1C;
	--gk-bronze: #2B1C07;      /* text on gold – deep bronze, never black */
	--gk-ink: #3B3125;
	--gk-ivory: #FBF6EC;
	--gk-font: 'Mulish', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
	--gk-ease: cubic-bezier(.2, .7, .2, 1);
	--gk-spring: cubic-bezier(.25, 1.6, .45, 1);
	/* gold leaf: a highlight plus a moving foil */
	--gk-leaf: radial-gradient(90% 120% at 30% 10%, rgba(255, 252, 238, .95) 0%, rgba(255, 246, 214, .3) 40%, rgba(255, 246, 214, 0) 65%),
		linear-gradient(118deg, #B98A3A 0%, #F6E2A6 18%, #D9AC4E 34%, #FFF1C4 50%, #CF9F45 64%, #F3D78E 80%, #B98A3A 100%);
	/* ivory pearl (for filled gold buttons and buttons on gold) */
	--gk-pearl: radial-gradient(120% 140% at 50% 120%, rgba(240, 206, 130, .55) 0%, rgba(240, 206, 130, 0) 55%),
		linear-gradient(118deg, #FFFDF6 0%, #FFF4D8 22%, #FFFFFF 42%, #FBEBC4 60%, #FFFDF6 80%, #F7E3B4 100%);
	--gk-shine: linear-gradient(112deg, rgba(255, 240, 200, 0) 30%, rgba(255, 228, 160, .7) 47%, rgba(255, 250, 230, 1) 50%, rgba(255, 228, 160, .6) 53%, rgba(255, 240, 200, 0) 70%);
}

@keyframes gk-leaf  { to { background-position: 0 0, 100% 50%; } }      /* the light wanders over the foil */
@keyframes gk-shine { to { transform: translateX(130%); } }               /* one glint over the key */
@keyframes gk-ring  { 0% { opacity: .95; transform: scale(1); } 100% { opacity: 0; transform: scale(1.18, 1.6); } }
@keyframes gk-ring-menu  { 0% { opacity: .95; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35, 1.9); } }
@keyframes gk-ring-round { 0% { opacity: .95; transform: scale(1); } 100% { opacity: 0; transform: scale(1.6); } }

/* ------------------------------------------------------------------ 1. buttons */

.gk-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .55em;
	font-family: var(--gk-font); font-size: .95rem; font-weight: 700; letter-spacing: .02em; line-height: 1.2;
	padding: .95em 1.75em; border-radius: 999px; border: 1px solid transparent;
	cursor: pointer; text-decoration: none; text-align: center;
	transition: background-position .6s var(--gk-ease), color .2s, border-color .2s, box-shadow .3s, background-color .2s;
}
.gk-btn--gold {
	color: var(--gk-bronze);
	background: linear-gradient(120deg, #EED9A4 0%, #C9A063 38%, #B88E47 62%, #EAD093 100%);
	background-size: 220% 100%; background-position: 0% 0;
	box-shadow: 0 8px 20px -10px rgba(140, 102, 39, .6), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.gk-btn--gold:hover { background-position: 100% 0; box-shadow: 0 12px 28px -12px rgba(140, 102, 39, .75), inset 0 1px 0 rgba(255, 255, 255, .6); }
.gk-btn--ghost { color: var(--gk-gold-ink); background: transparent; border-color: currentColor; }
.gk-btn--ghost:hover { color: var(--gk-gold-deep); background: rgba(201, 160, 99, .1); }

/* the key effect (goldkeys.js adds .gk-key and the spans) */
.gk-key { --mx: 0px; --my: 0px; position: relative; isolation: isolate; overflow: visible; transform: translate(var(--mx), var(--my));
	transition: transform .5s var(--gk-spring), color .25s, border-color .25s, box-shadow .35s; }
.gk-key__fill { position: absolute; inset: -1.5px; z-index: -1; border-radius: inherit; overflow: hidden; pointer-events: none;
	background: var(--gk-leaf); background-size: 100% 100%, 260% 260%; background-position: 0 0, 0% 50%;
	box-shadow: inset 0 1px 1px rgba(255, 255, 255, .9), inset 0 -2px 6px rgba(140, 102, 39, .35);
	clip-path: inset(100% 0 0 0 round 999px); transition: clip-path .5s var(--gk-ease); }
.gk-btn--gold.gk-key .gk-key__fill, .gk-on-gold .gk-key__fill { inset: 0; background: var(--gk-pearl); background-size: 100% 100%, 260% 260%;
	box-shadow: inset 0 1px 0 #fff, inset 0 -3px 8px rgba(201, 160, 99, .35); }
.gk-key__fill::after { content: ""; position: absolute; inset: 0; background: var(--gk-shine); transform: translateX(-130%); }
.gk-key__ring { position: absolute; inset: -1.5px; border-radius: inherit; pointer-events: none; z-index: -2; }
.gk-key__ring::before, .gk-key__ring::after { content: ""; position: absolute; inset: 0; border-radius: inherit;
	border: 1.5px solid rgba(255, 246, 214, .95); box-shadow: 0 0 14px rgba(255, 236, 180, .8); opacity: 0; }
.gk-key__arrow { display: inline-flex; width: 0; margin-left: -.55em; overflow: hidden; opacity: 0;
	transition: width .4s var(--gk-ease), margin .4s var(--gk-ease), opacity .3s; }
.gk-key__arrow svg { width: 1.05em; height: 1.05em; flex: none; transform: translateX(-120%); transition: transform .45s var(--gk-spring); }

.gk-key:hover, .gk-key:focus-visible { color: var(--gk-bronze); border-color: rgba(185, 138, 58, .9);
	box-shadow: 0 0 0 4px rgba(255, 246, 214, .3), 0 0 30px rgba(255, 232, 160, .7), 0 18px 34px -16px rgba(58, 42, 18, .7); }
.gk-btn--ghost.gk-key:hover { background: transparent; }
.gk-key:hover { transform: translate(var(--mx), calc(var(--my) - 3px)) scale(1.04); }
.gk-key:hover .gk-key__fill, .gk-key:focus-visible .gk-key__fill { clip-path: inset(0 0 0 0 round 999px); animation: gk-leaf 3s linear infinite; }
.gk-key:hover .gk-key__fill::after, .gk-key:focus-visible .gk-key__fill::after { animation: gk-shine 1.1s .12s var(--gk-ease) forwards; }
.gk-key:hover .gk-key__ring::before, .gk-key:focus-visible .gk-key__ring::before { animation: gk-ring 1s var(--gk-ease) both; }
.gk-key:hover .gk-key__ring::after, .gk-key:focus-visible .gk-key__ring::after { animation: gk-ring 1.25s .18s var(--gk-ease) both; }
.gk-key:hover .gk-key__arrow, .gk-key:focus-visible .gk-key__arrow { width: 1.05em; margin-left: 0; opacity: 1; }
.gk-key:hover .gk-key__arrow svg, .gk-key:focus-visible .gk-key__arrow svg { transform: translateX(0); }
.gk-key:active { transform: translate(var(--mx), var(--my)) scale(.97); transition-duration: .08s; }

/* ------------------------------------------------------------------ 2. menu (nav) as gold keys */

.gk-menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.gk-menu > li { position: relative; display: flex; align-items: center; }
.gk-menu a { display: block; padding: 10px 14px; color: var(--gk-ink); text-decoration: none; font: 600 .95rem/1.2 var(--gk-font); white-space: nowrap; position: relative; }
/* without a mouse (phones) or before the script: a gold underline that grows from the left */
.gk-menu a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--gk-gold); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--gk-ease); }
.gk-menu a:hover::after, .gk-menu a[aria-current="page"]::after { transform: scaleX(1); }

/* --lift (0…1) comes from goldkeys.js: the item under the pointer rises most, its neighbours a little */
.gk-mkey { --lift: 0; isolation: isolate; transform: translateY(calc(var(--lift) * -4px)) scale(calc(1 + var(--lift) * .06));
	transition: transform .42s var(--gk-spring), color .25s; }
.gk-mkey .gk-mkey__fill, .gk-mkey .gk-mkey__ring { position: absolute; left: 0; right: 0; top: 50%; height: 40px; margin-top: -20px; border-radius: 999px; pointer-events: none; }
.gk-mkey__fill { z-index: -1; overflow: hidden; background: var(--gk-leaf); background-size: 100% 100%, 260% 260%; background-position: 0 0, 0% 50%;
	box-shadow: inset 0 1px 1px rgba(255, 255, 255, .9), inset 0 -2px 5px rgba(140, 102, 39, .4), 0 8px 18px -10px rgba(111, 79, 28, .7);
	clip-path: inset(100% 0 0 0 round 999px); transition: clip-path .42s var(--gk-ease); }
.gk-mkey__fill::after { content: ""; position: absolute; inset: 0; background: var(--gk-shine); transform: translateX(-130%); }
.gk-mkey__ring { z-index: -1; }
.gk-mkey__ring::before, .gk-mkey__ring::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1.5px solid rgba(214, 170, 80, .9); box-shadow: 0 0 10px rgba(235, 198, 110, .55); opacity: 0; }
.gk-mkey:hover, .gk-mkey:focus-visible { color: var(--gk-bronze); }
.gk-mkey:hover::after { transform: scaleX(0); }
.gk-mkey[aria-current="page"]:hover::after { transform: scaleX(1); background: var(--gk-bronze); }
.gk-mkey:hover .gk-mkey__fill, .gk-mkey:focus-visible .gk-mkey__fill { clip-path: inset(0 0 0 0 round 999px); animation: gk-leaf 2.6s linear infinite; }
.gk-mkey:hover .gk-mkey__fill::after, .gk-mkey:focus-visible .gk-mkey__fill::after { animation: gk-shine 1s .1s var(--gk-ease) forwards; }
.gk-mkey:hover .gk-mkey__ring::before, .gk-mkey:focus-visible .gk-mkey__ring::before { animation: gk-ring-menu .9s var(--gk-ease) both; }
.gk-mkey:hover .gk-mkey__ring::after, .gk-mkey:focus-visible .gk-mkey__ring::after { animation: gk-ring-menu 1.1s .16s var(--gk-ease) both; }
.gk-mkey:active { transform: translateY(calc(var(--lift) * -4px + 2px)) scale(.96); transition-duration: .08s; }
.gk-menu > li:has(.gk-mkey:hover) { z-index: 3; }

/* ------------------------------------------------------------------ 3. round icon keys with their name below */

.gk-icons { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.gk-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; color: var(--gk-ink); text-decoration: none; }
.gk-icon svg { width: 22px; height: 22px; position: relative; z-index: 1; transition: transform .42s var(--gk-spring); }
.gk-icon.gk-mkey .gk-mkey__fill, .gk-icon.gk-mkey .gk-mkey__ring { inset: 0; height: auto; margin: 0; border-radius: 50%; }
.gk-icon.gk-mkey .gk-mkey__fill { clip-path: circle(0% at 50% 100%); }
.gk-icon.gk-mkey:hover .gk-mkey__fill, .gk-icon.gk-mkey:focus-visible .gk-mkey__fill { clip-path: circle(150% at 50% 100%); }
.gk-icon.gk-mkey:hover .gk-mkey__ring::before { animation-name: gk-ring-round; }
.gk-icon.gk-mkey:hover .gk-mkey__ring::after { animation-name: gk-ring-round; }
.gk-icon.gk-mkey:hover svg { transform: scale(1.1) rotate(-6deg); filter: drop-shadow(0 1px 0 rgba(255, 252, 238, .9)); }
.gk-icon::after { display: none; }
.gk-tip {
	position: absolute; left: 50%; top: calc(100% + 10px); z-index: 30; white-space: nowrap; pointer-events: none;
	padding: 5px 11px 6px; border-radius: 99px; background: linear-gradient(180deg, #FFFEF9 0%, #FBF1DA 100%); color: var(--gk-gold-deep);
	border: 1px solid rgba(201, 160, 99, .55); font: 700 .68rem/1 var(--gk-font); letter-spacing: .08em; text-transform: uppercase;
	box-shadow: 0 10px 22px -10px rgba(111, 79, 28, .75), inset 0 1px 0 #fff;
	opacity: 0; transform: translate(-50%, -6px) scale(.86); transform-origin: 50% 0; transition: opacity .2s, transform .32s var(--gk-spring);
}
.gk-tip::after { content: ""; position: absolute; left: 50%; bottom: 100%; margin-left: -5px; border: 5px solid transparent; border-bottom-color: #FFFEF9; }
.gk-mkey:hover .gk-tip, .gk-mkey:focus-visible .gk-tip { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* calm for people who switched off animations */
@media (prefers-reduced-motion: reduce) {
	.gk-key, .gk-key:hover, .gk-mkey, .gk-mkey:hover { transform: none; }
	.gk-key__fill, .gk-key__fill::after, .gk-key__ring::before, .gk-key__ring::after,
	.gk-mkey__fill, .gk-mkey__fill::after, .gk-mkey__ring::before, .gk-mkey__ring::after { animation: none !important; transition: none; }
}
