/*
Theme Name: Palpitation Clinic
Description: Clean, fast theme for Palpitation Clinic.
Version: 1.0.0
Author: Palpitation Clinic
Text Domain: palpitation-clinic
*/

:root {
	--navy: #0c2340;
	--navy-2: #163659;
	--ink: #1d2733;
	--muted: #5a6776;
	--line: #e3e8ee;
	--bg: #ffffff;
	--bg-soft: #f5f7fa;
	--teal: #0f7c75;
	--teal-dark: #0b625d;
	--red: #c8102e;
	--radius: 10px;
	--wrap: 1140px;
	--shadow: 0 1px 2px rgba(12, 35, 64, .06), 0 6px 24px rgba(12, 35, 64, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 17px;
	line-height: 1.65;
	color: var(--ink);
	background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: var(--teal-dark); }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin-top: 1.6em; }
h3 { font-size: 1.2rem; margin-top: 1.4em; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .35em; }
strong { color: var(--navy); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 100; }

/* Top bar */
.topbar { background: var(--navy); color: #d6e0ea; font-size: 14px; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: #fff; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.hdr { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand img { width: 60px; height: 60px; }
.brand span { font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.brand small { display: block; font-weight: 500; font-size: .78rem; color: var(--muted); letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav > a, .nav .dd > button { color: var(--ink); text-decoration: none; font-size: 15.5px; font-weight: 500; padding: 10px 12px; border-radius: 8px; background: none; border: 0; font-family: inherit; cursor: pointer; }
.nav > a:hover, .nav .dd > button:hover, .nav > a[aria-current="page"] { background: var(--bg-soft); color: var(--navy); }
.dd { position: relative; }
.dd > button::after { content: ""; display: inline-block; margin-left: 6px; border: 5px solid transparent; border-top-color: currentColor; transform: translateY(3px); }
.dd-menu { position: absolute; top: 100%; left: 0; min-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; display: none; }
.dd:hover .dd-menu, .dd:focus-within .dd-menu, .dd.open .dd-menu { display: block; }
.dd-menu a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 15px; }
.dd-menu a:hover { background: var(--bg-soft); color: var(--navy); }
.dd-menu .sep { border-top: 1px solid var(--line); margin: 6px 4px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font: inherit; color: var(--navy); cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 8px; font-weight: 600; font-size: 16px; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit; line-height: 1.2; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-outline { border-color: var(--teal); color: var(--teal); background: #fff; }
.btn-outline:hover { background: var(--teal); color: #fff; }
.nav .btn { margin-left: 8px; padding: 10px 16px; font-size: 15px; }
.nav > a.btn-primary { background: var(--teal); color: #fff; }
.nav > a.btn-primary:hover { background: var(--teal-dark); color: #fff; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #e9eff5; }
.hero .wrap { padding-top: 72px; padding-bottom: 72px; display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; }
.hero .lead { font-size: 1.18rem; color: #d3dde8; max-width: 38em; }
.hero .btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--teal); margin-bottom: 10px; }
.hero .eyebrow { color: #7fd1c7; }
.hero-card { background: #fff; color: var(--ink); border-radius: 14px; padding: 26px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.hero-card h2 { font-size: 1.15rem; margin: 0 0 12px; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/12px no-repeat; }

/* Page header */
.page-head { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-top: 44px; padding-bottom: 36px; }
.page-head .lead { font-size: 1.12rem; color: var(--muted); max-width: 46em; margin: 0; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }

/* Sections */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-soft); }
.sec-head { max-width: 760px; margin-bottom: 32px; }
.sec-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.sec-head h2 { margin-top: 0; }
.sec-head p { color: var(--muted); font-size: 1.08rem; }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.more { font-weight: 600; text-decoration: none; }
.more::after { content: " \2192"; }
a.card { display: block; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
a.card:hover { border-color: #b8c7d6; box-shadow: var(--shadow); }
a.card h3 { color: var(--navy); }
.icon { width: 44px; height: 44px; border-radius: 10px; background: #e6f3f2; color: var(--teal); display: grid; place-items: center; margin-bottom: 14px; }
.icon svg { width: 24px; height: 24px; }

.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 56px; margin-bottom: 22px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: grid; place-items: center; }
.steps strong { display: block; font-size: 1.08rem; }

/* Content layout */
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; padding: 48px 20px 64px; }
.prose { max-width: 720px; }
.prose h2:first-child { margin-top: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--bg-soft); color: var(--navy); }
.aside .card { position: sticky; top: 100px; margin-bottom: 20px; }
.aside h3 { font-size: 1.05rem; }
.aside ul { list-style: none; padding: 0; margin: 0; }
.aside li { margin: 0; }
.aside li a { display: block; padding: 7px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 15.5px; }
.aside li a:hover, .aside li a[aria-current="page"] { color: var(--teal); }
.aside .btn { width: 100%; justify-content: center; margin-top: 6px; }

.callout { border-left: 4px solid var(--teal); background: #eef7f6; padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.4em 0; }
.callout.warn { border-left-color: var(--red); background: #fdf1f2; }
.callout p:last-child { margin-bottom: 0; }
.reviewed { margin-top: 2.4em; padding-top: 1em; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }

/* FAQ */
details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 12px; }
summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--navy); list-style: none; position: relative; padding-right: 48px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 20px; top: 12px; font-size: 22px; color: var(--teal); }
details[open] summary::after { content: "\2212"; }
details > div { padding: 0 20px 16px; }

/* Forms */
.form { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label, .field legend { display: block; font-weight: 600; color: var(--navy); margin-bottom: 6px; font-size: 15.5px; }
.hint { font-size: 14px; color: var(--muted); margin: -2px 0 8px; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea {
	width: 100%; padding: 12px 14px; border: 1px solid #c7d1dc; border-radius: 8px; font: inherit; font-size: 16px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(15,124,117,.25); border-color: var(--teal); }
.field fieldset { border: 0; padding: 0; margin: 0; }
.radio, .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; color: var(--ink) !important; margin-bottom: 8px; }
.radio input, .check input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute !important; left: -9999px !important; }
.notice { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; }
.notice.ok { background: #e7f5ee; border: 1px solid #a9d9bf; color: #154d31; }
.notice.err { background: #fdf1f2; border: 1px solid #f0b7bf; color: #7a1020; }

/* CTA band */
.cta-band { background: var(--teal); color: #fff; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 40px; padding-bottom: 40px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 4px; }
.cta-band p { margin: 0; color: #e0f2f0; }
.cta-band .btn { background: #fff; color: var(--teal-dark); }
.cta-band .btn:hover { background: #eaf6f5; }

/* Footer */
.site-footer { background: var(--navy); color: #c3cfdc; font-size: 15px; }
.site-footer .wrap { padding-top: 52px; padding-bottom: 28px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: #fff; font-size: 1rem; margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #e3eaf2; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; font-size: 13.5px; color: #9fb0c2; }
.legal p { margin: 0 0 6px; }

/* Responsive */
@media (max-width: 1020px) {
	.hero .wrap { grid-template-columns: 1fr; padding-top: 52px; padding-bottom: 52px; }
	.content-grid { grid-template-columns: 1fr; }
	.aside .card { position: static; }
	.grid-4 { grid-template-columns: repeat(2, 1fr); }
	.foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
	.menu-toggle { display: inline-block; }
	.nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px 16px 18px; box-shadow: var(--shadow); }
	.nav.open { display: flex; }
	.dd-menu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 12px; }
	.dd > button { width: 100%; text-align: left; }
	.dd > button::after { display: none; }
	.nav .btn { margin: 10px 0 0; justify-content: center; }
	.site-header .wrap { position: relative; }
}
@media (max-width: 720px) {
	body { font-size: 16.5px; }
	.grid-3, .grid-2, .grid-4, .row-2 { grid-template-columns: 1fr; }
	.section { padding: 48px 0; }
	.topbar .hide-sm { display: none; }
	.foot-grid { grid-template-columns: 1fr; }
	.brand small { display: none; }
}
@media print {
	.topbar, .site-header, .site-footer, .aside, .cta-band { display: none; }
}
