/*
 * Base: layout primitives shared by every section.
 *
 * Rail sections: a narrow left rail (vertical label) + a main column with a
 * left rule, matching the site's grid-line look. Group block style
 * `is-style-rail` / `is-style-rail-dark`, children `.ramen-rail` + `.ramen-main`.
 */

:root {
	--ramen-line: var(--wp--custom--line--light);
	--ramen-line-strong: var(--wp--preset--color--contrast);
	--ramen-pad: var(--wp--preset--spacing--60);
	/* Full-bleed sections keep their content in a centered frame, like the
	   live site's min(1440px, 100% - 32px) container. Both resolve against
	   the element they pad, so only use them on full-width boxes. */
	--ramen-frame-inset: max(0px, calc((100% - var(--wp--custom--frame)) / 2));
	--ramen-gutter: max(var(--wp--custom--gutter), var(--ramen-frame-inset));
	--ramen-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--ramen-arrow-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5'%3E%3Cpath d='M3 12h17M14 5l7 7-7 7'/%3E%3C/svg%3E");
	--ramen-arrow-blue: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233B4EA2' stroke-width='1.5'%3E%3Cpath d='M3 12h17M14 5l7 7-7 7'/%3E%3C/svg%3E");
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}

img {
	max-width: 100%;
	height: auto;
}

/* Full-bleed content area: sections manage their own widths. */
.site-main > .wp-block-post-content > * {
	margin-block: 0;
}

.site-main {
	margin-block: 0;
}

:where(.wp-site-blocks) > * {
	margin-block-start: 0;
}

/* Live sets these non-heading texts in the same static display cut as headings. */
.ramen-slide__text,
.ramen-disclosure > summary,
.site-footer__email,
.site-footer__label,
.site-footer__copyright {
	font-family: var(--wp--preset--font-family--helvetica-now-display);
}

/* Live's product and contact sections and blog/post templates set every heading in the variable font. */
:is(.ramen-page-hero, .ramen-layers, .ramen-split, .ramen-visibility, .ramen-cta, .ramen-contact) :is(h1, h2, h3, h4, h5, h6),
:is(.blog, .single-post, .archive, .search) .site-main :is(h1, h2, h3, h4, h5, h6) {
	font-family: var(--wp--preset--font-family--helvetica-now);
}

/* ---------- Rail sections ---------- */

.is-style-rail,
.is-style-rail-dark {
	--ramen-line: var(--wp--preset--color--contrast);
	display: grid;
	grid-template-columns: var(--wp--custom--rail) minmax(0, 1fr);
	padding-inline: var(--ramen-gutter);
	position: relative;
}

.is-style-rail-dark {
	--ramen-line: var(--wp--preset--color--accent-2);
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.is-style-rail > *,
.is-style-rail-dark > * {
	margin-block: 0 !important;
}

.ramen-rail {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding-top: 30px;
	min-width: 0;
	position: relative;
	z-index: 1;
}

.ramen-rail__label,
.ramen-rail > p {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	margin: 0;
	font-family: var(--wp--preset--font-family--chivo-mono);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 300;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.2;
	white-space: nowrap;
}

/* Dark rails label in the cyan line color, as on live. */
.is-style-rail-dark .ramen-rail__label,
.is-style-rail-dark .ramen-rail > p {
	color: var(--wp--preset--color--accent-2);
}

.ramen-main {
	grid-column: 2; /* rail column stays reserved even with no .ramen-rail block */
	border-left: 1px solid var(--ramen-line);
	min-width: 0;
	position: relative;
	z-index: 1;
}

.ramen-main > * {
	margin-block-start: 0;
}

/* 404: fill the screen and space the heading, text and button apart. */
.ramen-404 {
	min-height: 60vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.ramen-404 > * + * {
	margin-top: 24px;
}

.ramen-404 > .wp-block-buttons {
	margin-top: 48px;
}

/* Legal pages (privacy, terms): long-form prose in a rail section. */
.ramen-legal__content {
	padding: 80px 64px 120px;
}

.ramen-legal__content > * {
	max-width: 820px;
}

.ramen-legal__content > h1 + * {
	margin-top: 64px;
}

.ramen-legal__content > :is(h2, h3) + * {
	margin-top: 16px;
}

.ramen-legal .ramen-legal__content h2 {
	font-size: var(--wp--preset--font-size--xx-large);
}

.ramen-legal .ramen-legal__content h3 {
	margin-top: 40px;
	font-size: var(--wp--preset--font-size--x-large);
}

.ramen-legal .ramen-legal__content .wp-block-separator:not(.is-style-dots) {
	width: 100%;
	margin-block: 56px;
	margin-inline: 0;
	border: 0;
	border-top: 1px solid var(--wp--preset--color--contrast);
	opacity: 0.2;
}

.ramen-legal__content .wp-block-table table {
	border-collapse: collapse;
	width: 100%;
	font-size: 16px;
}

.ramen-legal__content .wp-block-table :is(th, td) {
	padding: 12px 16px 12px 0;
	border: 0;
	border-bottom: 1px solid rgb(from var(--wp--preset--color--contrast) r g b / 0.2);
	text-align: left;
	vertical-align: top;
}

.ramen-legal__content .wp-block-table thead {
	border: 0;
	font-family: var(--wp--preset--font-family--chivo-mono);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ramen-legal__content .wp-block-table th {
	font-weight: 400;
	border-bottom-color: var(--wp--preset--color--contrast);
}

.ramen-legal__content code {
	font-size: 0.9em;
}

@media (max-width: 1199px) {
	.ramen-legal__content {
		padding: 64px 40px 96px;
	}
}

@media (max-width: 767px) {
	.ramen-legal__content {
		padding: 40px 16px 80px;
	}

	.ramen-legal__content > h1 + * {
		margin-top: 40px;
	}

	.ramen-legal__content .wp-block-separator {
		margin-block: 40px;
	}
}

/*
 * Sticky rail labels (desktop). Self-contained: delete this block to undo.
 * The label pins inside its own rail, so it leaves with its section.
 */
@media (min-width: 768px) {
	/* Stop short of the section rule, matching the top offset. */
	.ramen-rail {
		padding-bottom: 30px;
	}

	.ramen-rail__label,
	.ramen-rail > p {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 30px);
	}

	/* overflow:hidden blocks sticky; clip crops the same without a scroll box. */
	.is-style-rail-dark.ramen-home-about {
		overflow: clip;
	}

	/* Live leaves the About label in place; only the light sections pin. */
	.ramen-home-about .ramen-rail__label,
	.ramen-home-about .ramen-rail > p {
		position: static;
	}
}

/* A rule between consecutive light sections. */
.ramen-divider-bottom {
	border-bottom: 1px solid var(--wp--preset--color--contrast);
}

/* ---------- Typography helpers ---------- */

.is-style-eyebrow,
.ramen-mono {
	font-family: var(--wp--preset--font-family--chivo-mono);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 300;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.2;
}

.ramen-lead {
	font-size: var(--wp--preset--font-size--x-large);
	letter-spacing: 0.02em;
	line-height: 1.4;
}

.ramen-accent-text {
	color: var(--wp--preset--color--accent-2);
}

/* ---------- Buttons ---------- */

.wp-block-button.is-style-arrow .wp-block-button__link,
.wp-block-button.is-style-arrow-light .wp-block-button__link,
.wp-block-read-more.ramen-read-more {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	text-decoration: none;
	font-family: var(--wp--preset--font-family--chivo-mono);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.3;
}

.wp-block-button.is-style-arrow .wp-block-button__link::before,
.wp-block-button.is-style-arrow-light .wp-block-button__link::before,
.wp-block-read-more.ramen-read-more::before {
	content: "";
	flex: 0 0 auto;
	width: 58px;
	height: 58px;
	border-radius: 14px;
	background: var(--wp--preset--color--accent) var(--ramen-arrow-white) center / 18px no-repeat;
	transition: background-color 0.35s ease;
}

.wp-block-button.is-style-arrow-light .wp-block-button__link::before,
.wp-block-read-more.ramen-read-more.is-light::before {
	background-color: var(--wp--preset--color--base);
	background-image: var(--ramen-arrow-blue);
}

/* Live hover (0.35s ease): dark-on-light arrow links turn into a navy pill with a
   white label, the tile drops out and its arrow sits 21px in, 4px from the label. */
.wp-block-button.is-style-arrow .wp-block-button__link,
.wp-block-button.is-style-arrow-light .wp-block-button__link,
.wp-block-read-more.ramen-read-more {
	border-radius: 40px;
	transition: background-color 0.35s ease, color 0.35s ease, padding-right 0.35s ease, column-gap 0.35s ease;
}

.wp-block-button.is-style-arrow .wp-block-button__link:hover,
.wp-block-button.is-style-arrow .wp-block-button__link:focus-visible,
.wp-block-read-more.ramen-read-more:hover {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	padding-right: 24px;
	column-gap: 4px;
}

.wp-block-button.is-style-arrow .wp-block-button__link:hover::before,
.wp-block-button.is-style-arrow .wp-block-button__link:focus-visible::before,
.wp-block-read-more.ramen-read-more:hover::before {
	background: var(--ramen-arrow-white) 21px center / 22px no-repeat;
}

/* Light arrow links (on dark sections) turn into a white pill with a navy label
   and a periwinkle arrow. */
.wp-block-button.is-style-arrow-light .wp-block-button__link:hover,
.wp-block-button.is-style-arrow-light .wp-block-button__link:focus-visible,
.wp-block-read-more.ramen-read-more.is-light:hover {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	padding-right: 24px;
	column-gap: 4px;
}

.wp-block-button.is-style-arrow-light .wp-block-button__link:hover::before,
.wp-block-button.is-style-arrow-light .wp-block-button__link:focus-visible::before,
.wp-block-read-more.ramen-read-more.is-light:hover::before {
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C7EEE' stroke-width='1.5'%3E%3Cpath d='M3 12h17M14 5l7 7-7 7'/%3E%3C/svg%3E") 21px center / 22px no-repeat;
}

/* Small variant (cards). */
.wp-block-button.is-style-arrow.is-small .wp-block-button__link::before {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background-size: 14px;
}

/* ---------- Outlined card ---------- */

.is-style-card {
	border: 1px solid var(--wp--preset--color--contrast-2);
	border-radius: 20px;
	background: var(--wp--preset--color--base);
}

/* ---------- Ruled list ---------- */

.wp-block-list.is-style-ruled {
	list-style: none;
	padding: 0;
	margin: 0;
}

.wp-block-list.is-style-ruled li {
	padding: 12px 0;
	border-bottom: 1px solid currentColor;
}

/* ---------- Word reveal (progressive enhancement; see theme.js) ---------- */

.has-js .ramen-reveal .ramen-word {
	display: inline-block;
	opacity: 0;
	transform: translateY(0.4em);
	transition: opacity 1.3s var(--ramen-ease), transform 1.3s var(--ramen-ease);
}

.has-js .ramen-reveal.is-revealed .ramen-word {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.has-js .ramen-reveal .ramen-word {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ---------- Page transitions ----------
 * Same-origin navigations crossfade (browsers without support just load).
 * The header gets its own snapshot so it holds still while the page fades.
 */
@media (prefers-reduced-motion: no-preference) {
	@view-transition {
		navigation: auto;
	}

	.site-header {
		view-transition-name: site-header;
	}
}

/* ---------- Responsive rail ----------
 * Live (Webflow) keeps the 90px rail through 768px. At 767px and below the
 * rail turns into an 85px bar across the top of the section with the label
 * read horizontally, the vertical rule goes, and sections lose side padding.
 */

@media (max-width: 767px) {
	.is-style-rail,
	.is-style-rail-dark {
		grid-template-columns: minmax(0, 1fr);
		padding-inline: 0;
	}

	.ramen-rail {
		justify-content: flex-start;
		align-items: center;
		min-height: 85px;
		padding: 0 16px;
		border-bottom: 1px solid var(--ramen-line);
		background-color: var(--wp--preset--color--base);
	}

	.is-style-rail-dark .ramen-rail {
		background-color: var(--wp--preset--color--contrast);
	}

	.ramen-rail:empty {
		display: none;
	}

	.ramen-main {
		grid-column: 1;
		border-left: 0;
	}

	.ramen-rail__label,
	.ramen-rail > p {
		writing-mode: horizontal-tb;
		transform: none;
	}

	:root {
		--ramen-pad: 16px;
	}
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}
