/* ruori.ai: the homepage. The tokens and the header, hero, card and footer follow the app's
   own stylesheet (ruori-app, server/static/public/style.css), so the two look like one product.
   Copy changes across by hand: the homepage has no build step. */

@font-face {
	font-family: 'Source Sans 3';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('/fonts/source-sans-3-latin-400-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Source Sans 3';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('/fonts/source-sans-3-latin-600-normal.woff2') format('woff2');
}

/* The hero title's script (#35627, a trial): the whole font as it came, only repacked as WOFF2. */
@font-face {
	font-family: 'Seaweed Script';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('/fonts/seaweed-script-400-normal.woff2') format('woff2');
}

:root {
	--brand: var(--deep-turquoise);
	--highlight: var(--turquoise);
	--link: #027a82;
	--accent: var(--orange);
	--ink: #212121;
	--footer-ink: #50585c;
	--line: #c8cdd0;
	--line-light: #ecedee;
	--pale-soft: #f4fafa;
	--white: #ffffff;
	/* Ruori's palette */
	--turquoise: #038b94;
	--deep-turquoise: #114b59;
	--orange: #c2540d;
	--light-sand: #f5efdd;
	--sand: #ffdcb6;

	--shore: 54%;   /* where the still-water line of the background sea sits, from the top (js/waves.js reads it) */

	--radius: 2px;
	--sans: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
	--page: 75rem;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font: 400 18px/1.6 var(--sans);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	-webkit-text-size-adjust: 100%;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

h1, h2, h3 { font-weight: 600; line-height: 1.25; margin: 0; }

a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--deep-turquoise); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- header ---- */

.site-header {
	background: var(--deep-turquoise);
	color: var(--white);
	padding-inline: 1.5rem;
}
.bar { padding-block: 0.9rem; display: flex; align-items: center; }
.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--white); text-decoration: none; }
.wordmark .mark { display: block; flex: none; }
.wordmark .name { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.005em; }
.wordmark:hover { color: var(--white); }
.bar { justify-content: space-between; gap: 0.5rem 1.5rem; flex-wrap: wrap; }
.site-nav { display: flex; gap: 0 1.4rem; }
.site-nav a { font-weight: 600; color: var(--white); text-decoration: none; border-bottom: 2px solid transparent; padding-block: 0.15rem; }
.site-nav a:hover { color: var(--white); border-bottom-color: var(--white); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--white); }
.wordmark:hover .name { text-decoration: underline; }

/* ---- hero ---- */

.hero {
	background: var(--highlight);
	background: linear-gradient(to right, var(--brand) 0%, var(--highlight) 100%);
	color: var(--white);
	padding-inline: 1.5rem;
}
.hero-inner { max-width: var(--page); margin-inline: auto; padding-block: 3.5rem 6.5rem; }
.hero-kicker {
	display: inline-block;
	margin: 0 0 1rem;
	padding: 0.15rem 0.75rem;
	border: 1px solid var(--white);
	border-radius: 999px;
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
/* Every h1 on the site is in the script (#35631); the app's are not. */
h1 { font-family: 'Seaweed Script', var(--sans); font-weight: 400; }
.hero-title { font-size: 3.5rem; margin: 0 0 1rem; max-width: 20ch; }
.hero-lead { margin: 0; max-width: 46ch; font-size: 1.25rem; }
/* The call to action (#35296): a white button on the turquoise, the sea. */
.hero-actions { margin: 1.75rem 0 0; }
.cta {
	display: inline-flex; align-items: center; gap: 0.5rem;
	padding: 0.7rem 1.4rem; border-radius: var(--radius);
	background: var(--white); color: var(--deep-turquoise); font-weight: 600; font-size: 1.125rem; text-decoration: none;
	box-shadow: 0 4px 14px rgb(0 0 0 / 0.18); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta:hover { color: var(--deep-turquoise); background: var(--light-sand); transform: translateY(-1px); box-shadow: 0 6px 18px rgb(0 0 0 / 0.22); }
@media (prefers-reduced-motion: reduce) { .cta, .cta:hover { transition: none; transform: none; } }

/* ---- main: light sand, deepening to sand at the edges; everything on it sits in a card ---- */

main {
	flex: 1;
	background-color: var(--light-sand);
	box-shadow: inset 0 0 10vw var(--sand);
	border-top: 10px solid var(--pale-soft);
	padding-inline: 1.5rem;
	padding-block: 0 3.5rem;
}
main > * { max-width: var(--page); margin-inline: auto; }

.card {
	container-type: inline-size;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.75rem;
	margin-top: -3rem;
	box-shadow: 0 2px 6px rgb(17 75 89 / 0.08);
}
.card h2 { font-size: 1.5rem; margin-bottom: 1.25rem; }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
@container (min-width: 44rem) {
	.features { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
}
.features li { border-top: 3px solid var(--highlight); padding-top: 0.9rem; }
.features h3 { font-size: 1.125rem; margin-bottom: 0.4rem; }
.features p { margin: 0; }

.soon { margin: 1.75rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line-light); font-weight: 600; }

/* ---- footer: the same sand, without the top band ---- */

.site-footer {
	background-color: var(--light-sand);
	box-shadow: inset 0 0 10vw var(--sand);
	color: var(--footer-ink);
	font-size: 1rem;
	padding-inline: 1.5rem;
}
.site-footer a { color: var(--ink); }
.footer-inner { max-width: var(--page); margin-inline: auto; padding-block: 2rem 2.5rem; }
.footer-inner p { margin: 0; }
.footer-inner .fine { margin-top: 0.4rem; font-size: 0.9375rem; }

/* ---- the sea behind the page (#35616): /js/waves.js draws waves breaking on the sand on
   a canvas fixed behind everything, in the palette above. The header, hero, main and footer
   let it through; the card keeps its white. Without WebGL 2 the script takes the canvas away
   and the body's own sea over sand shows. Contrast over the moving water is still to be
   looked at. ---- */

body.shore {
	background:
		linear-gradient(to bottom, transparent var(--shore), var(--light-sand) var(--shore)),
		linear-gradient(to right, var(--deep-turquoise), var(--turquoise));
	background-attachment: fixed;
}
/* As tall as the screen is with a phone's browser bars away (lvh), so it doesn't change size
   when they slide in and out (#36306); 100% where lvh isn't known. */
#shore { position: fixed; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; height: 100lvh; }
#shore[hidden] { display: none; }
.shore .site-header, .shore .hero, .shore main, .shore .site-footer { background: none; box-shadow: none; }
.shore main { border-top-color: transparent; }
/* The hero's words over the moving water (#35621): each line on its own strip of the brand
   colour at 80%, as long as the line, not one block behind the paragraph. */
.shore .hero-title span, .shore .hero-lead span {
	background: color-mix(in srgb, var(--brand) 80%, transparent);
	padding: 0.1em 0.75rem;   /* (the label's own side padding: the strips, the label and the button share one left edge) */
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
.shore .hero-lead { line-height: 1.7; }
/* (the strips of a title's lines would overlap at its tight line height, and show darker there) */
.shore .hero-title { line-height: 1.5; }
.shore .hero-title span { padding-block: 0.02em; }
.shore .hero-kicker { background: color-mix(in srgb, var(--brand) 80%, transparent); }

/* The error page (#36278): the hero alone, between the header and the footer. */
main.error-main { padding: 0; border-top: 0; }
main.error-main > .hero { max-width: none; }

/* ---- narrow screens ---- */

main { container-type: inline-size; }
@container (max-width: 36rem) {
	.card { padding: 1.25rem; }
}
@media (max-width: 40rem) {
	.site-header, .hero, main, .site-footer { padding-inline: 1rem; }
	.hero-inner { padding-block: 2.5rem 5rem; }
	.hero-title { font-size: 2rem; }
	.hero-lead { font-size: 1.125rem; }
}
