/* ==========================================================================
   Online Physics Tutor – theme styles (colours live in theme.json)
   ========================================================================== */
:root {
	--opt-indigo: var(--wp--preset--color--indigo, #1C2A5E);
	--opt-indigo-2: var(--wp--preset--color--indigo-light, #2D44A0);
	--opt-lav: var(--wp--preset--color--lavender, #EEF1FD);
	--opt-amber: var(--wp--preset--color--amber, #FFB01F);
	--opt-amber-dk: var(--wp--preset--color--amber-dark, #B86E00);
	--opt-cream: var(--wp--preset--color--cream, #FBF7EF);
	--opt-green: var(--wp--preset--color--green, #1F8A5B);
	--opt-ink: var(--wp--preset--color--ink, #141A33);
	--opt-muted: var(--wp--preset--color--muted, #555E7B);
	--opt-line: var(--wp--preset--color--line, #E2E5EF);
	--opt-on-dark: #C8D0F0;
	--opt-radius: 18px;
	--opt-shadow: 0 18px 40px rgba(28, 42, 94, .12);
	--opt-section: clamp(60px, 8vw, 96px);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; }
[id] { scroll-margin-top: 90px; }
.wp-site-blocks > * { margin-block-start: 0; }

/* Helpers ---------------------------------------------------------------- */
.opt-eyebrow {
	font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
	color: var(--opt-amber-dk); margin: 0 0 .6rem;
}
.opt-sec-title { margin: 0 0 1rem; }
.opt-sec-intro { color: var(--opt-muted); font-size: 1.1rem; max-width: 46em; margin-top: 0 !important; margin-bottom: 2.2rem !important; }

.wp-element-button, .wp-block-button__link { transition: background-color .15s, color .15s, border-color .15s, transform .15s; }
.wp-block-button__link:hover { transform: translateY(-1px); }
.wp-block-button.is-style-indigo .wp-block-button__link { background: var(--opt-indigo); color: #fff; }
.wp-block-button.is-style-ghost-light .wp-block-button__link { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.45); }
.wp-block-button.is-style-ghost-light .wp-block-button__link:hover { background: rgba(255,255,255,.1); border-color: #fff; }

.opt-ticks { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 10px; }
.opt-ticks li { padding-left: 32px; position: relative; }
.opt-ticks li::before {
	content: ""; position: absolute; left: 0; top: 3px; width: 21px; height: 21px; border-radius: 50%;
	background: var(--opt-green) 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.5'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.opt-ticks--2col { grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .opt-ticks--2col { grid-template-columns: 1fr; } }

/* Header ------------------------------------------------------------------ */
.opt-site-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .opt-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .opt-site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .opt-site-header { top: 0; } }
.opt-header { background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--opt-line); }
.opt-header__inner { min-height: 76px; gap: 20px; }
.opt-header__inner > *, .opt-header__right > * { margin: 0 !important; }
.opt-header__right { gap: 22px; }
.opt-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--opt-indigo); }
.opt-logo__mark { flex-shrink: 0; display: block; }
.opt-logo__text { font-weight: 800; font-size: 1.12rem; line-height: 1.05; letter-spacing: -.01em; }
.opt-logo__sub { display: block; font-size: .78rem; font-weight: 600; color: var(--opt-muted); letter-spacing: 0; margin-top: 3px; }
.opt-nav { gap: 26px; font-weight: 600; font-size: .96rem; }
.opt-nav .wp-block-navigation-item__content { color: var(--opt-ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.opt-nav .wp-block-navigation-item__content:hover { border-bottom-color: var(--opt-amber); color: var(--opt-ink); }
.opt-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 24px; }
.opt-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 48px; gap: 8px; }
.opt-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.3rem; font-weight: 700; }
.opt-header__cta .wp-block-button__link { padding: .7em 1.2em; white-space: nowrap; }
@media (min-width: 601px) and (max-width: 1000px) {
	.opt-nav { gap: 16px; font-size: .9rem; }
	.opt-logo__sub { display: none; }
	.opt-header .opt-header__cta { display: none !important; }
}
@media (max-width: 600px) {
	.opt-header__inner { min-height: 66px; }
	.opt-logo__text { font-size: 1rem; }
	.opt-logo__mark { width: 40px; height: 40px; }
	.opt-header__right { gap: 10px; }
	.opt-header__cta .wp-block-button__link { padding: .55em .9em; font-size: .88rem; }
}
@media (max-width: 380px) { .opt-logo__sub { display: none; } }

/* Hero -------------------------------------------------------------------- */
.opt-hero {
	background-color: var(--opt-indigo);
	background-image:
		radial-gradient(circle at 85% 20%, rgba(45,68,160,.9), transparent 45%),
		radial-gradient(rgba(255,255,255,.08) 1.2px, transparent 1.4px);
	background-size: auto, 26px 26px;
	color: #fff; padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(64px, 8vw, 110px);
	position: relative; overflow: hidden;
}
.opt-hero__cols { gap: 48px; margin: 0; }
.opt-hero .opt-eyebrow { color: var(--opt-amber); }
.opt-hero__title { color: #fff; margin: 0 0 .5em; }
.opt-hero__title mark { background: none; color: var(--opt-amber); }
.opt-hero__lead { color: var(--opt-on-dark); font-size: 1.15rem; max-width: 34em; margin: 0 0 1.8rem; }
.opt-hero__btns { gap: 12px; margin-bottom: 2rem; }
.opt-creds { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.opt-creds li {
	background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 999px;
	padding: .4em .95em .4em 2.1em; font-size: .88rem; font-weight: 600; position: relative; color: #fff;
}
.opt-creds li::before { content: "✓"; position: absolute; left: .85em; color: var(--opt-amber); font-weight: 800; }
.opt-hero__art { position: relative; }
.opt-hero__img { margin: 0; }
.opt-hero__img img { width: 100%; border-radius: 22px; box-shadow: 0 30px 60px rgba(0,0,0,.35); background: #fff; }
.opt-hero__badge {
	position: absolute; left: -18px; bottom: -22px; margin: 0;
	background: var(--opt-amber); color: var(--opt-ink); font-weight: 600; border-radius: 16px;
	padding: 14px 18px; box-shadow: 0 14px 30px rgba(0,0,0,.25); font-size: .92rem; max-width: 220px; line-height: 1.3;
}
.opt-hero__badge strong { display: block; font-size: 1.6rem; font-weight: 800; }
@media (max-width: 781px) {
	.opt-hero__art { margin-top: 16px; }
	.opt-hero__badge { left: 12px; bottom: -18px; }
}

/* Stats ------------------------------------------------------------------- */
.opt-stats-wrap { margin-top: -1px; padding-top: 0; }
.opt-stats {
	background: #fff; border-radius: var(--opt-radius); box-shadow: var(--opt-shadow); margin-top: -40px !important;
	position: relative; z-index: 2; padding: 28px 12px; gap: 0 !important;
}
.opt-stat { text-align: center; padding: 6px 16px; }
.opt-stat + .opt-stat { border-left: 1px solid var(--opt-line); }
.opt-stat__num { font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 800; color: var(--opt-indigo-2); margin: 0; line-height: 1.1; }
.opt-stat__label { color: var(--opt-muted); font-size: .92rem; margin: 6px 0 0; line-height: 1.35; }
@media (max-width: 781px) {
	.opt-stats { display: grid !important; grid-template-columns: 1fr 1fr; row-gap: 18px !important; }
	.opt-stat + .opt-stat { border-left: 0; }
	.opt-stat:nth-child(even) { border-left: 1px solid var(--opt-line); }
}

/* Sections ---------------------------------------------------------------- */
.opt-section { padding-top: var(--opt-section); padding-bottom: var(--opt-section); }
.opt-band-lavender { background: var(--opt-lav); }
.opt-band-cream { background: var(--opt-cream); }
.opt-band-indigo { background: var(--opt-indigo); color: #fff; }
.opt-band-indigo h2, .opt-band-indigo h3 { color: #fff; }
.opt-band-indigo .opt-eyebrow { color: var(--opt-amber); }
.opt-band-indigo p { color: var(--opt-on-dark); }

.opt-grid { display: grid; gap: 22px; }
.opt-grid > * { margin: 0 !important; }
.opt-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opt-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .opt-grid--3, .opt-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .opt-grid--3, .opt-grid--4 { grid-template-columns: 1fr; } }
.opt-why .opt-sec-title, #why .opt-sec-title { margin-bottom: 2.2rem; }

.opt-feature { border: 1px solid var(--opt-line); border-radius: var(--opt-radius); padding: 26px; background: #fff; transition: box-shadow .15s, transform .15s; }
.opt-feature:hover { box-shadow: var(--opt-shadow); transform: translateY(-2px); }
.opt-feature > * { margin: 0 !important; }
.opt-feature__icon { width: 48px; height: 48px; border-radius: 14px; background: var(--opt-lav); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 16px !important; }
.opt-feature h3 { font-size: 1.15rem; margin-bottom: .4em !important; }
.opt-feature p:not(.opt-feature__icon) { color: var(--opt-muted); font-size: .97rem; }

/* Levels */
.opt-levels { gap: 24px; }
.opt-level { background: #fff; border-radius: var(--opt-radius); padding: 32px; box-shadow: 0 6px 20px rgba(28,42,94,.06); border-top: 6px solid var(--opt-indigo-2); }
.opt-level--alevel { border-top-color: var(--opt-amber); }
.opt-level > * { margin-top: 0; }
.opt-level h3 { font-size: 1.5rem; margin-bottom: .3em; }
.opt-level p { color: var(--opt-muted); }
.opt-level .opt-ticks { color: var(--opt-ink); }
.opt-level__tag { display: inline-block; background: var(--opt-lav); color: var(--opt-indigo-2) !important; font-weight: 700; font-size: .8rem; padding: .25em .8em; border-radius: 999px; margin-bottom: 12px; }
.opt-boards { margin-top: 28px !important; text-align: center; color: var(--opt-muted); }
.opt-boards strong { color: var(--opt-ink); }

/* Steps */
.opt-steps { counter-reset: s; }
.opt-step { position: relative; padding: 26px; border-radius: var(--opt-radius); background: var(--opt-cream); }
.opt-step > * { margin: 0 !important; }
.opt-step__num {
	width: 44px; height: 44px; border-radius: 50%; background: var(--opt-indigo); color: #fff; font-weight: 800;
	display: grid; place-items: center; margin-bottom: 16px !important; font-size: 1.1rem;
}
.opt-step h3 { font-size: 1.12rem; margin-bottom: .35em !important; }
.opt-step p:not(.opt-step__num) { color: var(--opt-muted); font-size: .96rem; }

/* Fees */
.opt-fees { gap: 56px; }
.opt-fees__pay a { color: var(--opt-amber); font-weight: 700; }
.opt-price-card { background: #fff; color: var(--opt-ink); border-radius: 22px; padding: 34px; box-shadow: 0 30px 60px rgba(0,0,0,.3); }
.opt-price-card > * { margin-top: 0; }
.opt-band-indigo .opt-price-card p { color: var(--opt-muted); }
.opt-price-card__label { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: 4px; }
.opt-band-indigo .opt-price-card .opt-price-card__price { font-size: 3.4rem; font-weight: 800; color: var(--opt-indigo); line-height: 1; margin: 0 0 18px; }
.opt-price-card__price span { font-size: 1rem; font-weight: 600; color: var(--opt-muted); }
.opt-price-card .opt-ticks { color: var(--opt-ink); margin-bottom: 24px; }

/* About */
.opt-about { gap: 56px; }
.opt-portrait { margin: 0; position: relative; }
.opt-portrait img { width: 100%; aspect-ratio: 15 / 17; object-fit: cover; border-radius: 26px; display: block; box-shadow: var(--opt-shadow); }
.opt-about__photo { position: relative; }
.opt-about__photo::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 26px; background: var(--opt-amber); z-index: -1; }
.opt-about p { color: var(--opt-muted); }
.opt-about .opt-ticks { color: var(--opt-ink); font-weight: 600; margin: 1.4rem 0; }
.opt-linkedin a { font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 781px) { .opt-about__photo { max-width: 400px; margin: 0 auto 28px; width: calc(100% - 14px); } .opt-about__photo::before { inset: 14px -12px -12px 14px; } }

/* FAQs */
.opt-faq { background: #fff; border: 1px solid var(--opt-line); border-radius: 14px; padding: 0; margin-top: 0 !important; margin-bottom: 12px !important; }
.opt-faq summary { cursor: pointer; padding: 20px 56px 20px 24px; font-weight: 700; font-size: 1.05rem; list-style: none; position: relative; color: var(--opt-indigo); }
.opt-faq summary::-webkit-details-marker { display: none; }
.opt-faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--opt-lav); display: grid; place-items: center; font-size: 1.2rem; line-height: 1; }
.opt-faq[open] summary::after { content: "–"; background: var(--opt-amber); }
.opt-faq > :not(summary) { padding: 0 24px 4px; margin: 0 0 18px; color: var(--opt-muted); }

/* Enquiry --------------------------------------------------------------- */
.opt-enquire { gap: 48px; }
.opt-enquire__intro p { color: var(--opt-muted); }
.opt-enquire__form { background: #fff; border: 1px solid var(--opt-line); border-radius: 22px; padding: clamp(22px, 4vw, 36px); box-shadow: var(--opt-shadow); }
.opt-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.opt-form * { box-sizing: border-box; }
.opt-field { margin: 0; grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.opt-field--half { grid-column: auto; }
.opt-field label { font-weight: 700; font-size: .9rem; color: var(--opt-ink); }
.opt-field label span[aria-hidden] { color: #C0392B; }
.opt-field input[type=text], .opt-field input[type=email], .opt-field input[type=tel], .opt-field select, .opt-field textarea {
	font: inherit; font-size: 1rem; width: 100%; padding: .75em .9em; border: 1.5px solid var(--opt-line); border-radius: 10px;
	background: #FBFCFF; color: var(--opt-ink); transition: border-color .15s, box-shadow .15s;
}
.opt-field textarea { resize: vertical; min-height: 110px; }
.opt-field input:focus, .opt-field select:focus, .opt-field textarea:focus { outline: none; border-color: var(--opt-indigo-2); box-shadow: 0 0 0 3px rgba(45,68,160,.15); background: #fff; }
.opt-consent label { font-weight: 500; font-size: .87rem; color: var(--opt-muted); display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.opt-consent input { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; accent-color: var(--opt-indigo-2); }
.opt-submit { border: 0; cursor: pointer; width: 100%; font-size: 1.05rem; padding: 1em; border-radius: 12px; background: var(--opt-amber); color: var(--opt-ink); font-weight: 800; }
.opt-submit:hover { background: #FFC24D; }
.opt-hp { position: absolute !important; left: -9999px; height: 1px; width: 1px; overflow: hidden; }
.opt-form-error { background: #FDECEA; color: #8E1F14; border-radius: 10px; padding: 12px 16px; font-weight: 600; margin: 0 0 16px; }
.opt-form-done { text-align: center; padding: 30px 10px; }
.opt-form-done__icon { width: 64px; height: 64px; border-radius: 50%; background: var(--opt-green); color: #fff; font-size: 2rem; display: grid; place-items: center; margin: 0 auto 16px; font-weight: 800; }
.opt-form-done h3 { margin: 0 0 .4em; }
.opt-form-done p { color: var(--opt-muted); margin: 0; }
@media (max-width: 600px) { .opt-form { grid-template-columns: 1fr; } .opt-field--half { grid-column: 1 / -1; } }

/* Pay for lessons -------------------------------------------------------- */
.opt-pay { background: #fff; border: 1px solid var(--opt-line); border-radius: 22px; padding: clamp(22px, 4vw, 34px); box-shadow: var(--opt-shadow); max-width: 480px; display: flex; flex-direction: column; gap: 12px; }
.opt-pay * { box-sizing: border-box; }
.opt-pay p { margin: 0; }
.opt-pay__head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--opt-line); padding-bottom: 16px; margin-bottom: 4px; }
.opt-pay__label { font-weight: 700; color: var(--opt-muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
.opt-pay__price { font-size: 2.6rem; font-weight: 800; color: var(--opt-indigo); line-height: 1.1; }
.opt-pay__price span { font-size: 1rem; color: var(--opt-muted); font-weight: 600; }
.opt-pay__lock { font-size: 1.4rem; }
.opt-pay__qty { font-weight: 700; font-size: .92rem; }
.opt-pay select { font: inherit; padding: .75em .9em; border: 1.5px solid var(--opt-line); border-radius: 10px; width: 100%; background: #FBFCFF; }
.opt-pay__total { font-size: 1.15rem; display: flex; justify-content: space-between; background: var(--opt-lav); border-radius: 10px; padding: 12px 16px; }
.opt-pay__total strong { color: var(--opt-indigo); }
.opt-pay__note { font-size: .85rem; color: var(--opt-muted); text-align: center; }
.opt-pay--off h3 { margin: 0 0 .3em; }
.opt-admin-note { margin-top: 12px; background: #FFF4DD; border-radius: 10px; padding: 10px 14px; font-size: .88rem; }

/* Inner pages -------------------------------------------------------------- */
.opt-page-head { background: var(--opt-indigo); color: #fff; padding-top: clamp(40px, 6vw, 64px); padding-bottom: clamp(40px, 6vw, 64px); }
.opt-page-head h1, .opt-page-head .wp-block-post-title, .opt-page-head .wp-block-query-title { color: #fff; margin: 0; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.opt-page-head p, .opt-page-head .wp-block-post-date { color: var(--opt-on-dark); margin-top: .6em !important; }
.opt-main { padding-top: clamp(36px, 6vw, 64px); padding-bottom: var(--opt-section); }
.opt-home { padding: 0; }
.opt-article .wp-block-post-content > * + * { margin-block-start: 1.1em; }
.opt-article h2 { margin-top: 1.6em; }
.opt-posts { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; list-style: none; padding: 0; }
@media (max-width: 900px) { .opt-posts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .opt-posts { grid-template-columns: 1fr; } }
.opt-post-card { border: 1px solid var(--opt-line); border-radius: var(--opt-radius); overflow: hidden; padding-bottom: 20px; }
.opt-post-card > :not(.wp-block-post-featured-image) { margin-left: 20px !important; margin-right: 20px !important; }
.opt-post-card .wp-block-post-featured-image { margin: 0 0 16px; }
.opt-post-card .wp-block-post-title a { text-decoration: none; color: var(--opt-indigo); }
.opt-post-card .wp-block-post-date { color: var(--opt-muted); font-size: .85rem; }

/* Footer ------------------------------------------------------------------ */
.opt-footer { background: var(--opt-ink); color: #B9C0DA; padding-top: 60px; padding-bottom: 26px; font-size: .94rem; }
.opt-footer__cols { gap: 36px; }
.opt-footer h4 { color: #fff; font-size: 1rem; margin: 0 0 14px; }
.opt-footer ul.wp-block-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.opt-footer a { color: #B9C0DA; text-decoration: none; }
.opt-footer a:hover { color: #fff; text-decoration: underline; }
.opt-footer__brand { color: #fff; font-weight: 800; font-size: 1.2rem; margin: 0 0 8px; }
.opt-social { margin-top: 14px; }
.opt-social .wp-social-link { background: rgba(255,255,255,.1) !important; color: #fff !important; }
.opt-social .wp-social-link:hover { background: var(--opt-indigo-2) !important; }
.opt-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; font-size: .85rem; gap: 12px; }
.opt-footer__bottom p { margin: 0; }

/* WooCommerce checkout touches -------------------------------------------- */
.wc-block-components-button:not(.is-link), .woocommerce a.button, .woocommerce button.button {
	background: var(--opt-amber) !important; color: var(--opt-ink) !important; border-radius: 12px !important; font-weight: 700 !important;
}

/* Editor ------------------------------------------------------------------ */
.editor-styles-wrapper .opt-site-header { position: relative; top: 0; }
