/*
 * The Total Office Shop – information pages
 * (About, Contact, Return Policy, Terms and Conditions).
 * Loaded only on those pages while the new design is on (or previewed).
 * Shared header/footer/buttons come from tto-home.css.
 */

.tto-pages {
	--pg-ink: #222;
	--pg-title: #333;
	--pg-muted: #444;
	--pg-soft: #9a9a9a;
	--pg-field: #e4e5e8;
	--pg-line: #e6e6e6;
	--pg-black: #000;
	--pg-gutter: clamp(20px, 4.9vw, 70px);
}

/* ---------- Page frame ---------- */

.tto-pages .tto-page {
	box-sizing: border-box;
	max-width: calc(1250px + 2 * var(--pg-gutter));
	margin: 0 auto;
	padding: 28px var(--pg-gutter) clamp(72px, 9vw, 120px);
	font-family: "TTO Montserrat", Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 17px;
	line-height: 1.55;
	color: var(--pg-ink);
}

/* Guard against WoodMart/Elementor fonts. Spans are left out on purpose
   (the Dirham symbol may use its own font). */
.tto-pages .tto-page :is(h1, h2, h3, h4, h5, p, a, li, label, input, select, textarea, button, strong, em, address, td, th) {
	font-family: "TTO Montserrat", Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif !important;
	letter-spacing: normal;
}

.tto-pages .tto-page h1.tto-page__title {
	margin: 0 0 56px;
	padding: 0;
	font-size: clamp(30px, 3vw, 40px);
	font-weight: 600;
	line-height: 1.15;
	text-align: center;
	text-transform: none;
	color: var(--pg-title);
}

.tto-pages .tto-page__intro {
	margin: 0 0 clamp(48px, 6vw, 76px);
	text-align: center;
}

.tto-pages .tto-page__intro h1.tto-page__title {
	margin-bottom: 18px;
}

.tto-pages .tto-page p.tto-page__tagline {
	margin: 0;
	font-size: 18px;
	color: var(--pg-ink);
}

.tto-pages .tto-page a:focus-visible {
	outline: 2px solid var(--pg-black);
	outline-offset: 2px;
}

/* ---------- Text pages (Return Policy, Terms) ---------- */

.tto-pages .tto-prose {
	max-width: 1250px;
	margin: 0 auto;
	font-size: 17px;
	line-height: 1.6;
	color: var(--pg-ink);
}

.tto-pages .tto-prose :is(h2, h3, h4) {
	margin: 40px 0 10px;
	padding: 0;
	font-size: 22px;
	font-weight: 500;
	line-height: 1.3;
	text-transform: none;
	color: var(--pg-ink);
}

.tto-pages .tto-prose > :first-child {
	margin-top: 0;
}

.tto-pages .tto-prose p {
	margin: 0 0 18px;
}

.tto-pages .tto-prose :is(ul, ol) {
	margin: 0 0 18px;
	padding-left: 1.3em;
}

.tto-pages .tto-prose li {
	margin: 0 0 4px;
	padding: 0;
}

.tto-pages .tto-prose ul li {
	list-style: disc;
}

.tto-pages .tto-prose ol li {
	list-style: decimal;
}

.tto-pages .tto-prose li::before {
	content: none;
}

.tto-pages .tto-prose a {
	color: var(--pg-black);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.tto-pages .tto-prose strong {
	font-weight: 600;
}

/* ---------- About ---------- */

.tto-pages .tto-about__feature {
	display: grid;
	grid-template-columns: minmax(0, 630fr) minmax(0, 410fr);
	align-items: center;
	gap: clamp(32px, 5vw, 65px);
	max-width: 1180px;
	margin: 0 auto;
}

.tto-pages .tto-about__media {
	overflow: hidden;
	border-radius: 16px;
	background: #f3f2f0;
}

.tto-pages .tto-about__media img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	margin: 0;
}

.tto-pages .tto-about__text h2,
.tto-pages .tto-about__col h2 {
	margin: 0 0 22px;
	padding: 0;
	font-size: clamp(22px, 2vw, 28px);
	font-weight: 500;
	line-height: 1.15;
	text-transform: none;
	color: var(--pg-ink);
}

.tto-pages .tto-about__text p,
.tto-pages .tto-about__col p {
	margin: 0;
	font-size: clamp(17px, 1.4vw, 20px);
	line-height: 1.2;
	color: var(--pg-ink);
}

.tto-pages .tto-about__cta {
	margin-top: clamp(32px, 5vw, 70px);
}

.tto-pages .tto-about__cols {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px clamp(32px, 4vw, 56px);
	max-width: 1150px;
	margin: clamp(56px, 7vw, 88px) auto 0;
}

.tto-pages .tto-about__col h2 {
	margin-bottom: 14px;
}

.tto-pages .tto-about__col a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Contact ---------- */

.tto-pages .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.tto-pages .tto-contact {
	display: grid;
	grid-template-columns: minmax(0, 654fr) minmax(0, 360fr);
	gap: 48px clamp(40px, 9vw, 126px);
	align-items: start;
	max-width: 1140px;
	margin: 0 auto;
}

.tto-pages .tto-page h2.tto-contact__heading {
	margin: 0 0 28px;
	padding: 0;
	font-size: clamp(22px, 2vw, 26px);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.02em;
	text-transform: none;
	color: var(--pg-ink);
}

.tto-pages .tto-contact__map {
	overflow: hidden;
	aspect-ratio: 654 / 313;
	border-radius: 14px;
	background: #e8eef6;
}

.tto-pages .tto-contact__map iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	filter: grayscale(100%) contrast(0.92) brightness(1.04);
}

.tto-pages .tto-contact__details {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
	gap: 22px 32px;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
}

.tto-pages .tto-contact__details > li {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 16px;
	line-height: 1.4;
}

.tto-pages .tto-contact__details > li::before {
	content: none;
}

.tto-pages .tto-contact__icon {
	flex: 0 0 auto;
	margin-top: 1px;
	color: var(--pg-black);
}

.tto-pages .tto-contact__label {
	display: block;
	font-weight: 500;
	color: var(--pg-ink);
}

.tto-pages .tto-contact__details a {
	color: var(--pg-ink);
	text-decoration: none;
}

.tto-pages .tto-contact__details a:hover {
	text-decoration: underline;
}

/* Contact Form 7 form ("TTO Contact (new design)") */

/* Contact Form 7's behind-the-scenes parts. Its own stylesheet normally
   hides these, but WoodMart gives every fieldset a border, which showed the
   hidden-fields box as an empty white box. */
.tto-pages .wpcf7 .hidden-fields-container,
.tto-pages .wpcf7 .akismet-fields-container {
	display: none !important;
}

.tto-pages .wpcf7 .screen-reader-response {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* The message box only appears after Submit. */
.tto-pages .tto-cf:is(.init, .resetting, .submitting) .wpcf7-response-output {
	display: none !important;
}

.tto-pages .tto-cf .wpcf7-spinner {
	visibility: hidden;
}

.tto-pages .tto-cf.submitting .wpcf7-spinner {
	visibility: visible;
}

.tto-pages .tto-cf p {
	margin: 0;
	padding: 0;
}

.tto-pages .tto-cf br {
	display: none;
}

.tto-pages .tto-cf .tto-cf-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 20px;
}

.tto-pages .tto-cf .tto-cf-row > p {
	display: contents;
}

.tto-pages .tto-cf .wpcf7-form-control-wrap {
	display: block;
	margin: 0 0 20px;
}

.tto-pages .tto-cf :is(input[type="text"], input[type="email"], input[type="tel"], textarea) {
	box-sizing: border-box;
	display: block;
	width: 100%;
	height: 57px;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: 14px;
	background: var(--pg-field);
	box-shadow: none;
	font-size: 16px;
	font-weight: 400;
	color: var(--pg-ink);
}

.tto-pages .tto-cf textarea {
	height: 164px;
	min-height: 120px;
	padding: 16px;
	resize: vertical;
}

.tto-pages .tto-cf :is(input, textarea)::placeholder {
	color: #6b6b6b;
	opacity: 1;
}

.tto-pages .tto-cf :is(input, textarea):focus {
	outline: 2px solid var(--pg-black);
	outline-offset: 2px;
	background: var(--pg-field);
}

.tto-pages .tto-cf .wpcf7-not-valid {
	box-shadow: inset 0 0 0 1.5px #c0392b;
}

.tto-pages .tto-cf .wpcf7-not-valid-tip {
	display: block;
	margin: 6px 0 0 4px;
	font-size: 13px;
	color: #c0392b;
}

/* Submit: site button style (pill, black → white on hover). */
.tto-pages .tto-cf input.wpcf7-submit {
	box-sizing: border-box;
	display: block;
	width: 100%;
	min-height: 44px;
	margin: 14px 0 0;
	padding: 0 28px;
	border: 1px solid var(--pg-black) !important;
	border-radius: 9999px;
	background: var(--pg-black) !important;
	box-shadow: none !important;
	color: #fff !important;
	font-family: "TTO Montserrat", Montserrat, system-ui, sans-serif !important;
	font-size: 15px;
	font-weight: 500;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.tto-pages .tto-cf input.wpcf7-submit:is(:hover, :focus-visible) {
	background: #fff !important;
	color: var(--pg-black) !important;
}

.tto-pages .tto-cf input.wpcf7-submit:focus-visible {
	outline: 2px solid var(--pg-black);
	outline-offset: 3px;
}

.tto-pages .tto-cf .wpcf7-spinner {
	display: block;
	margin: 12px auto 0;
}

.tto-pages .tto-cf .wpcf7-response-output {
	margin: 18px 0 0 !important;
	padding: 14px 18px !important;
	border: 0 !important;
	border-radius: 14px;
	background: #f3f2f0;
	font-size: 15px;
	line-height: 1.45;
	color: var(--pg-ink);
}

.tto-pages .tto-cf.invalid .wpcf7-response-output,
.tto-pages .tto-cf.failed .wpcf7-response-output,
.tto-pages .tto-cf.aborted .wpcf7-response-output,
.tto-pages .tto-cf.spam .wpcf7-response-output {
	background: #fdeeee;
	color: #8a1c1c;
}

.tto-pages .tto-cf.sent .wpcf7-response-output {
	background: #eaf5ee;
	color: #1f5e37;
}

/* ---------- 404 page ----------
 * A big black "404" in Montserrat. A white wave moves down over it and back
 * up again (covering and revealing it), while its edge ripples sideways.
 * Visitors who prefer less motion see the 404 still, fully visible.
 * (Text and link styles below are no longer used by the template; kept
 * harmlessly in case they come back.)
 */

.tto-pages .tto-404 {
	max-width: 760px;
	margin: clamp(16px, 5vw, 56px) auto 0;
	text-align: center;
}

.tto-pages .tto-404__art {
	position: relative;
	display: inline-block;
	overflow: hidden;
	margin: 0 auto clamp(28px, 4vw, 48px);
	padding: 0.06em 0.04em 0;
	line-height: 0.9;
	user-select: none;
}

.tto-pages .tto-404__num {
	display: block;
	font-family: "TTO Montserrat", Montserrat, system-ui, sans-serif;
	font-size: clamp(120px, 24vw, 330px);
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 0.9;
	color: #000;
}

/* The wave: a white panel with a rippled bottom edge, sitting above the 404. */
.tto-pages .tto-404__wave {
	--wave-h: clamp(18px, 3vw, 36px);
	position: absolute;
	inset: 0;
	transform: translateY(-102%);
	animation: tto-404-cover 7s ease-in-out infinite;
	pointer-events: none;
}

.tto-pages .tto-404__wave::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -2px;
	bottom: calc(var(--wave-h) - 1px);
	background: #fff;
}

.tto-pages .tto-404__wave::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: var(--wave-h);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 40' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' d='M0 0H300V20C250 40 200 0 150 20C100 40 50 0 0 20Z'/%3E%3C/svg%3E") 0 0 / 300px 100% repeat-x;
	animation: tto-404-ripple 2.4s linear infinite;
}

@keyframes tto-404-cover {
	0%, 12% {
		transform: translateY(-102%);
	}
	45%, 58% {
		transform: translateY(-4%);
	}
	90%, 100% {
		transform: translateY(-102%);
	}
}

@keyframes tto-404-ripple {
	to {
		background-position-x: 300px;
	}
}

.tto-pages .tto-page h1.tto-404__title {
	margin: 0 0 14px;
	padding: 0;
	font-size: clamp(20px, 2vw, 24px);
	font-weight: 600;
	line-height: 1.25;
	text-transform: none;
	color: var(--pg-ink);
}

.tto-pages .tto-page p.tto-404__text {
	margin: 0 auto 28px;
	max-width: 34em;
	font-size: 15px;
	line-height: 1.6;
	color: var(--pg-muted);
}

.tto-pages .tto-404__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.tto-pages .tto-404__links a {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0 16px;
	border: 1px solid var(--pg-line);
	border-radius: 9999px;
	font-size: 14px;
	color: var(--pg-ink);
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.tto-pages .tto-404__links a:hover {
	border-color: var(--pg-black);
	background: #f3f2f0;
}

@media (prefers-reduced-motion: reduce) {
	.tto-pages .tto-404__wave,
	.tto-pages .tto-404__wave::after {
		animation: none;
	}

	.tto-pages .tto-404__wave {
		transform: translateY(-102%);
	}
}

/* ---------- Tablet and phone ---------- */

@media (max-width: 899px) {
	.tto-pages .tto-about__feature {
		grid-template-columns: minmax(0, 1fr);
	}

	.tto-pages .tto-about__cols {
		grid-template-columns: minmax(0, 1fr);
	}

	.tto-pages .tto-contact {
		grid-template-columns: minmax(0, 1fr);
	}

	.tto-pages .tto-contact__form {
		max-width: 520px;
	}
}

@media (max-width: 599px) {
	.tto-pages .tto-page h1.tto-page__title {
		margin-bottom: 36px;
	}

	.tto-pages .tto-prose {
		font-size: 16px;
	}

	.tto-pages .tto-prose :is(h2, h3, h4) {
		font-size: 19px;
	}

	.tto-pages .tto-contact__details {
		grid-template-columns: minmax(0, 1fr);
	}
}
