/*
Theme Name: 反響灯 Sales Theme
Theme URI: https://example.invalid/hankyoto-sales
Author: WDP
Description: 反響対応・追客・状況把握の価値を伝える販売サイト用ブロックテーマ。
Version: 0.4.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: hankyoto-sales
License: GPL-2.0-or-later
*/

@layer reset, tokens, base, components, patterns, utilities, overrides;

@layer base {
	body {
		margin: 0;
		background: var(--wdp-color-surface-base);
		color: var(--wdp-color-text-primary);
	}

	h1,
	h2,
	h3 {
		letter-spacing: -0.02em;
	}

	a {
		text-underline-offset: 0.18em;
	}

	:where(a, button, input, textarea, select):focus-visible {
		outline: 3px solid var(--wdp-color-border-focus);
		outline-offset: 3px;
	}
}

@layer components {
	.hk-skip-link {
		left: 1rem;
		position: fixed;
		top: 1rem;
		transform: translateY(-200%);
		z-index: 99999;
	}

	.hk-skip-link:focus {
		transform: translateY(0);
	}

	.hk-header {
		background: color-mix(in srgb, var(--wdp-color-surface-base) 94%, transparent);
		border-bottom: 1px solid var(--wdp-color-border-default);
		position: sticky;
		top: 0;
		z-index: 50;
	}

	.hk-header__inner {
		min-height: 4.5rem;
	}

	.hk-hero {
		display: grid;
		gap: clamp(2rem, 6vw, 6rem);
		grid-template-columns: minmax(0, 1.1fr) minmax(22rem, 0.9fr);
		padding-block: var(--wdp-spacing-scale-section);
	}

	.hk-eyebrow {
		color: var(--wdp-color-action-primary);
		font-size: 0.78rem;
		font-weight: 700;
		letter-spacing: 0.15em;
		text-transform: uppercase;
	}

	.hk-dashboard {
		background: var(--wdp-color-surface-strong);
		border: 1px solid var(--wdp-color-border-strong);
		border-radius: var(--wdp-shape-radius-medium);
		color: var(--wdp-color-text-inverse);
		padding: clamp(1.25rem, 3vw, 2rem);
	}

	.hk-dashboard__top {
		align-items: center;
		display: flex;
		justify-content: space-between;
	}

	.hk-status-rail {
		display: grid;
		gap: 0.75rem;
		margin-top: 1.5rem;
	}

	.hk-status-item {
		align-items: center;
		background: var(--wdp-color-surface-panel);
		border: 1px solid var(--wdp-color-border-strong);
		border-radius: var(--wdp-shape-radius-small);
		display: grid;
		gap: 0.8rem;
		grid-template-columns: auto 1fr auto;
		padding: 1rem;
	}

	.hk-status-dot {
		border-radius: 50%;
		height: 0.75rem;
		width: 0.75rem;
	}

	.hk-status-dot--new {
		background: var(--wdp-color-status-new);
		box-shadow: 0 0 0 0.35rem color-mix(in srgb, var(--wdp-color-status-new) 18%, transparent);
	}

	.hk-status-dot--working {
		background: var(--wdp-color-status-working);
	}

	.hk-status-dot--done {
		background: var(--wdp-color-status-done);
	}

	.hk-metrics {
		display: grid;
		gap: 1rem;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.hk-metric {
		border-top: 3px solid var(--wdp-color-action-primary);
		padding-top: 1rem;
	}

	.hk-metric strong {
		display: block;
		font-size: clamp(2rem, 4vw, 4rem);
		line-height: 1;
	}

	.hk-before-after {
		display: grid;
		gap: 1px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		background: var(--wdp-color-border-default);
		border: 1px solid var(--wdp-color-border-default);
	}

	.hk-before-after > div {
		background: var(--wdp-color-surface-base);
		padding: clamp(1.5rem, 4vw, 3rem);
	}

	.hk-before {
		border-top: 4px solid var(--wdp-color-status-idle);
	}

	.hk-after {
		border-top: 4px solid var(--wdp-color-status-done);
	}

	.hk-flow {
		display: grid;
		gap: 1rem;
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.hk-flow-step {
		background: var(--wdp-color-surface-subtle);
		border: 1px solid var(--wdp-color-border-default);
		border-radius: var(--wdp-shape-radius-small);
		padding: 1.5rem;
		position: relative;
	}

	.hk-flow-step:not(:last-child)::after {
		content: "→";
		font-weight: 700;
		position: absolute;
		right: -0.85rem;
		top: 50%;
		transform: translateY(-50%);
		z-index: 2;
	}

	.hk-feature-grid {
		display: grid;
		gap: 1rem;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.hk-feature {
		background: var(--wdp-color-surface-subtle);
		border: 1px solid var(--wdp-color-border-default);
		border-radius: var(--wdp-shape-radius-small);
		padding: 1.5rem;
	}

	.hk-proof {
		border-left: 4px solid var(--wdp-color-action-primary);
		padding-left: 1.25rem;
	}

	.hk-cta {
		background: var(--wdp-color-surface-strong);
		border-radius: var(--wdp-shape-radius-medium);
		color: var(--wdp-color-text-inverse);
		display: grid;
		gap: 2rem;
		grid-template-columns: 1fr auto;
		padding: clamp(2rem, 5vw, 4rem);
	}

	.hk-footer {
		border-top: 1px solid var(--wdp-color-border-default);
		margin-top: var(--wdp-spacing-scale-section);
		padding-block: 3rem;
	}
}

@media (max-width: 900px) {
	.hk-hero,
	.hk-cta {
		grid-template-columns: 1fr;
	}

	.hk-metrics,
	.hk-feature-grid {
		grid-template-columns: 1fr;
	}

	.hk-flow {
		grid-template-columns: 1fr 1fr;
	}

	.hk-flow-step::after {
		display: none;
	}
}

@media (max-width: 620px) {
	.hk-before-after,
	.hk-flow {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
