/*
Theme Name: Cultivate
Theme URI: https://cultivate-inc.co.jp
Author: Cultivate, Inc.
Description: 株式会社Cultivate コーポレートサイト用テーマ。Figmaデザイン「Cultivate Website Design」を元に実装。
Version: 1.0.0
Requires PHP: 7.4
Text Domain: cultivate
*/

/* ==========================================================================
   Design tokens (Figma "Cultivate — Visual Tokens" style guide)
   ========================================================================== */
:root {
	--color-ink: #202020;
	--color-black: #000000;
	--color-paper: #ffffff;
	--color-mist: #ededed;
	--color-green: #00b88c;
	--color-yellow: #ffe845;
	--color-mint: #ccf5d6;
	--color-gray: #737373;
	--color-gray-body: #6b6b6b;
	--color-gray-soft: #808080;
	--color-gray-faint: #8c8c8c;

	--font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;

	--radius-card: 36px;
	--radius-tag: 5px;
	--radius-pill: 40px;
	--radius-btn: 8px;

	--shadow-card: 0px 12px 0px 0px rgba(0, 0, 0, 0.22);

	--container-width: 1352px;
	--section-pad-x: 40px;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 105px;
}

body {
	margin: 0;
	font-family: var(--font-jp);
	color: var(--color-ink);
	background: var(--color-paper);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	display: block;
}

ul, ol {
	margin: 0;
	padding: 0;
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	font-family: inherit;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.container {
	width: 100%;
	max-width: var(--container-width);
	margin-inline: auto;
	padding-inline: var(--section-pad-x);
}

.section {
	position: relative;
	/* NOTE: intentionally `clip-path`, not `overflow: hidden`. An
	   `overflow: hidden` ancestor makes the browser treat it as the nearest
	   scroll container for any `position: sticky` descendant, which stops
	   that descendant from ever sticking (it just scrolls away like a
	   normal element instead). `clip-path` gives the same visual clipping
	   without that side effect. */
	clip-path: inset(0);
	/* `.tile-pattern` inside is a tall (100vh) sticky box whose height is
	   cancelled out with a negative margin for normal layout purposes, but
	   `clip-path` only clips paint — the tall box still inflates this
	   page's scrollable height (most visible as dead space below the
	   footer, since it's the section closest to the end of the document).
	   `contain: paint` stops descendant overflow from expanding this
	   element's — and therefore the page's — scrollable area, without
	   making it an `overflow` scroll container (which is what actually
	   breaks `position: sticky`). */
	contain: paint;
}

.section-inner {
	position: relative;
	z-index: 2;
}

/* Decorative tiled background (question/exclamation morph icon), applied to
   every section background except the hero, per design direction.
   `position: sticky` + a height/negative-margin pair keeps the pattern
   pinned in the viewport (instead of scrolling past with the rest of the
   section's content) while the parent `.section`'s `clip-path` still
   clips it to that section's own bounds. */
.tile-pattern {
	position: sticky;
	top: 0;
	z-index: 1;
	height: 100vh;
	margin-bottom: -100vh;
	overflow: hidden;
	pointer-events: none;
	display: grid;
	grid-template-columns: repeat(auto-fill, 84px);
	grid-auto-rows: 84px;
	gap: 20px;
	width: 100%;
	justify-content: center;
}

.tile-pattern__cell {
	display: block;
	width: 100%;
	height: 100%;
}

.tile-pattern__icon {
	width: 100%;
	height: 100%;
	color: var(--tile-color, rgba(32, 32, 32, 0.05));
	transform-origin: center;
}

/* ==========================================================================
   Typography
   ========================================================================== */
.eyebrow {
	font-weight: 500;
	font-size: 14px;
	letter-spacing: 0.02em;
	text-align: center;
	color: var(--color-ink);
}

.section-heading {
	font-weight: 700;
	font-size: 34px;
	letter-spacing: 0.02em;
	text-align: center;
	margin: 0 0 10px;
}

.tag-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 15px;
	background: var(--color-yellow);
	border: 2px solid var(--color-black);
	border-radius: var(--radius-tag);
	font-weight: 700;
	font-size: 16px;
	color: var(--color-black);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-weight: 700;
	font-size: 16px;
	white-space: nowrap;
	cursor: pointer;
	border: 2px solid transparent;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
	transform: translateY(-2px);
}

.btn--pill {
	padding: 10px 30px;
	border-radius: var(--radius-pill);
}

.btn--pill-outline {
	background: var(--color-paper);
	border-color: var(--color-black);
	color: var(--color-black);
}

.btn--pill-dark {
	background: var(--color-ink);
	border-color: var(--color-ink);
	color: var(--color-paper);
}

.btn--pill-green {
	background: var(--color-green);
	border-color: var(--color-green);
	color: var(--color-paper);
}

.btn--square {
	padding: 20px 50px;
	border-radius: var(--radius-btn);
	font-size: 18px;
}

.btn--square-outline {
	background: var(--color-paper);
	border-color: var(--color-black);
	color: var(--color-black);
}

.btn--square-dark {
	background: var(--color-ink);
	border-color: var(--color-ink);
	color: var(--color-paper);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--color-paper);
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px 40px;
	max-width: 1600px;
	margin-inline: auto;
}

.site-logo img {
	height: 40px;
	width: auto;
}

.primary-nav {
	display: flex;
	align-items: center;
	gap: 40px;
}

.primary-nav ul {
	display: flex;
	align-items: center;
	gap: 40px;
	list-style: none;
}

.primary-nav ul a {
	font-weight: 700;
	font-size: 16px;
	letter-spacing: 0.02em;
	color: var(--color-ink);
	padding-bottom: 8px;
	border-bottom: 2px solid transparent;
	transition: border-color 0.15s ease;
}

.primary-nav ul a:hover,
.primary-nav .current-menu-item a,
.primary-nav .current_page_item a {
	border-bottom-color: var(--color-green);
}

.nav-toggle {
	display: none;
	width: 44px;
	height: 44px;
	background: none;
	border: 2px solid var(--color-ink);
	border-radius: 8px;
	padding: 0;
	flex-shrink: 0;
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--color-ink);
	position: relative;
	transition: transform 0.2s ease;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
	content: "";
	position: absolute;
	left: 0;
}

.nav-toggle__icon::before { top: -6px; }
.nav-toggle__icon::after { top: 6px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
	background: var(--color-paper);
	padding: 60px 40px 80px;
}

.hero__inner {
	max-width: 1000px;
	margin-inline: auto;
	position: relative;
	min-height: 560px;
	display: flex;
	align-items: center;
}

/* The morph icon sits absolutely, acting as a decorative backdrop on the
   right rather than a normal in-flow element, so the left-aligned text
   above it is unaffected by its size. */
.hero__art {
	position: absolute;
	top: 50%;
	right: 0;
	width: 100%;
	max-width: 560px;
	color: var(--color-yellow);
	transform: translateY(-50%) rotate(8deg);
	z-index: 0;
	pointer-events: none;
}

.hero__art-float {
	animation: hero-float 4.5s ease-in-out infinite;
}

@keyframes hero-float {
	0%, 100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-24px);
	}
}

.hero__art svg {
	display: block;
	width: 150%;
	height: 150%;
}

.hero__text {
	position: relative;
	z-index: 1;
	width: min(600px, 90%);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 29px;
	text-align: left;
}

.hero__mascot {
	width: 96px;
}

.hero__mascot svg {
	display: block;
	width: 100%;
	height: auto;
}

.hero__title {
	display: inline-flex;
	font-weight: 900;
	font-size: clamp(26px, 4vw, 46px);
	color: var(--color-ink);
}

.hero__copy p {
	margin: 0;
	font-weight: 700;
	font-size: clamp(14px, 1.6vw, 18px);
	letter-spacing: 0.02em;
	line-height: 1.9;
	color: var(--color-gray-soft);
}

/* ==========================================================================
   Why Panel (shared card used across sections)
   ========================================================================== */
.why-panel {
	background: var(--color-paper);
	border: 2px solid var(--color-black);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	padding: 42px 60px;
}

/* Scroll reveal: cards start faded/lowered and ease into place the first
   time they cross into the viewport (see assets/js/main.js).
   IMPORTANT: `transition` lives only on the `.is-visible` (hidden -> shown)
   rule, not on the base hidden state. JS adds `.reveal` well after the
   element has already painted at its normal opacity, so if the hidden
   state itself were transitioned, that add would animate visible -> hidden
   and read as a flash of content appearing and then fading back out. With
   no transition on the base state, going to `.reveal` is an instant,
   imperceptible snap, and only the later hidden -> visible change animates. */
.reveal {
	opacity: 0;
	transform: translateY(28px);
}

.reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Bigger, slower rise used for the Contact section's corner illustrations —
   reads as climbing up from below rather than the subtle card/heading lift.
   Compound selectors (rather than relying on source order against
   `.contact__corner`'s own resting `opacity: 0.85`) so the hidden/visible
   states always win, and removing the reveal classes once the animation
   finishes correctly falls back to that resting opacity. */
.contact__corner.reveal--rise {
	opacity: 0;
	transform: translateY(70px);
}

.contact__corner.reveal--rise.is-visible {
	opacity: 0.85;
	transform: translateY(0);
	transition: opacity 0.9s ease, transform 0.9s ease;
}

@media (prefers-reduced-motion: reduce) {
	.reveal,
	.reveal--rise {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.contact__corner.reveal--rise {
		opacity: 0.85;
	}
}

.why-panel__body {
	max-width: 600px;
	margin-inline: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 30px;
	text-align: center;
}

.why-panel__body--wide {
	max-width: 100%;
}

/* ==========================================================================
   About section
   ========================================================================== */
.about {
	background: var(--color-mist);
}

.about .section-inner {
	padding: 80px 44px;
}

.about .why-panel {
	max-width: 1352px;
	margin-inline: auto;
}

.about__lead p {
	margin: 0 0 10px;
	font-weight: 700;
	font-size: 18px;
	letter-spacing: 0.02em;
	line-height: 1.9;
	color: var(--color-gray-body);
	text-align: justify;
}

.about__lead p:last-child {
	margin-bottom: 0;
}

.about__image {
	width: 100%;
	border-radius: 16px;
	overflow: hidden;
}

/* ==========================================================================
   Product section
   ========================================================================== */
.product {
	background: var(--color-yellow);
}

.product .section-inner {
	padding: 80px 40px;
}
@media (max-width: 720px) {
	.product .section-inner {
		padding: 80px 2%;
	}
}

.product__header {
	text-align: center;
	margin-bottom: 30px;
}

.product-card {
	max-width: 1352px;
	margin-inline: auto;
}

.product-card + .product-card {
	margin-top: 30px;
}

.product-card .why-panel {
	display: flex;
	align-items: center;
	gap: 40px;
	padding: 20px;
}

.product-card__media {
	flex: 1 1 0;
	min-width: 0;
	aspect-ratio: 1024 / 500;
	border-radius: 20px;
	overflow: hidden;
}

.product-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.product-card__body {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding-right: 20px;
	text-align: left;
}

.product-card__title {
	font-weight: 900;
	font-size: 36px;
	letter-spacing: 0.02em;
	margin: 0;
}

.product-card__subtitle {
	font-weight: 500;
	font-size: 18px;
	letter-spacing: 0.02em;
	margin: 0;
}

.product-card__desc {
	font-weight: 500;
	font-size: 16px;
	letter-spacing: 0.02em;
	line-height: 1.75;
	color: var(--color-gray-body);
	margin: 0 0 10px;
	text-align: justify;
}

/* ==========================================================================
   Contact section
   ========================================================================== */
.contact {
	background: var(--color-mist);
}

.contact__inner {
	max-width: 840px;
	margin-inline: auto;
	padding: 90px 40px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	text-align: center;
	position: relative;
	z-index: 2;
}

.contact__heading {
	font-weight: 900;
	font-size: clamp(20px, 3vw, 30px);
	letter-spacing: 0.02em;
	line-height: 1.4;
	margin: 0;
	background-color: var(--color-mist);
}

.contact__copy {
	font-weight: 500;
	font-size: 16px;
	letter-spacing: 0.02em;
	line-height: 1.75;
	color: var(--color-gray-body);
	margin: 0;
}

.contact__corner {
	position: absolute;
	top: 0;
	bottom: 0;
	width: min(460px, 28%);
	overflow: hidden;
	z-index: 0;
	opacity: 0.85;
	pointer-events: none;
}

.contact__corner--left {
	left: 0;
	-webkit-mask-image: linear-gradient(to right, #000 55%, transparent 100%);
	mask-image: linear-gradient(to right, #000 55%, transparent 100%);
}

.contact__corner--right {
	right: 0;
	-webkit-mask-image: linear-gradient(to left, #000 55%, transparent 100%);
	mask-image: linear-gradient(to left, #000 55%, transparent 100%);
}

.contact__corner img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.contact__corner--left img {
	object-position: left center;
}

.contact__corner--right img {
	object-position: right center;
}

/* ==========================================================================
   Page title band (inner pages)
   ========================================================================== */
.page-title {
	background: var(--color-mist);
	text-align: center;
}

.page-title .section-inner {
	padding: 70px 40px 40px;
}

.page-title h1 {
	font-weight: 700;
	font-size: 34px;
	letter-spacing: 0.02em;
	margin: 0 0 10px;
}

.page-title .eyebrow {
	margin: 0;
}

/* ==========================================================================
   Inner page content
   ========================================================================== */
.page-content {
	background: var(--color-mist);
}

.page-content .section-inner {
	padding: 70px 44px 90px;
}

@media (max-width: 720px) {
	.page-content .section-inner {
		padding: 30px 4% 90px;
	}
}	

.page-content .why-panel {
	max-width: 1360px;
	margin-inline: auto;
}

.page-block + .page-block {
	margin-top: 60px;
}

.page-heading {
	font-weight: 900;
	font-size: 30px;
	letter-spacing: 0.02em;
	line-height: 1.4;
	text-align: justify;
	margin: 0;
}

.page-heading--center {
	text-align: center;
}

.page-list {
	list-style: disc;
	padding-left: 27px;
	color: var(--color-gray);
	font-weight: 700;
	font-size: 18px;
	text-align: left;
	width: 100%;
}

.page-list li {
	line-height: 2.2;
}

.page-media {
	width: 100%;
	border-radius: 16px;
	overflow: hidden;
}

.company-grid {
	display: flex;
	gap: 40px;
	align-items: flex-start;
	text-align: left;
	width: 100%;
}

.company-grid__image {
	width: 600px;
	max-width: 50%;
	flex-shrink: 0;
	border-radius: 16px;
	overflow: hidden;
}

.company-grid__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.company-facts dt {
	font-weight: 500;
	font-size: 18px;
	color: var(--color-gray);
	margin-top: 20px;
}

.company-facts dt:first-child {
	margin-top: 0;
}

.company-facts dd {
	font-weight: 500;
	font-size: 18px;
	color: var(--color-ink);
	letter-spacing: 0.02em;
	margin: 4px 0 0;
}

.company-facts ul {
	list-style: disc;
	padding-left: 22px;
	margin: 4px 0 0;
}

.company-facts li {
	font-weight: 500;
	font-size: 18px;
	color: var(--color-ink);
	line-height: 1.8;
}

.philosophy-body p {
	font-weight: 700;
	font-size: 18px;
	letter-spacing: 0.02em;
	line-height: 1.9;
	color: var(--color-gray);
	margin: 0 0 10px;
	text-align: left;
}

.philosophy-body p:last-child {
	margin-bottom: 0;
}

.legal-content .why-panel {
	text-align: left;
}

.legal-content h2 {
	font-weight: 900;
	font-size: 26px;
	letter-spacing: 0.02em;
	text-align: justify;
	margin: 40px 0 16px;
}

.legal-content h2:first-child {
	margin-top: 0;
}

.legal-content p {
	font-weight: 500;
	font-size: 16px;
	letter-spacing: 0.02em;
	line-height: 1.75;
	margin: 0 0 16px;
}

.legal-content ul,
.legal-content ol {
	margin: 0 0 16px;
	padding-left: 22px;
	font-size: 16px;
	line-height: 1.75;
}

.legal-content > *:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
	background: var(--color-paper);
	padding: 40px 40px 20px;
}

.site-footer__top {
	max-width: 1360px;
	margin: 0 auto 33px;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 40px;
	flex-wrap: wrap;
}

.site-footer .site-logo img {
	height: 40px;
}

.footer-nav {
	display: flex;
	gap: 60px;
	flex-wrap: wrap;
}

.footer-nav ul {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.footer-nav a {
	font-weight: 500;
	font-size: 13px;
}

.site-footer__bottom {
	text-align: center;
	font-size: 13px;
	color: var(--color-gray-faint);
	max-width: 1360px;
	margin-inline: auto;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
	.primary-nav ul {
		gap: 24px;
	}

	.hero__inner {
		flex-direction: column;
		align-items: center;
		min-height: 0;
	}

	.hero__text {
		width: 100%;
		align-items: center;
		text-align: center;
	}

	.hero__art {
		position: static;
		max-width: 360px;
		margin: -80% auto 0;
		transform: rotate(8deg);
	}

	.product-card .why-panel {
		flex-direction: column;
	}

	.product-card__media {
		flex: none;
		width: 100%;
	}

	.product-card__body {
		flex: none;
		width: 100%;
		align-items: flex-start;
		text-align: left;
		padding-right: 0;
	}

	.company-grid {
		flex-direction: column;
	}

	.company-grid__image {
		width: 100%;
		max-width: 100%;
	}
}

@media (max-width: 720px) {
	.primary-nav {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--color-paper);
		border-bottom: 1px solid rgba(0, 0, 0, 0.08);
		padding: 20px;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-12px);
		pointer-events: none;
		transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s linear 0.28s;
	}

	.primary-nav.is-open {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		pointer-events: auto;
		transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s linear 0s;
	}

	.primary-nav ul {
		flex-direction: column;
		align-items: flex-start;
		gap: 18px;
		margin-bottom: 18px;
	}

	.nav-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.nav-toggle__icon {
		transition: background 0.2s ease 0.05s;
	}

	.nav-toggle__icon,
	.nav-toggle__icon::before,
	.nav-toggle__icon::after {
		transition: transform 0.28s ease, top 0.28s ease, opacity 0.2s ease;
	}

	.nav-toggle[aria-expanded="true"] .nav-toggle__icon {
		background: transparent;
	}

	.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
		top: 0;
		transform: rotate(45deg);
	}

	.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
		top: 0;
		transform: rotate(-45deg);
	}

	.site-header__inner {
		padding: 16px 20px;
	}

	.hero {
		padding-bottom: 0;
	}

	.why-panel {
		padding: 30px 24px;
	}

	.about .section-inner {
		padding: 80px 2%;
	}

	.section-heading,
	.page-title h1 {
		font-size: 26px;
	}

	.contact__corner {
		display: none;
	}

	.site-footer__top {
		flex-direction: column;
		gap: 24px;
	}
}
