/*
Theme Name: Fernandez Dental
Description: Shell theme for the Fernandez Dental Office demo. Pages are hand-written HTML.
Author: Released Solutions
Author URI: https://releasedsolutions.net/
Version: 0.1.0
Text Domain: fernandezdental
*/

/* ---------- Tokens (from the logo: teal lettering, blush diamond) ---------- */
:root {
	--teal-950: #0b2f2b;
	--teal-900: #0f3d38;
	--teal-700: #1d6158;
	--teal-500: #2f8a7d;
	--teal-100: #dcefeb;
	--pink-300: #f6b9c1;
	--pink-100: #fde9ec;
	--rose: #c8425f;
	--rose-600: #a93350;
	--cream: #fbf3ee;
	--sand: #f5e6dc;
	--white: #fff;
	--ink: #173230;
	--muted: #4b6460;

	--f-head: 'Poppins', system-ui, sans-serif;
	--f-body: 'DM Sans', system-ui, sans-serif;

	--wrap: 1200px;
	--gutter: clamp(16px, 4vw, 40px);
	--r-lg: 36px;
	--r-md: 22px;
	--shadow: 0 18px 50px -20px rgba(15, 61, 56, .35);
	--ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
	margin: 0;
	font: 400 17px/1.65 var(--f-body);
	color: var(--ink);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--teal-700); }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 600; line-height: 1.15; color: var(--teal-900); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.fd-wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.fd-section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.fd-center { text-align: center; }
.fd-eyebrow { display: inline-flex; align-items: center; gap: .5em; font: 600 .82rem/1 var(--f-head); letter-spacing: .14em; text-transform: uppercase; color: var(--rose); margin-bottom: 1rem; }
.fd-eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }
.fd-lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.fd-center .fd-lede { margin-inline: auto; }
.fd-skip { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--white); padding: 8px 14px; border-radius: 8px; }
.fd-skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.fd-btn {
	--bg: var(--rose); --fg: var(--white);
	position: relative; overflow: hidden; isolation: isolate;
	display: inline-flex; align-items: center; gap: .55em;
	padding: .95em 1.6em; border-radius: 999px; border: 0;
	background: var(--bg); color: var(--fg);
	font: 600 .95rem/1 var(--f-head); text-decoration: none; cursor: pointer;
	box-shadow: 0 10px 24px -12px rgba(200, 66, 95, .7);
	transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s;
}
.fd-btn::after { /* shine sweep */
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
	transform: translateX(-120%); transition: transform .7s var(--ease);
}
.fd-btn:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -14px rgba(200, 66, 95, .8); background: var(--rose-600); }
.fd-btn:hover::after { transform: translateX(120%); }
.fd-btn svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.fd-btn:hover svg { transform: translateX(4px); }
.fd-btn--ghost { --bg: transparent; --fg: var(--teal-900); box-shadow: inset 0 0 0 2px var(--teal-900); }
.fd-btn--ghost:hover { background: var(--teal-900); color: var(--white); box-shadow: inset 0 0 0 2px var(--teal-900); }
.fd-btn--white { --bg: var(--white); --fg: var(--teal-900); box-shadow: none; }
.fd-btn--white:hover { background: var(--pink-100); box-shadow: none; }
.fd-btn--sm { padding: .7em 1.2em; font-size: .82rem; }
.fd-link { display: inline-flex; align-items: center; gap: .4em; font: 600 .95rem var(--f-head); color: var(--rose); text-decoration: none; }
.fd-link svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.fd-link:hover svg { transform: translateX(5px); }

/* ---------- Scroll progress ---------- */
.fd-progress { position: fixed; inset: 0 0 auto; height: 4px; z-index: 200; background: linear-gradient(90deg, var(--pink-300), var(--rose)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---------- Top bar ---------- */
.fd-topbar { background: var(--teal-900); color: #e6f2ef; font-size: .85rem; }
.fd-topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; }
.fd-topbar__phones { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.fd-topbar__label { font: 600 .9rem var(--f-head); color: var(--white); }
.fd-topbar a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.fd-topbar a:hover { color: var(--pink-300); }
.fd-topbar svg { width: 15px; height: 15px; fill: none; stroke: var(--pink-300); stroke-width: 1.8; stroke-linejoin: round; }
.fd-topbar__right { display: flex; align-items: center; gap: 18px; }
.fd-topbar__lang b { color: var(--white); }
.fd-topbar .fd-btn--white { color: var(--teal-900); }

/* ---------- Header (split nav around hanging logo badge) ---------- */
.fd-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); transition: box-shadow .4s; }
.fd-header.is-stuck { box-shadow: 0 8px 30px -18px rgba(15, 61, 56, .45); }
.fd-header__in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 78px; }
.fd-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(10px, 2vw, 30px); }
.fd-nav--right ul { justify-content: flex-end; }
.fd-nav__item { position: relative; }
.fd-nav__top { display: inline-flex; align-items: center; gap: 5px; padding: 26px 0; font: 500 .92rem var(--f-head); color: var(--teal-900); text-decoration: none; position: relative; }
.fd-nav__top::after { content: ""; position: absolute; left: 0; right: 14px; bottom: 18px; height: 2px; background: var(--rose); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.fd-nav__item:hover .fd-nav__top::after, .fd-nav__item:focus-within .fd-nav__top::after { transform: scaleX(1); }
.fd-caret { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .3s; }
.fd-nav__item:hover .fd-caret { transform: rotate(180deg); }
.fd-nav__drop { position: absolute; top: calc(100% - 8px); left: -18px; min-width: 230px; display: block !important; padding: 12px !important; background: var(--white); border-radius: 18px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s var(--ease); }
.fd-nav--right .fd-nav__item:last-child .fd-nav__drop { left: auto; right: -18px; }
.fd-nav__item:hover .fd-nav__drop, .fd-nav__item:focus-within .fd-nav__drop { opacity: 1; visibility: visible; transform: none; }
.fd-nav__drop a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .93rem; transition: background .2s, color .2s, padding .25s var(--ease); }
.fd-nav__drop a:hover { background: var(--pink-100); color: var(--rose-600); padding-left: 20px; }

.fd-badge { position: relative; width: 168px; height: 168px; margin: 0 clamp(16px, 3vw, 44px) -86px; border-radius: 50%; background: var(--white); display: grid; place-items: center; box-shadow: 0 14px 34px -16px rgba(15, 61, 56, .45); z-index: 2; transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease); }
.fd-badge::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 2px dashed var(--pink-300); animation: fd-spin 40s linear infinite; }
.fd-badge img { width: 74%; position: relative; }
.fd-header.is-stuck .fd-badge { width: 120px; height: 120px; margin-bottom: -44px; }
.fd-burger { display: none; }
.fd-mobile { display: none; }

/* ---------- Footer ---------- */
.fd-footer { background: var(--teal-950); color: #cfe2de; padding: 80px 0 30px; font-size: .95rem; }
.fd-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.fd-footer h3 { color: var(--white); font-size: 1.05rem; }
.fd-footer a { color: var(--pink-300); text-decoration: none; }
.fd-footer a:hover { text-decoration: underline; }
.fd-footer small { color: #9fbcb6; }
.fd-footer__logo { display: inline-block; background: var(--white); border-radius: 18px; padding: 14px 18px; margin-bottom: 18px; }
.fd-footer__logo img { width: 150px; }
.fd-footer__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 50px; padding-top: 24px; font-size: .85rem; color: #9fbcb6; }

/* ---------- Toast ---------- */
.fd-toast { position: fixed; left: 50%; bottom: 26px; z-index: 300; transform: translate(-50%, calc(100% + 40px)); visibility: hidden; background: var(--teal-900); color: var(--white); padding: 14px 22px; border-radius: 14px; box-shadow: var(--shadow); font-size: .95rem; transition: transform .45s var(--ease), visibility .45s; max-width: calc(100% - 32px); }
.fd-toast.is-on { transform: translate(-50%, 0); visibility: visible; }

/* ---------- Scroll reveal ---------- */
.js [data-reveal] { opacity: 0; transition: opacity .9s var(--ease), translate .9s var(--ease), scale .9s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal="up"] { translate: 0 40px; }
.js [data-reveal="left"] { translate: -50px 0; }
.js [data-reveal="right"] { translate: 50px 0; }
.js [data-reveal="zoom"] { scale: .9; }
.js [data-reveal].is-in { opacity: 1; translate: 0 0; scale: 1; }

/* Line icons that draw themselves in. Icons are <use> sprites, so the dash props are set on the
   outer <svg> and inherited into the shadow tree (paths carry pathLength="1"). */
.fd-draw { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .fd-draw { stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease) calc(var(--d, 0s) + .25s); }
.js .is-in .fd-draw, .js .fd-draw.is-in { stroke-dashoffset: 0; }

@keyframes fd-spin { to { transform: rotate(360deg); } }

/* ---------- Responsive header ---------- */
@media (max-width: 1080px) {
	.fd-topbar__label, .fd-topbar__lang { display: none; }
	.fd-nav { display: none; }
	.fd-header__in { grid-template-columns: auto 1fr auto; min-height: 70px; }
	.fd-badge, .fd-header.is-stuck .fd-badge { width: 96px; height: 96px; margin: 0 0 -30px; }
	.fd-burger { grid-column: 3; display: grid; gap: 5px; width: 48px; height: 48px; place-content: center; border: 0; background: var(--pink-100); border-radius: 14px; cursor: pointer; }
	.fd-burger span { width: 22px; height: 2px; background: var(--teal-900); border-radius: 2px; transition: transform .35s var(--ease), opacity .2s; }
	.fd-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.fd-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
	.fd-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
	.fd-mobile { display: block; background: var(--white); padding: 40px var(--gutter) 28px; max-height: calc(100vh - 70px); overflow: auto; border-top: 1px solid var(--sand); }
	.fd-mobile[hidden] { display: none; }
	.fd-mobile > ul { list-style: none; margin: 0 0 20px; padding: 0; }
	.fd-mobile .fd-nav__item { border-bottom: 1px solid var(--sand); }
	.fd-mobile .fd-nav__top { padding: 14px 0; font-size: 1.05rem; }
	.fd-mobile .fd-nav__top::after, .fd-mobile .fd-caret { display: none; }
	.fd-mobile .fd-nav__drop { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0 0 10px !important; min-width: 0; list-style: none; }
	.fd-mobile .fd-nav__drop a { padding: 7px 12px; color: var(--muted); }
	.fd-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
	body { font-size: 16px; }
	.fd-topbar__phones { gap: 14px; font-size: .8rem; }
	.fd-topbar__right { display: none; }
	.fd-footer__grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.js [data-reveal] { opacity: 1; translate: none; scale: none; }
}
