/*
 * İletişim / Hakkımızda / Merch. PORT of the prototype's `.contact`,
 * `.tabs`, `.mapbtn`, `.lines`, `.ct-form` and `.opage`/`.about`/`.merch`/
 * `.ow`/`.eyebrow`/`.otitle`/`.agrid`/`.atext`/`.way`/`.oback` rules
 * (assets-source/handoff/jj_handoff/src/template.html, CLAUDE.md
 * "PROTOTYPE v23 IS THE REFERENCE"). Values are the prototype's literal
 * ones; --jj-* custom properties come from site-header.css's :root.
 *
 * Two differences from the prototype, both per port step 4b:
 * 1. The prototype swapped DOM nodes in JS for the mobile layout
 *    (`arrangeContact()`); here a single CSS Grid with named areas gives
 *    the same two layouts without moving anything in the DOM, so only the
 *    location tabs and the map click-to-load need JS (site-contact.js).
 * 2. The hand-drawn Turkey SVG map is replaced by click-to-load Google
 *    Maps embeds (`.mapwrap`/`.mapplaceholder`/`.mapframe`); the prototype
 *    had no equivalent rules for these, so their look (rounded frame,
 *    pill button) is new, matching the brand tokens used everywhere else.
 * 3. `.addr-panel h3`/`.addr-panel p` are the prototype's `.addr h3`/`.addr p`
 *    rules verbatim (small amber uppercase label, larger address text);
 *    `.soonnote` has no literal prototype rule (the prototype used its
 *    `.lines .soon` opacity instead), sized here to match the type scale.
 */

/*
 * These three pages open straight on a full-bleed section (jj-contact,
 * jj-about-page, jj-merch-page), like the prototype's #iletisim / #pAbout /
 * #pMerch, which sit directly under the fixed header with no page title in
 * between. templates/page.html always renders a core/post-title heading
 * above post-content (needed for ordinary text pages); on these three the
 * title duplicates the section's own heading and its cream background
 * shows as a strip between the header and the full-bleed section, so it is
 * hidden here (scoped: this stylesheet only loads on these three pages).
 */
main.wp-block-group:has(> .wp-block-post-content.alignfull) > .wp-block-post-title {
	display: none;
}
main.wp-block-group > .wp-block-post-content.alignfull {
	margin-top: 0;
}

/* ---- İletişim ------------------------------------------------------ */

.jj-contact {
	background: #1C110B;
	color: #F2E6CF;
	display: grid;
	gap: clamp(20px, 4vw, 34px) clamp(28px, 5vw, 80px);
	padding: clamp(96px, 14vh, 150px) clamp(20px, 5vw, 80px);
	grid-template-columns: 1fr;
	grid-template-areas: "title" "tabs" "addr" "map" "lines" "form";
}
@media (min-width: 900px) {
	.jj-contact {
		grid-template-columns: 1.2fr 1fr;
		grid-template-areas:
			"tabs title"
			"map  addr"
			"map  lines"
			"map  form";
		align-items: start;
	}
}

.jj-ga-title { grid-area: title; }
.jj-ga-tabs { grid-area: tabs; }
.jj-ga-addr { grid-area: addr; }
.jj-ga-map { grid-area: map; }
.jj-ga-lines { grid-area: lines; }
.jj-ga-form { grid-area: form; }

.ct-title {
	font-family: var(--jj-display);
	font-weight: 800;
	text-transform: uppercase;
	font-size: clamp(48px, 7vw, 112px);
	line-height: 1;
	margin: 0 0 .2em;
	letter-spacing: .01em;
}

.jj-contact .tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.jj-contact .tabs button {
	font: 600 12.5px/1 var(--jj-text);
	letter-spacing: .1em;
	text-transform: uppercase;
	padding: 12px 16px;
	border-radius: 999px;
	border: 1.5px solid #F2E6CF;
	background: transparent;
	color: #F2E6CF;
	cursor: pointer;
}
.jj-contact .tabs button[aria-selected="true"] { background: #D3912F; border-color: #D3912F; color: #1C110B; }

.addr-panel[hidden] { display: none; }
.addr-panel h3 {
	font: 600 12px/1 var(--jj-text);
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #D3912F;
	margin: 0 0 10px;
}
.addr-panel p { margin: 0 0 12px; font-size: 18px; line-height: 1.45; opacity: 1; }
.mapbtn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
	padding: 12px 18px;
	border-radius: 999px;
	background: #D3912F;
	color: #1C110B !important;
	text-decoration: none;
	font: 600 12.5px/1 var(--jj-text);
	letter-spacing: .12em;
	text-transform: uppercase;
}

.mapwrap { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: rgba(242, 230, 207, .06); border: 1.5px solid rgba(242, 230, 207, .25); }
.mapwrap[hidden] { display: none; }
.mapplaceholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; }
.mapplaceholder p { margin: 0; font: 600 12px/1 var(--jj-text); letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.mapload {
	display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
	background: #D3912F; color: #1C110B; border: 0; font: 600 12.5px/1 var(--jj-text);
	letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
}
.mapnote { font: 500 12px/1.4 var(--jj-text); opacity: .6; max-width: 32ch; }
.mapframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mapframe[hidden] { display: none; }

.lines { display: grid; grid-template-columns: minmax( 0, 1fr ) minmax( 0, 1fr ); gap: 16px 24px; margin: 0; } /* minmax: a long e-mail must not widen the column (phone overflow) */
.lines dt { font: 600 11px/1 var(--jj-text); letter-spacing: .14em; text-transform: uppercase; opacity: .6; margin-bottom: 6px; }
.lines dd { margin: 0; overflow-wrap: anywhere; }
.lines a, .jj-contact-field { color: #F2E6CF; }
.lines .soon { opacity: .5; }

/* Contact Form 7 markup (span.wpcf7-form-control-wrap wraps each input;
   normalised to behave like the prototype's plain <label><input></label>). */
.ct-form .wpcf7-form,
.ct-form form.wpcf7-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
.ct-form .wpcf7-form label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font: 600 11px/1 var(--jj-text);
	letter-spacing: .12em;
	text-transform: uppercase;
	opacity: .9;
}
.ct-form .wpcf7-form label.wide,
.ct-form .wpcf7-form label:has(textarea) { grid-column: 1 / -1; }
.ct-form .wpcf7-form-control-wrap { display: block; }
/* CF7 wraps every line of the form template in a <p> (autop), so the grid
   items are those paragraphs: give them the prototype's spans. */
.ct-form .wpcf7-form > p { margin: 0; }
.ct-form .wpcf7-form > p:has(> label.wide),
.ct-form .wpcf7-form > p:has(> .wpcf7-submit),
.ct-form .wpcf7-form > .wpcf7-response-output { grid-column: 1 / -1; }
.ct-form .wpcf7-form label br { display: none; }
.ct-form input:not([type="submit"]),
.ct-form textarea {
	width: 100%;
	font: 500 15px/1.4 var(--jj-text);
	color: #F2E6CF;
	background: transparent;
	border: 0;
	border-bottom: 1.5px solid rgba(242, 230, 207, .5);
	padding: 8px 0;
	text-transform: none;
	letter-spacing: 0;
}
.ct-form input:not([type="submit"]):focus,
.ct-form textarea:focus { outline: none; border-bottom-color: #D3912F; }
.ct-form .kvkk { grid-column: 1 / -1; font-size: 12.5px; opacity: .65; margin: 0; }
.ct-form .kvkk a { color: inherit; }
.ct-form input[type="submit"] {
	grid-column: 1 / -1;
	justify-self: start;
	height: 48px;
	padding: 0 30px;
	border: 0;
	border-radius: 999px;
	background: #D3912F;
	color: #1C110B;
	font: 600 13px/1 var(--jj-text);
	letter-spacing: .14em;
	text-transform: uppercase;
	cursor: pointer;
}
.ct-form .wpcf7-response-output { grid-column: 1 / -1; margin: 0; font-size: 14px; min-height: 1.3em; border-radius: 8px; }
.ct-form .wpcf7-not-valid-tip { display: block; font-size: 12px; text-transform: none; letter-spacing: 0; opacity: .8; color: #E9A93A; margin-top: 4px; }
.ct-form .jj-contact-form-missing { opacity: .7; }

/* The form apart from the company lines (client, 9 Oct 2026: on phones KEP and Şirket ran
   straight into AD SOYAD): a thin rule, clear room, and its heading "Bize ulaşın" in the
   page title's type (smaller: a section of the page). */
.jj-contact .ct-form {
	margin-top: clamp(20px, 4vw, 36px);
	padding-top: clamp(32px, 5vw, 48px);
	border-top: 1px solid rgba(242, 230, 207, .25);
}
.ct-title--form {
	font-size: clamp(34px, 4.2vw, 56px);
	margin: 0 0 clamp(18px, 2.6vw, 28px);
}

/* Honeypot field (plugins/jj-core/includes/class-jj-contact-form.php):
   visually hidden, not display:none (some bots skip that), never shown to
   a real visitor or a screen reader. */
.ct-form .jj-hp-wrap {
	position: absolute;
	left: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	margin: 0;
}

@media (max-width: 900px) {
	.lines { grid-template-columns: minmax( 0, 1fr ) minmax( 0, 1fr ); }
	.ct-form .wpcf7-form,
	.ct-form form.wpcf7-form { grid-template-columns: 1fr; }
}

/* ---- Hakkımızda / Merch --------------------------------------------- */

.jj-about-page,
.jj-merch-page { min-height: 70vh; }
.jj-about-page { background: #F3EAD8; color: #1C110B; }
.jj-merch-page { background: #1C110B; color: #F2E6CF; }

.jj-about-page .ow,
.jj-merch-page .ow {
	max-width: 1180px;
	margin: 0 auto;
	padding: clamp(64px, 10vh, 110px) clamp(20px, 5vw, 80px) clamp(64px, 10vh, 120px);
}

.eyebrow { font: 600 12px/1 var(--jj-text); letter-spacing: .16em; text-transform: uppercase; opacity: .65; margin: 0 0 16px; }
.otitle {
	font-family: var(--jj-display);
	font-weight: 800;
	text-transform: uppercase;
	font-size: clamp(48px, 8vw, 128px);
	line-height: .98;
	margin: 0 0 clamp(28px, 5vh, 56px);
	letter-spacing: .005em;
	max-width: 14ch;
}
.agrid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 6vw, 96px); align-items: start; }
.atext p { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.6; margin: 0 0 1.1em; max-width: 52ch; }
.way {
	display: flex; flex-direction: column; gap: 6px;
	border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	padding: 20px 0; margin: 28px 0 30px;
}
.way span { font: 600 12px/1 var(--jj-text); letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.way strong { font-family: var(--jj-display); font-weight: 900; text-transform: uppercase; font-size: clamp(34px, 3.6vw, 56px); line-height: 1; }
/* Hakkımızda (rehber, 30 Sep 2026): one column of text, the first line
   as a lead, the "Merkez Altınkaya" signature at the end. */
.jj-about-page .atext { max-width: 62ch; }
.jj-about-page .atext p { max-width: none; }
.jj-about-page .atext .lead { font-family: var(--jj-display); font-weight: 800; text-transform: uppercase; font-size: clamp(24px, 2.4vw, 36px); line-height: 1.1; margin-bottom: 1em; }
.jj-about-page .asign { margin-top: 1.6em; line-height: 1.4; }
.jj-about-page .asign strong { display: inline-block; font-family: var(--jj-display); font-weight: 900; text-transform: uppercase; font-size: clamp(28px, 2.8vw, 40px); line-height: 1; margin-bottom: 6px; }
.soonnote { opacity: .7; max-width: 52ch; }
.oback { margin: 40px 0 0; }
.oback a { color: inherit; font: 600 13px/1 var(--jj-text); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.ocenter { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-height: 60vh; }
/* Merch's plain intro paragraph (not inside .atext): the prototype's
   unstyled browser-default <p>, not the fluid theme.json body size. */
.jj-merch-page .ow > p { font-size: 16px; line-height: 1.5; margin: 0 0 1.1em; }

@media (max-width: 767px) {
	.agrid { grid-template-columns: 1fr; }
}

/* Phones: one column, so info@jacksonjohn.com.tr and @jacksonjohnresmi
   each fit on one line instead of breaking mid-word (26 Sep 2026). */
@media (max-width: 480px) {
	.lines { grid-template-columns: minmax( 0, 1fr ); }
}

/* Landscape iPhone (viewport-fit=cover): backgrounds edge to edge, content
   clear of the notch (client, 28 Sep 2026). */
.jj-contact > *,
.jj-about-page .ow > *,
.jj-merch-page .ow > * {
	padding-left: max(0px, var(--jj-sl, 0px) - clamp(20px, 5vw, 80px));
	padding-right: max(0px, var(--jj-sr, 0px) - clamp(20px, 5vw, 80px));
}

/* Company line spans both columns (rehber, İletişim, 28 Sep 2026). */
.lines .wide { grid-column: 1 / -1; }
.mapnote a { color: inherit; }

/* Required "İletişim Aydınlatma Metni'ni okudum." box (rehber "Form",
   28 Sep 2026): plain readable text with its link, not a field label. */
.ct-form .kvkk-onay { grid-column: 1 / -1; margin: 0; }
.ct-form .kvkk-onay .wpcf7-list-item { margin: 0; }
.ct-form .wpcf7-form .kvkk-onay label {
	display: inline-flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
	font: 400 14px/1.45 var(--jj-text);
	letter-spacing: 0;
	text-transform: none;
	opacity: 1;
	cursor: pointer;
}
.ct-form .wpcf7-form .kvkk-onay input[type="checkbox"] {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	padding: 0;
	border: 0;
	accent-color: #D3912F;
}
.ct-form .kvkk-onay a { color: #F2E6CF; text-decoration: underline; text-underline-offset: 3px; }
