/*
 * Betta — front-end styles.
 * Measurements follow the previous betta-creative.com (Cafe24) layout. See CLAUDE.md §2.
 * Breakpoints: layout 999/1000px, thumbnail grid 760/761px.
 */

/* Base ------------------------------------------------------------------ */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body,
h1,
h2,
h3,
p,
ul,
ol,
li,
figure,
form {
	margin: 0;
	padding: 0;
}

body {
	min-width: 320px;
	font-family: arial, "Noto Sans KR", Dotum, AppleGothic, sans-serif;
	font-size: 11px;
	/* 1.2em of 11px = 13.2px, inherited as a fixed length like the original. */
	line-height: 1.2em;
	color: #000;
	background: #fff;
	-webkit-text-size-adjust: none;
	text-size-adjust: none;
}

ul,
ol {
	list-style: none;
}

a {
	color: #000;
	text-decoration: none;
}

img {
	max-width: 100%;
	height: auto;
	border: 0;
	vertical-align: top;
}

/* Soft crossfade between pages (cross-document View Transitions).
   Browsers without support simply navigate as usual. */
@view-transition {
	navigation: auto;
}

::view-transition-group(root) {
	animation-duration: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
	@view-transition {
		navigation: none;
	}
}

/* Visually hidden, still read by search engines and screen readers. */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Header / menus -------------------------------------------------------- */

.site-logo {
	display: block;
	width: 260px;
	z-index: 100;
}

.site-logo img {
	display: block;
	width: 100%;
	height: auto;
}

.menu a {
	display: block;
	font-size: 16px;
	line-height: 20px;
}

.menu a::before {
	content: "> ";
}

.menu a:hover,
.menu a:focus-visible {
	text-decoration: underline;
}

.site-nav__tagline {
	margin-top: 13px;
	font-size: 14px;
}

.menu-toggle {
	display: none;
}

.site-main {
	position: relative;
	/* Same breathing room under every page's content (the main page overrides it). */
	padding-bottom: 100px;
}

/* Logged in, WordPress's admin bar covers the top of the viewport (32px; 46px at ≤782px).
   Header parts pinned to the top move down by that height. */
body {
	--betta-admin-bar: 0px;
	/* One fixed gap for the content frame and every grid (detail, category, archive). */
	--betta-gap: 10px;
}

.admin-bar {
	--betta-admin-bar: 32px;
}

@media (max-width: 782px) {
	.admin-bar {
		--betta-admin-bar: 46px;
	}
}

@media (min-width: 1000px) {
	.site-logo {
		position: fixed;
		top: calc(20px + var(--betta-admin-bar));
		left: 20px;
	}

	.site-nav__logo {
		display: none;
	}

	.site-nav__primary {
		position: fixed;
		top: calc(190px + var(--betta-admin-bar));
		left: 20px;
		z-index: 100;
	}

	.site-nav__secondary {
		position: fixed;
		bottom: 20px;
		left: 20px;
		z-index: 100;
	}

	.site-main {
		width: 77%;
		min-height: 44vw;
		/* Content frame: 20px from the top and right edges on every page. */
		margin: 20px 20px 0 auto;
	}
}

/* Mobile header + hamburger overlay (CLAUDE.md §3.4) */
@media (max-width: 999px) {
	/* 185px wide ≈ 33px tall; top keeps its centre on the 44px menu button (top 11px). */
	.site-logo {
		position: absolute;
		top: calc(17px + var(--betta-admin-bar));
		left: 10px;
		width: 185px;
	}

	.site-nav__logo {
		display: none;
	}

	.site-main {
		width: 100%;
		min-height: 56vw;
		/* Logo bottom (50px) + 40px breathing room. */
		padding-top: 90px;
	}

	/* Without JS — and always on the main page, which has nothing but the video —
	   the menu stays open in place instead of behind the hamburger. */
	.no-js .site-nav,
	.js .home .site-nav {
		position: absolute;
		top: calc(160px + var(--betta-admin-bar));
		left: 10px;
		z-index: 100;
		display: block;
	}

	/* Main page: the menu sits at the vertical middle of the screen. */
	.no-js .home .site-nav,
	.js .home .site-nav {
		position: fixed;
		top: 50%;
		transform: translateY(-50%);
	}

	.no-js .site-nav__secondary,
	.js .home .site-nav__secondary {
		margin-top: 30px;
	}

	.js .home .menu-toggle {
		display: none;
	}

	.no-js .site-main {
		padding-top: 355px;
	}

	.js .menu-toggle {
		position: fixed;
		top: calc(11px + var(--betta-admin-bar));
		right: 10px;
		z-index: 1001;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: #000;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	.menu-toggle__icon,
	.menu-toggle__icon::before,
	.menu-toggle__icon::after {
		display: block;
		width: 20px;
		height: 2px;
		background: #fff;
		transition: transform 0.2s, background-color 0.2s;
	}

	.menu-toggle__icon {
		position: relative;
	}

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

	.menu-toggle__icon::before {
		top: -6px;
	}

	.menu-toggle__icon::after {
		top: 6px;
	}

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

	.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before {
		transform: translateY(6px) rotate(45deg);
	}

	.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after {
		transform: translateY(-6px) rotate(-45deg);
	}

	.js .site-nav {
		display: none;
	}

	.js .site-nav.is-open {
		position: fixed;
		inset: var(--betta-admin-bar) 0 0;
		z-index: 1000;
		display: block;
		overflow-y: auto;
		padding: 160px 10px 40px;
		background: #fff;
		animation: betta-fade 0.2s ease-out;
	}

	.js .site-nav.is-open .site-nav__logo {
		display: block;
	}

	/* The overlay already starts below the admin bar. */
	.js .site-nav.is-open .site-logo {
		top: 17px;
	}

	.js .site-nav.is-open .menu a {
		font-size: 20px;
		line-height: 32px;
	}

	.js .site-nav.is-open .site-nav__secondary {
		margin-top: 30px;
	}

	.js .site-nav.is-open .site-nav__tagline {
		margin-top: 30px;
		font-size: 15px;
	}

	html.is-menu-open,
	html.is-menu-open body {
		overflow: hidden;
	}
}

@keyframes betta-fade {
	from {
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.js .site-nav.is-open {
		animation: none;
	}

	.menu-toggle__icon,
	.menu-toggle__icon::before,
	.menu-toggle__icon::after {
		transition: none;
	}
}

/* Main page video ------------------------------------------------------- */

.home .site-main {
	width: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
}

.main-video {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	object-fit: cover;
}

/* Archive (all projects) ------------------------------------------------ */

.archive-all__section + .archive-all__section {
	margin-top: 40px;
}

.archive-all__title {
	margin: 0 0 7px var(--betta-gap);
	font-size: 16px;
	font-weight: 400;
}

/* Fixed gaps; the last column ends exactly at the content's right edge. */
.thumb-grid {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: var(--betta-gap);
	padding-left: var(--betta-gap);
}

.thumb-grid__item {
	width: calc((100% - 7 * var(--betta-gap)) / 8);
}

.thumb-grid__item a {
	display: block;
}

.thumb-grid__item img {
	display: block;
	width: 100%;
}

@media (max-width: 999px) {
	.thumb-grid {
		padding-right: var(--betta-gap);
	}
}

@media (min-width: 761px) and (max-width: 999px) {
	.thumb-grid__item {
		width: calc((100% - 3 * var(--betta-gap)) / 4);
	}
}

@media (max-width: 760px) {
	.thumb-grid__item {
		width: calc((100% - var(--betta-gap)) / 2);
	}
}

/* Category list ---------------------------------------------------------- */

.project-list {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	column-gap: var(--betta-gap);
	padding-left: var(--betta-gap);
}

.project-list__item {
	width: calc((100% - var(--betta-gap)) / 2);
	margin-bottom: 28px;
}

.project-list__thumb {
	display: block;
}

.project-list__thumb img {
	display: block;
	width: 100%;
}

.project-list__title {
	display: block;
	margin-top: 5px;
	padding: 0 5px;
	font-size: 12px;
	line-height: 1.3em;
	color: #555;
	word-wrap: break-word;
}

.more {
	padding-top: 15px;
}

.more__btn {
	display: block;
	width: 75px;
	margin: 0 auto;
	padding: 6px 0;
	border-bottom: 1px solid #000;
	font-size: 12px;
	text-align: center;
	white-space: nowrap;
}

.more__btn.is-loading {
	opacity: 0.4;
	pointer-events: none;
}

@media (max-width: 999px) {
	.project-list {
		padding-right: var(--betta-gap);
	}

	.project-list__item {
		width: 100%;
	}
}

/* Project detail --------------------------------------------------------- */

.project {
	line-height: 18px;
}

/* Full-width media (YouTube embed, single image) */
.project > .wp-block-embed,
.project > .wp-block-image {
	width: calc(100% - var(--betta-gap));
	margin: 0 0 var(--betta-gap) var(--betta-gap);
}

.project .wp-block-embed iframe {
	display: block;
	width: 100%;
}

.project .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
}

/* Half-width images: core gallery with 2 columns, no crop */
body .project > .wp-block-gallery.has-nested-images {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: var(--betta-gap);
	width: calc(100% - var(--betta-gap));
	margin: 0 0 var(--betta-gap) var(--betta-gap);
}

body .project .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
	flex-grow: 0;
	width: calc((100% - var(--betta-gap)) / 2);
	margin: 0;
}

body .project .wp-block-gallery.has-nested-images figure.wp-block-image img {
	width: 100%;
	height: auto;
}

/* Credits: one empty 18px line after the media (the margin collapses with the media's gap),
   lined up with the media's left edge. */
.project > p {
	margin: calc(18px + var(--betta-gap)) 0 0 var(--betta-gap);
	font-size: 12px;
	line-height: 18px;
}

@media (max-width: 999px) {
	/* Same side gutter as every other page (archive, category, about, contact). */
	.project {
		padding: 0 var(--betta-gap);
	}

	.project > .wp-block-embed,
	.project > .wp-block-image,
	body .project > .wp-block-gallery.has-nested-images,
	body .project .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
		width: 100%;
		margin-left: 0;
	}

	.project > p {
		margin-left: 0;
		padding: 0;
	}
}

/* 404 ---------------------------------------------------------------------- */

.not-found {
	padding: 0 var(--betta-gap);
	font-size: 15px;
	line-height: 20px;
}

.not-found__title {
	margin-bottom: 20px;
	font-size: 16px;
	font-weight: 400;
}

.not-found p + p {
	margin-top: 20px;
}

.not-found__link:hover,
.not-found__link:focus-visible {
	text-decoration: underline;
}

/* Static pages (About / Contact) ----------------------------------------- */

.page-cols {
	display: flex;
	width: 80%;
	margin-left: auto;
	font-size: 15px;
	line-height: 20px;
}

.page-cols__label {
	width: 45%;
}

/* Fills the rest of the row so it ends on the content frame's right edge. */
.page-cols__body {
	flex: 1;
	min-width: 0;
	/* PC only: the form's boxes looked glued to the right edge, so the column keeps
	   breathing room there instead of running to the content frame (client, 2026-09-28). */
	padding-right: 10%;
}

.page-cols__body a {
	text-decoration: underline;
}

.page-cols__body a[href^="mailto:"] {
	white-space: nowrap;
}

/* Separator between the English and Korean privacy policy. */
.page-cols__body hr {
	height: 0;
	margin: 30px 0;
	border: 0;
	border-top: 1px solid #000;
}

.page-cols__body p + p {
	margin-top: 20px;
}

@media (max-width: 999px) {
	.page-cols {
		display: block;
		width: auto;
		margin-left: 0;
		padding: 0 var(--betta-gap);
		line-height: 18px;
	}

	.page-cols__label {
		display: none;
	}

	.page-cols__body {
		width: 100%;
		padding-right: 0;
	}

	.page-cols__body p + p {
		margin-top: 18px;
	}
}

/* Contact form */
.contact-form__title {
	margin-top: 40px;
	font-size: 24px;
	font-weight: 700;
	line-height: 20px;
}

.contact-form {
	position: relative;
	margin-top: 20px;
}

.contact-form__status {
	margin-top: 20px;
	font-size: 15px;
	line-height: 20px;
}

.contact-form__status--error {
	color: #c00;
}

/* Turnstile sits below the button and takes no space unless Cloudflare asks for a checkbox. */
.contact-form__turnstile iframe {
	display: block;
	margin-top: 10px;
}

.contact-form__notice:not(:empty) {
	margin-top: 10px;
	font-size: 15px;
	line-height: 20px;
}

.contact-form__notice--error {
	color: #c00;
}

/* Honeypot: off-screen for people, still filled in by spam bots. */
.contact-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea,
.contact-form button {
	display: block;
	width: 100%;
	margin: 0;
	padding: 10px;
	border: 1px solid #000;
	border-radius: 0;
	background: #fff;
	color: #000;
	font-family: arial, sans-serif;
	-webkit-appearance: none;
	appearance: none;
	/* No blue browser focus ring; the caret (fields) and black fill (button) show focus. */
	outline: none;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
	border-bottom: 0;
	font-size: 15px;
}

.contact-form input[type="text"],
.contact-form input[type="email"] {
	height: 40px;
}

/* Consent row: part of the bordered stack, between the message and the button. */
.contact-form__consent {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px;
	border: 1px solid #000;
	border-bottom: 0;
	font-size: 13px;
	line-height: 1.4;
	cursor: pointer;
}

/* Square box drawn to match the form, instead of the browser's own checkbox. */
.contact-form__consent input[type="checkbox"] {
	position: relative;
	flex: none;
	width: 14px;
	height: 14px;
	margin: 0;
	border: 1px solid #000;
	border-radius: 0;
	background: #fff;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
	cursor: pointer;
}

.contact-form__consent input[type="checkbox"]:checked {
	background: #000;
}

.contact-form__consent input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	top: 1px;
	left: 4px;
	width: 4px;
	height: 8px;
	border: solid #fff;
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
}

.contact-form__consent input[type="checkbox"]:focus-visible {
	box-shadow: 0 0 0 2px #fff, 0 0 0 3px #000;
}

.contact-form__consent a {
	text-decoration: underline;
}

.contact-form textarea {
	height: 350px;
	resize: vertical;
}

.contact-form button {
	font-size: 13px;
	cursor: pointer;
}

.contact-form button:hover,
.contact-form button:focus-visible {
	background: #000;
	color: #fff;
}
