@charset "utf-8";

/* ==========================================================================
   CamTalk / service/globalmatch.php - 글로벌매칭, the wide window (gmd1).

   SCOPE. Every rule is inside `@media only screen and (min-width: 1001px)`,
   the other side of the project's breakpoint (css/camtalk-globalmatch-
   mobile.css is `max-width: 1000px` from its first rule to its last), and
   under `.ctg-page`, the class only this page puts on <body>, or `.ctg`,
   the page's own <main>. The phone is not touched by a line of this file.
   It is linked from globalmatch.php itself.

   ONE PAGE FOR BOTH WIDTHS. The wide window lays out the phone's own
   markup and strings (globalmatch_mobile.*): the hero, then the three
   numbered sections, then the shared footer - the phone has no closing
   block, and the store links are in the shared footer on both widths.

   THE LAYOUT
     hero      the site's white bar, then the ViewChat film edge to edge
               for the rest of the screen (a still of it underneath until it
               plays); breadcrumb, heading and line at its foot on the
               container line, white over a soft dark corner
     01 - 03   words and picture side by side, 44 : 56, alternating (01 and
               03 words left); each section keeps the phone's own tint - rose,
               lavender, pale blue - and hands its colour to the next

   SCALE at 1440: container 1200 (gutters 120), 1280 from 1680; hero heading
   64, section headings 42, copy 19; sections ~104 apart. Type is the
   site's Paperozi; the hero heading is its Bold cut, as on the phone.

   STABILITY. No pinning, no snap, no scroll handler, no reveal; every
   picture has width and height in the markup. The only z-index is the
   hero's own 0 with `isolation`, which keeps its layers inside it, under the
   fixed bar.
   ========================================================================== */

@media only screen and (min-width: 1001px) {

	.ctg-page {
		--gd-max: 1200px;
		--gd-gutter: clamp(40px, 6vw, 120px);
		--gd-w: min(var(--gd-max), calc(100% - 2 * var(--gd-gutter)));
		--gd-side: calc((100% - var(--gd-w)) / 2);
		--gd-air: clamp(88px, 7.2vw, 112px);
		--gd-gap: clamp(48px, 5vw, 80px);
		--gd-header: 96px;               /* .gnb on a wide window (camtalk-header.css) */

		--cg-red: #f5123f;
		--cg-label: #d6083a;            /* the small red numbers: 5.3:1 on white (#f5123f is 4.2) */
		--cg-ink: #16161c;
		--cg-ink-2: #464853;
	}

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

	.ctg-page .ctg[hidden] { display: block; }
	.ctg {
		color: var(--cg-ink);
		background: #fff;
		overflow-x: clip;
	}
	.ctg img { display: block; max-width: 100%; }
	.ctg em { font-style: normal; }
	:where(.ctg) :where(h1, h2, p) { margin: 0; }

	html[lang="en"] .ctg-hero__title,
	html[lang="en"] .ctg-hero__desc,
	html[lang="en"] .ctg-title,
	html[lang="en"] .ctg-desc { word-break: normal; overflow-wrap: break-word; }

	/* ======================================================================
	   1. HERO - the film under the bar, the words at its foot
	   ====================================================================== */

	/* Header + hero = one screen: the white bar lies over the top 96px and
	   the film fills what is under it, so the bar's height is counted once.
	   A min-height, so a short window or a long translation grows the hero
	   rather than cutting the words. */
	.ctg-hero {
		position: relative;
		z-index: 0;
		isolation: isolate;
		display: flex;
		flex-direction: column;
		justify-content: flex-end;
		min-height: 100vh;
		min-height: 100svh;
		padding-top: var(--gd-header);
		overflow: hidden;
		background: #0a0c16;
	}

	/* The film and its still share one box: `cover` under the bar. The film
	   is 16:9 and centred on its middle; at 1440 x 900 the box is 1440 x 804,
	   so almost nothing goes, on a narrow window the sides go and on a short
	   wide one the top and foot - in every scene the faces, the phones, the
	   lettering and the closing mark stay in the middle of the frame. */
	.ctg-page .ctg-hero__still[hidden] { display: block; }
	.ctg-hero__still,
	.ctg-hero__video {
		position: absolute;
		top: var(--gd-header);
		left: 0;
		z-index: 0;
		width: 100%;
		height: calc(100% - var(--gd-header));
	}
	.ctg .ctg-hero__still img {
		width: 100%;
		height: 100%;
		max-width: none;
		object-fit: cover;
		object-position: 50% 50%;
	}

	/* The video shows only while it plays (the script sets the class on
	   `playing`), so the still - not the element's poster, which is the
	   phone's 9:16 frame - is what a loading, refused or reduced-motion hero
	   shows. */
	.ctg-hero__video {
		object-fit: cover;
		object-position: 50% 50%;
		pointer-events: none;
		background: transparent;
		opacity: 0;
		transition: opacity .45s ease;
	}
	.ctg-hero--playing .ctg-hero__video { opacity: 1; }

	/* The film cuts between black and white rooms, so the words get a dark
	   corner of their own: a soft ramp from the lower left, strongest under
	   the words and gone before the middle of the frame, where the film
	   keeps its faces and lettering. No plate. */
	.ctg-hero__shade {
		position: absolute;
		inset: var(--gd-header) 0 0 0;
		z-index: 1;
		pointer-events: none;
		/* the second, tighter layer sits right under the words, so the film's
		   own lettering that passes there (MEET THE WORLD, CHAT, ANYWHERE)
		   is held down to a dim texture rather than meeting the words */
		background:
			radial-gradient(ellipse 54% 60% at 11% 84%,
				rgba(6, 8, 16, .58) 0%,
				rgba(6, 8, 16, .40) 48%,
				rgba(6, 8, 16, 0) 100%),
			radial-gradient(ellipse 66% 96% at 0% 100%,
				rgba(6, 8, 16, .86) 0%,
				rgba(6, 8, 16, .78) 34%,
				rgba(6, 8, 16, .54) 60%,
				rgba(6, 8, 16, .20) 84%,
				rgba(6, 8, 16, 0) 100%);
	}

	/* TYPE (type1 -> gmh1, 2026-10-22): the words keep a side of their own,
	   7% of the window (48-140px), not the 1200px container's line (120px
	   at 1440 but 320 at 1920). Crumb 14px, then 20px; the heading at the
	   site's ExtraBold (800) - 69 at 1440, 72 from ~1500 - on one line in
	   both languages; 26px; the line at 21-22px (1.6) in a 560px measure:
	   the phone's three short Korean lines ([data-ctg-flow]) are dropped
	   and the browser balances two. 64-80px under it. */
	.ctg-page { --gh-side: clamp(48px, 7vw, 140px); }
	.ctg-hero__body {
		position: relative;
		z-index: 2;
		max-width: calc(var(--gh-side) + 720px);
		padding: 40px 0 clamp(64px, 8vh, 80px) var(--gh-side);
		color: #fff;
	}

	.ctg-crumb {
		margin-bottom: 20px;
		font-size: 14px;
		font-weight: 600;
		line-height: 1.4;
		letter-spacing: -.01em;
		color: #e4e5ea;
	}
	.ctg-crumb b { color: #fff; font-weight: 700; }
	.ctg-crumb span { margin: 0 8px; color: #a9abb5; }

	.ctg-hero__title {
		font-size: clamp(56px, min(4.8vw, 8vh), 72px);   /* 69 at 1440 x 900 */
		font-weight: 800;
		line-height: 1.1;
		letter-spacing: -.025em;
		color: #fff;
		word-break: keep-all;
		white-space: nowrap;
		text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
	}
	.ctg-hero__title em { color: var(--cg-red); }

	.ctg-hero__desc {
		max-width: 560px;
		margin-top: 26px;
		font-size: clamp(20px, 1.5vw, 22px);   /* 21.6 at 1440 */
		font-weight: 400;
		line-height: 1.6;
		letter-spacing: -.015em;
		color: #eceef2;
		word-break: keep-all;
		text-wrap: balance;
		text-shadow: 0 1px 14px rgba(0, 0, 0, .3);
	}
	.ctg-hero__desc[data-ctg-flow] br { display: none; }
	html[lang="en"] .ctg-hero__desc { max-width: 600px; }   /* two lines, not a short first one */

	/* A short window: the spacing gives way first, then the heading. */
	@media (max-height: 800px) {
		.ctg-hero__body { padding-bottom: clamp(48px, 7vh, 64px); }
		.ctg-crumb { margin-bottom: 14px; }
		.ctg-hero__desc { margin-top: 22px; }
	}

	/* ======================================================================
	   2-4. THE THREE SECTIONS - words and picture side by side
	   ====================================================================== */

	/* ~104px of air between two pictures at 1440, as Live's features. */
	.ctg-sec { padding: calc(var(--gd-air) * .5) var(--gd-side); }
	.ctg-sec--connect { padding-top: var(--gd-air); }
	.ctg-sec--global { padding-bottom: var(--gd-air); }

	.ctg-surface {
		display: grid;
		grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
		column-gap: var(--gd-gap);
		align-items: center;
	}
	.ctg-sec--culture .ctg-surface { grid-template-columns: minmax(0, 56fr) minmax(0, 44fr); }
	.ctg-sec--culture .ctg-head { grid-column: 2; grid-row: 1; }
	.ctg-sec--culture .ctg-art { grid-column: 1; grid-row: 1; }

	.ctg-head { max-width: 520px; }

	/* the section's number, set as the eyebrow of Match (13px, .2em) */
	.ctg-num {
		display: inline-flex;
		align-items: center;
		gap: 12px;
		font-size: 13px;
		font-weight: 800;
		line-height: 1.2;
		letter-spacing: .2em;
		color: var(--cg-label);
	}
	.ctg-num::after {
		content: "";
		width: 28px;
		height: 2px;
		border-radius: 1px;
		background: rgba(245, 18, 63, .38);
	}

	.ctg-title {
		margin-top: 14px;
		font-size: clamp(36px, 2.92vw, 44px);   /* 42 at 1440 */
		font-weight: 800;
		line-height: 1.28;
		letter-spacing: -.045em;
		color: var(--cg-ink);
		word-break: keep-all;
		text-wrap: balance;
	}
	.ctg-title em { color: var(--cg-red); }
	html[lang="en"] .ctg-title { letter-spacing: -.035em; }

	/* 19 at 1440 in a 500px measure, a solid dark grey (9.2:1 on white). */
	.ctg-desc {
		max-width: 500px;
		margin-top: 22px;
		font-size: clamp(18px, 1.32vw, 20px);   /* 19 at 1440 */
		font-weight: 400;
		line-height: 1.72;
		letter-spacing: -.02em;
		color: var(--cg-ink-2);
		word-break: keep-all;
		text-wrap: balance;           /* no phone breaks to keep: even lines, no lone word */
	}
	html[lang="en"] .ctg-desc { letter-spacing: -.005em; }

	/* The pictures are square, drawn on near-white, with their greetings,
	   flags and bubbles close to the edges: shown whole, at most 640px (the
	   files are 1254), and only their outer 3% fades - outside every bubble -
	   onto a near-white bloom the section lays behind them, so no square
	   shows on the tint. */
	.ctg .ctg-art {
		justify-self: center;
		width: 100%;
		max-width: 640px;
		height: auto;
		-webkit-mask-image:
			linear-gradient(to right, rgba(0, 0, 0, 0) 0%, #000 3%, #000 97%, rgba(0, 0, 0, 0) 100%),
			linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #000 3%, #000 97%, rgba(0, 0, 0, 0) 100%);
		-webkit-mask-composite: source-in;
		mask-image:
			linear-gradient(to right, rgba(0, 0, 0, 0) 0%, #000 3%, #000 97%, rgba(0, 0, 0, 0) 100%),
			linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #000 3%, #000 97%, rgba(0, 0, 0, 0) 100%);
		mask-composite: intersect;
	}

	/* THE GROUNDS - the phone's three tints, each opening in the colour the
	   one above it ends in. The bloom sits where the picture is: its column's
	   centre is side + 0.56 x (container - gap) x 0.5 ... worked out per side
	   below; its core is near-white, the picture's own ground. */
	.ctg-sec--connect {
		--gd-art-x: calc(var(--gd-side) + (var(--gd-w) - var(--gd-gap)) * .44 + var(--gd-gap) + (var(--gd-w) - var(--gd-gap)) * .28);
		background:
			radial-gradient(ellipse calc((var(--gd-w) - var(--gd-gap)) * .36) 52% at var(--gd-art-x) 50%,
				#fefafb 0%, #fefafb 68%, rgba(254, 250, 251, 0) 100%),
			radial-gradient(40% 30% at 6% 22%, rgba(255, 184, 206, .40) 0%, rgba(255, 184, 206, 0) 72%),
			linear-gradient(180deg, #fff 0%, #fff3f7 24%, #fdeef3 70%, #fdecf0 100%);
	}
	.ctg-sec--culture {
		--gd-art-x: calc(var(--gd-side) + (var(--gd-w) - var(--gd-gap)) * .28);
		background:
			radial-gradient(ellipse calc((var(--gd-w) - var(--gd-gap)) * .36) 52% at var(--gd-art-x) 50%,
				#fefefe 0%, #fefefe 68%, rgba(254, 254, 254, 0) 100%),
			radial-gradient(38% 28% at 94% 26%, rgba(220, 212, 255, .46) 0%, rgba(220, 212, 255, 0) 72%),
			linear-gradient(180deg, #fdecf0 0%, #f8f5fe 22%, #f6f3fe 70%, #f5f7ff 100%);
	}
	.ctg-sec--global {
		--gd-art-x: calc(var(--gd-side) + (var(--gd-w) - var(--gd-gap)) * .44 + var(--gd-gap) + (var(--gd-w) - var(--gd-gap)) * .28);
		background:
			radial-gradient(ellipse calc((var(--gd-w) - var(--gd-gap)) * .36) 52% at var(--gd-art-x) 50%,
				#fcfcfe 0%, #fcfcfe 68%, rgba(252, 252, 254, 0) 100%),
			radial-gradient(40% 30% at 6% 24%, rgba(190, 216, 255, .48) 0%, rgba(190, 216, 255, 0) 72%),
			linear-gradient(180deg, #f5f7ff 0%, #f1f5ff 30%, #f6f8ff 76%, #fff 100%);
	}

	/* ======================================================================
	   NARROW AND WIDE
	   ====================================================================== */

	@media (max-width: 1179px) {
		.ctg-page { --gd-gap: 44px; }
		.ctg-surface { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
		.ctg-sec--culture .ctg-surface { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	}

	@media (min-width: 1680px) {
		.ctg-page { --gd-max: 1280px; }
	}

	@media (prefers-reduced-motion: reduce) {
		.ctg-hero__video { transition: none; }
	}
}
