/*
Theme Name: WizPOS Demo Door
Theme URI: https://pos.wizsolutions.in
Author: WizSolutions.in
Author URI: https://wizsolutions.in
Description: One page for the demo install. It opens the live demo and sends everybody else to the real site. The demo itself, the store menus and the staff screens are rendered by the WizPOS plugin and do not use this theme at all.
Version: 1.4.0
Requires PHP: 8.0
Text Domain: wizpos-demo-door
*/

/*
 * WHY THIS THEME IS THREE FILES AND NOT THE MARKETING SITE.
 *
 * The demo install serves the plugin's own templates: the demo page, the store menu
 * and the four staff screens. None of them calls get_header() or wp_head(), so a theme
 * cannot break the demo and a theme is not needed to run it.
 *
 * What is left for a theme here is the FRONT DOOR: the page somebody reaches by typing
 * the demo address or by clicking the logo on the demo page. A copy of the marketing
 * theme would put four more pages, nine megabytes of photographs and a second set of
 * SEO tags on a host that never serves them, and the two copies would then have to be
 * kept in step by hand.
 *
 * So this is the same brand in the rules this one page needs: the same tokens (ink,
 * brand red, line, radii, the two typefaces), the same header, the same buttons, the
 * same card, and the same dark hero the marketing home page opens with. The token and
 * class NAMES are deliberately identical to `wizpos-site/assets/css/site.css`, so a
 * value changed there can be found here, and a prospect who arrives from
 * pos.wizsolutions.in does not feel handed to a different product.
 */

/* ----------------------------------------------------------------- tokens -- */

:root {
	--ink: #0b0e15;
	--body: #495162;
	--muted: #5d6678;

	--line: #e6e9f0;
	--surface: #ffffff;
	--alt: #f7f8fb;

	--brand: #e23744;
	--brand-700: #b92230;
	--brand-tint: #fff1f2;
	--brand-glow: rgba(226, 55, 68, .35);

	--dark: #080b12;
	--dark-2: #101725;
	--dark-line: rgba(255, 255, 255, .10);

	--radius-sm: 10px;
	--radius: 16px;
	--radius-lg: 22px;

	--shadow-sm: 0 1px 2px rgba(11, 14, 21, .05), 0 3px 10px rgba(11, 14, 21, .045);
	--shadow: 0 2px 4px rgba(11, 14, 21, .04), 0 14px 34px rgba(11, 14, 21, .08);

	--max: 1200px;
	--gutter: 24px;

	--font-display: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
	--font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

/* ------------------------------------------------------------------- base -- */

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--surface);
	color: var(--body);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

h1, h2 {
	font-family: var(--font-display);
	color: var(--ink);
	margin: 0 0 .5em;
	line-height: 1.1;
	letter-spacing: -.021em;
	font-weight: 800;
}

h1 { font-size: clamp(2rem, 5.1vw, 3rem); line-height: 1.05; letter-spacing: -.032em; }
h2 { font-size: 1.12rem; letter-spacing: -.012em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--brand); }
a:hover { color: var(--brand-700); }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* The marketing theme's own container, so the two sites line up down the middle. */
.wrap {
	width: 100%;
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.skip {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--ink);
	color: #fff;
	padding: 12px 18px;
	z-index: 100;
	border-radius: 0 0 10px 0;
}

.skip:focus { left: 0; color: #fff; }

/* ----------------------------------------------------------------- header -- */

/* Not sticky, unlike the marketing site's: this page is one screen tall and has
   nothing to scroll back to. */
.site-header {
	background: var(--surface);
	border-bottom: 1px solid var(--line);
}

.site-header .wrap {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 18px;
	min-height: 74px;
}

/* The mark and the wordmark are one unit and never shrink; the nav takes what is left. */
.brand { flex: none; }

.brand {
	display: flex;
	align-items: center;
	gap: 11px;
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 1.16rem;
	color: var(--ink);
	text-decoration: none;
	letter-spacing: -.028em;
}

.brand:hover { color: var(--ink); }

.brand-mark {
	width: 32px;
	height: 32px;
	border-radius: 10px;
	flex: none;
	background: linear-gradient(140deg, #ef4d59, var(--brand-700));
	color: #fff;
	display: grid;
	place-items: center;
	font-size: .95rem;
	font-weight: 800;
	letter-spacing: -.03em;
	box-shadow: 0 4px 12px -3px var(--brand-glow);
}

.site-nav {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
}

/*
 * THE LINKS, NOT THE BUTTONS.
 *
 * `:not(.btn)` is not decoration. Without it this rule beat `.btn-primary` on specificity and painted the
 * primary CTA's text dark grey on the crimson fill -- measured, #495162 on #e23744, about 2.1:1, which is
 * unreadable. The rule below already knew to leave buttons alone (`.site-nav > a:not(.btn)`); this one did
 * not.
 */
.site-nav a:not(.btn) {
	color: var(--body);
	text-decoration: none;
	font-size: .94rem;
	font-weight: 500;
}

.site-nav a:not(.btn):hover { color: var(--ink); }

/*
 * On a phone the text link goes, and the red button stays.
 *
 * The marketing site hides its whole nav behind a JavaScript toggle. This page has no
 * script, and it needs none for one link, so the link is dropped instead. Nothing is
 * lost: the mark and the wordmark beside it go to the same place.
 *
 * Measured before this rule, at 460px: "The main site" wrapped onto three lines and
 * pushed "Create your store" past the right edge of the screen, so the only red button
 * on the page was the one nobody could see.
 */
@media (max-width: 640px) {
	.site-nav > a:not(.btn) { display: none; }
	.site-header .wrap { min-height: 64px; }
}

/* ---------------------------------------------------------------- buttons -- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 14px 24px;
	border-radius: 12px;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: .97rem;
	line-height: 1;
	text-decoration: none;
	border: 1px solid transparent;
	white-space: nowrap;
	transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
	background: var(--brand);
	color: #fff;
	box-shadow: 0 2px 6px rgba(226, 55, 68, .28), 0 10px 24px -8px rgba(226, 55, 68, .5);
}

.btn-primary:hover { background: var(--brand-700); color: #fff; }

/*
 * The secondary CTA, on the light header.
 *
 * The pair on this page is "Create Your Store" (primary) and "Get Demo" (secondary), and the header is
 * white, so the secondary has to be a white button with a line around it. The marketing theme names this
 * same thing btn-ghost and this is that rule, so the two themes call the secondary CTA by one name.
 */
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: #cfd5e2; color: var(--ink); }

.btn-light { background: rgba(255, 255, 255, .1); color: #fff; border-color: var(--dark-line); }
.btn-light:hover { background: rgba(255, 255, 255, .16); color: #fff; }

.btn-lg { padding: 17px 30px; font-size: 1.03rem; border-radius: 13px; }
.btn-sm { padding: 10px 18px; font-size: .89rem; border-radius: 10px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ------------------------------------------------------------------- hero -- */

.hero {
	background: linear-gradient(180deg, var(--dark), var(--dark-2));
	color: rgba(255, 255, 255, .82);
	padding: clamp(48px, 7vw, 88px) 0 clamp(44px, 6vw, 76px);
}

.hero h1 { color: #fff; max-width: 20ch; }
.hero .lede { color: rgba(255, 255, 255, .78); max-width: 54ch; }

/* The hero's one action. Everything below it on this page describes what happens after it is
   pressed, so it comes before the list rather than after it: on a phone the list is five lines
   long and a button under it is under the fold. */
.hero-cta { margin: 28px 0 6px; }

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--brand-700);
	margin-bottom: 18px;
}

.eyebrow--dark {
	color: #ff9aa2;
	background: rgba(255, 255, 255, .06);
	border: 1px solid var(--dark-line);
	border-radius: 999px;
	padding: 6px 13px;
	letter-spacing: .08em;
}

.lede {
	font-size: clamp(1.04rem, 1.3vw, 1.16rem);
	line-height: 1.62;
	max-width: 60ch;
}

ul.shows { margin: 26px 0 30px; color: inherit; }

ul.shows li {
	position: relative;
	padding-left: 22px;
	margin-bottom: 8px;
}

ul.shows li::before {
	content: '';
	position: absolute;
	left: 0;
	top: .62em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--brand);
}

/*
 * Text on the left, a photograph on the right.
 *
 * The dark half of this page used to be one column of text with an empty right-hand side,
 * which reads as a page that failed to load rather than as a design.
 *
 * The picture column is a FIXED 400px rather than a fraction or a max: a track like
 * `minmax(0, 400px)` has a base size of 0 next to an `fr` track, so it collapses to nothing
 * and the photograph silently disappears. Fixed width, and the two stack below 1000px.
 *
 * IT IS 3:4 ALREADY, 1086 wide by 1448 tall at 258 KB, so `object-fit: cover` has nothing to crop
 * and nothing is stretched. When it was written the file was a 3:4 crop of a 3:2 stock scene, and
 * that scene was removed with the rest of the licensed photographs, which is why this column stood
 * empty for as long as it did. The replacement is made for this page. Retina screens get 2.7x the
 * pixels they will ever show, which is the point of shipping it at this size rather than at 400.
 */
.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	gap: 56px;
	align-items: center;
}

.hero-photo img {
	display: block;
	width: 100%;
	/* height:auto IS LOAD-BEARING. The img carries width and height attributes, and a height
	   attribute is a CSS presentational hint: left unset in CSS it wins over aspect-ratio and
	   the picture renders 400x667 instead of 400x533 (measured). One line, invisible in a
	   screenshot of any single width. */
	height: auto;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: var(--radius-lg);
	border: 1px solid rgba(255, 255, 255, .12);
	box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .85);
}

@media (max-width: 1000px) {
	.hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }

	/* Centred and narrower under the text: the gallery below is the main event on a phone, so
	   the hero's photograph must not push it two screens down. */
	.hero-photo img { max-width: 360px; margin: 0 auto; }
}

/* ----------------------------------------------------------------- content -- */

.section { padding: clamp(40px, 5vw, 64px) 0; }

.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	padding: 22px 24px;
	max-width: 640px;
	margin-bottom: 18px;
}

.card p { font-size: .95rem; }

.note {
	background: var(--alt);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 16px 20px;
	max-width: 760px;
	font-size: .93rem;
	color: var(--muted);
}

.door-foot {
	border-top: 1px solid var(--line);
	margin-top: 30px;
	padding-top: 18px;
	color: var(--muted);
	font-size: .88rem;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
}

.door-foot a { color: var(--body); text-decoration: none; border-bottom: 1px solid var(--line); }
.door-foot a:hover { color: var(--brand); border-bottom-color: var(--brand); }

/*
 * The last section: the picture on the left, the words on the right.
 *
 * The mirror of the hero, so the page alternates instead of putting every picture on the
 * same side. The gap between the two columns is the hero's own gap, and the copy fills
 * everything that is left: a narrower measure reads better, but a text block that stops
 * short of the right-hand edge leaves exactly the empty corner this section exists to fill.
 * 44rem is about eighty characters a line, which is as wide as these short blocks can go
 * before the lines get hard to follow.
 */
.door-split {
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr);
	gap: 48px;
	align-items: center;
}

.door-split-media .shot-frame { margin-bottom: 0; }
.door-split-copy { max-width: 44rem; }

/* Both blocks fill the column, so the card and the note share one right-hand edge. Left to
   their own max-widths they stop 64px apart, which reads as a mistake rather than a choice. */
.door-split-copy .card,
.door-split-copy .note { max-width: 100%; }

@media (max-width: 900px) {
	.door-split { grid-template-columns: minmax(0, 1fr); gap: 30px; }
	.door-split-media { display: grid; place-items: center; }
	.door-split-media .shot-frame { width: min(230px, 58%); }
}

.missing {
	display: inline-block;
	color: var(--brand-700);
	background: var(--brand-tint);
	border: 1px solid rgba(226, 55, 68, .16);
	border-radius: 999px;
	padding: 6px 13px;
	font-size: .8rem;
	font-weight: 700;
	margin-bottom: 18px;
}

/* ------------------------------------------------------------------ shots -- */

/*
 * The four screens, as a row of phones.
 *
 * The files are 430 x 932 at double resolution, i.e. a 6.7 inch phone. Two rules follow from
 * that. The whole screen is always shown and never cropped, because a cropped phone
 * screenshot stops looking like a phone. And the width is whatever the column gives and never
 * a fixed pixel count, so the four stay level however wide the window is.
 *
 * No script here either. Below the four-column width the row becomes a swiping strip, and
 * scroll-snap is the entire mechanism.
 */

.section--shots { padding-bottom: 0; }

.section-title {
	font-size: clamp(1.45rem, 2.6vw, 1.9rem);
	letter-spacing: -.024em;
	margin-bottom: .35em;
}

.section-lede {
	color: var(--muted);
	max-width: 62ch;
	margin-bottom: 32px;
}

ul.shots {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 26px;
	align-items: start;
}

.shot { display: flex; flex-direction: column; }

/* A dark bezel, because a screenshot with a white border on a white page has no edge. */
.shot-frame {
	display: block;
	padding: 7px;
	border-radius: 26px;
	background: linear-gradient(160deg, #1b2231, var(--dark));
	box-shadow: var(--shadow);
	margin-bottom: 14px;
}

.shot-frame img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 20px;
	background: var(--alt);
}

.shot-label {
	font-family: var(--font-display);
	color: var(--ink);
	font-size: .99rem;
	letter-spacing: -.012em;
	margin-bottom: 3px;
}

.shot-note { color: var(--muted); font-size: .88rem; line-height: 1.5; }

/* 1080 rather than 1000: four phones side by side need about 240px each before the text
   inside them stops being readable, and that is where this runs out. */
@media (max-width: 1080px) {
	ul.shots {
		display: flex;
		gap: 18px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-bottom: 10px;
		max-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.shot {
		flex: 0 0 46%;
		scroll-snap-align: start;
	}
}

@media (max-width: 560px) {
	.shot { flex: 0 0 72%; }
}
