/* way2digitize theme – supplementary styles. Colours come from theme.json presets. */

:root { --w2d-cell: 28px; }

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(a, button, input, summary):focus-visible { outline: 3px solid var(--wp--preset--color--highlight); outline-offset: 2px; }

/* Header */
.w2d-header { background: var(--wp--preset--color--white); border-bottom: 1px solid var(--wp--preset--color--line); position: sticky; top: 0; z-index: 20; }
.admin-bar .w2d-header { top: var(--wp-admin--admin-bar--height, 0px); }
.w2d-logo { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: var(--wp--preset--font-size--large); letter-spacing: -0.01em; margin: 0; }
.w2d-logo a { text-decoration: none; color: var(--wp--preset--color--ink); }

/* Footer */
.w2d-footer { background: var(--wp--preset--color--white); border-top: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--muted); }
.w2d-footer a { color: var(--wp--preset--color--ink); }
.w2d-footer .w2d-footer-links a { text-decoration: none; }
.w2d-footer .w2d-footer-links a:hover { text-decoration: underline; }

/* Block style: Group › Grid paper */
.is-style-grid-paper {
	background-color: var(--wp--preset--color--paper);
	background-image:
		linear-gradient(var(--wp--preset--color--grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--wp--preset--color--grid) 1px, transparent 1px);
	background-size: var(--w2d-cell) var(--w2d-cell);
	background-position: -1px -1px;
}

/* Block style: Heading › Selected cell (the brand signature) */
.wp-block-heading.is-style-cell {
	display: block;
	width: fit-content;
	max-width: 100%;
	background: var(--wp--preset--color--white);
	box-shadow: 0 0 0 3px var(--wp--preset--color--green);
	padding: 0.06em 0.22em 0.1em;
	position: relative;
	margin-left: 3px;
}
.wp-block-heading.is-style-cell::after {
	content: "";
	position: absolute;
	right: -8px;
	bottom: -8px;
	width: 11px;
	height: 11px;
	background: var(--wp--preset--color--green);
	border: 2px solid var(--wp--preset--color--white);
}

/* Block style: Group › Card */
.is-style-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
	padding: var(--wp--preset--spacing--30);
}

/* Block style: Group › Callout (green frame) */
.is-style-callout {
	background: var(--wp--preset--color--white);
	border: 2px solid var(--wp--preset--color--green);
	border-radius: 6px;
	padding: var(--wp--preset--spacing--30);
}

/* Block style: Group › Note (highlighter bar) */
.is-style-note {
	background: var(--wp--preset--color--white);
	border-left: 4px solid var(--wp--preset--color--highlight);
	padding: 0.9rem 1.1rem;
}

/* Joined cells: columns that share borders, like spreadsheet cells */
.w2d-cells { gap: 0 !important; border: 1px solid var(--wp--preset--color--line); border-radius: 6px; overflow: hidden; background: var(--wp--preset--color--white); }
.w2d-cells > .wp-block-column { padding: var(--wp--preset--spacing--30); border-right: 1px solid var(--wp--preset--color--line); }
.w2d-cells > .wp-block-column:last-child { border-right: 0; }
@media (max-width: 781px) {
	.w2d-cells > .wp-block-column { border-right: 0; border-bottom: 1px solid var(--wp--preset--color--line); }
	.w2d-cells > .wp-block-column:last-child { border-bottom: 0; }
}

/* Small helpers */
.w2d-muted { color: var(--wp--preset--color--muted); }
.w2d-label { font-size: var(--wp--preset--font-size--small); font-weight: 600; color: var(--wp--preset--color--green); }
.w2d-price { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: var(--wp--preset--font-size--xx-large); color: var(--wp--preset--color--ink); line-height: 1; }
.w2d-sticky { position: sticky; top: 6rem; }
.w2d-video-placeholder { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--wp--preset--color--grid); border: 1px solid var(--wp--preset--color--line); border-radius: 6px; color: var(--wp--preset--color--muted); }

/* Post list rows */
.w2d-post-list .wp-block-post { border-top: 1px solid var(--wp--preset--color--line); padding-top: 1.1rem; }
.w2d-post-list .wp-block-post:first-child { border-top: 0; padding-top: 0; }

/* Signup form fallback (until a newsletter embed replaces it) */
.w2d-form { display: flex; gap: 10px; flex-wrap: wrap; }
.w2d-form input[type="email"] { flex: 1 1 240px; font: inherit; padding: 0.7rem 0.9rem; border: 1px solid var(--wp--preset--color--line); border-radius: 7px; background: var(--wp--preset--color--paper); color: var(--wp--preset--color--text); }
.w2d-form button { font: inherit; font-weight: 600; padding: 0.7rem 1.2rem; border-radius: 7px; border: 1px solid var(--wp--preset--color--ink); background: var(--wp--preset--color--ink); color: var(--wp--preset--color--white); cursor: pointer; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Details (FAQ) */
.wp-block-details { border-top: 1px solid var(--wp--preset--color--line); padding: 0.9rem 0; }
.wp-block-details summary { font-weight: 600; color: var(--wp--preset--color--ink); cursor: pointer; }

/* Tables look like sheets */
.wp-block-table table { border-collapse: collapse; background: var(--wp--preset--color--white); }
.wp-block-table th { background: var(--wp--preset--color--grid); color: var(--wp--preset--color--text); font-weight: 600; }
.wp-block-table td, .wp-block-table th { border: 1px solid var(--wp--preset--color--line); padding: 0.45rem 0.6rem; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Hero details */
.wp-block-heading.is-style-cell.has-display-font-size { max-width: 15ch; }
.w2d-lead { max-width: 56ch; background: var(--wp--preset--color--paper); }
.wp-block-button.is-style-outline > .wp-block-button__link { background: var(--wp--preset--color--white); color: var(--wp--preset--color--ink); border-color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--green-soft); }

/* Selected-cell headings sitting directly in a constrained container: align to the content column, not the centre */
.is-layout-constrained > .wp-block-heading.is-style-cell {
	margin-left: max(3px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
	margin-right: auto !important;
}
.wp-block-heading.is-style-cell + * { margin-block-start: 1.75rem; }
