/*
 Theme Name:   So.Wa Consultancy Japan
 Theme URI:    https://sowaconsultancy.co.jp/
 Description:  Bespoke Bricks child theme for So.Wa Japan (migrated from GeneratePress, Nov 2026)
 Author:       47 Media
 Author URI:   https://www.47media.com.sg
 Template:     bricks
 Version:      2.0
 Text Domain:  bricks
*/

/* ==========================================================================
   Fonts: self-hosted files from the old GeneratePress font library
   ========================================================================== */
@font-face {
	font-display: auto;
	font-family: "Poppins";
	font-style: normal;
	font-weight: 400;
	src: url('/assets/media/generatepress/fonts/poppins/pxiEyp8kv8JHgFVrJJfecg.woff2') format('woff2');
}
@font-face {
	font-display: auto;
	font-family: "Poppins";
	font-style: italic;
	font-weight: 400;
	src: url('/assets/media/generatepress/fonts/poppins/pxiGyp8kv8JHgFVrJJLucHtA.woff2') format('woff2');
}
@font-face {
	font-display: auto;
	font-family: "Poppins";
	font-style: normal;
	font-weight: 600;
	src: url('/assets/media/generatepress/fonts/poppins/pxiByp8kv8JHgFVrLEj6Z1xlFQ.woff2') format('woff2');
}
@font-face {
	font-display: auto;
	font-family: "Poppins";
	font-style: italic;
	font-weight: 600;
	src: url('/assets/media/generatepress/fonts/poppins/pxiDyp8kv8JHgFVrJJLmr19VF9eO.woff2') format('woff2');
}
@font-face {
	font-display: auto;
	font-family: "Poppins";
	font-style: normal;
	font-weight: 800;
	src: url('/assets/media/generatepress/fonts/poppins/pxiByp8kv8JHgFVrLDD4Z1xlFQ.woff2') format('woff2');
}
@font-face {
	font-display: auto;
	font-family: "Poppins";
	font-style: italic;
	font-weight: 800;
	src: url('/assets/media/generatepress/fonts/poppins/pxiDyp8kv8JHgFVrJJLm111VF9eO.woff2') format('woff2');
}
@font-face {
	font-display: auto;
	font-family: "Noto Sans JP";
	font-style: normal;
	font-weight: 100 900;
	src: url('/assets/media/generatepress/fonts/noto-sans-jp/-F62fjtqLzI2JPCgQBnw7HFYwQgP.woff2') format('woff2');
}

/* ==========================================================================
   Design tokens (same names as GeneratePress global colours, so GB-era
   var(--contrast) etc. keep working; mirrored in the Bricks colour palette)
   ========================================================================== */
:root {
	--contrast: #573424;
	--contrast-2: #A07745;
	--contrast-3: #b2b2be;
	--base: #f2ebe1;
	--base-2: #fefefe;
	--base-3: #ffffff;
	--accent: #FFEFDA;
	--gray: #f6f6f6;
	--gb-container-width: 1200px;
	--gp-font--poppins: "Poppins";
	--gp-font--noto-sans-jp: "Noto Sans JP";
}

html { scroll-behavior: smooth; }

/* ==========================================================================
   Base rhythm carried over from GeneratePress
   (Bricks resets these to 0; the converted layouts were designed on GP's)
   ========================================================================== */
h1, h2, h3 { margin-bottom: 20px; line-height: 1.2em; }
h4, h5, h6 { margin-bottom: 20px; line-height: inherit; }
p { margin-bottom: 1.5em; }
#brx-content ul, #brx-content ol,
#brx-footer ul, #brx-footer ol { margin: 0 0 1.5em 3em; padding: 0; }
#brx-content li > ul, #brx-content li > ol { margin-bottom: 0; margin-left: 1.5em; }
blockquote { border-left: 5px solid rgba(0,0,0,.05); padding: 20px; font-size: 1.2em; font-style: italic; margin: 0 0 1.5em; position: relative; }
hr { background-color: rgba(0,0,0,.1); border: 0; height: 1px; margin: 40px 0; }
img { height: auto; max-width: 100%; }
/* GenerateBlocks containers had no implicit max-width; Bricks caps elements at 100% */
.brxe-div, .brxe-heading, .brxe-text-basic { max-width: none; }
figure { margin: 0; }

a { color: var(--contrast-2); text-decoration: underline; }
a:hover, a:focus, a:active { color: var(--contrast); text-decoration: none; }
.brxe-nav-menu a, .brxe-logo, a.brxe-div, a.brxe-block, a.brxe-image, .brxe-button { text-decoration: none; }

/* ==========================================================================
   GenerateBlocks generic helpers still referenced by converted markup
   ========================================================================== */
.gb-highlight { background: none; }
.gb-shape { line-height: 0; }
.gb-icon { display: inline-flex; line-height: 0; }
.gb-icon svg { height: 1em; width: 1em; fill: currentColor; }

/* ==========================================================================
   Header (Bricks nav menu styled like the GP pill navigation)
   ========================================================================== */
.sowa-nav { flex-shrink: 0; }
.sowa-header .brxe-logo { flex-shrink: 0; }
.sowa-nav .bricks-nav-menu { align-items: center; }
/* GP: parent items have no right padding before the dropdown arrow */
.sowa-nav .bricks-nav-menu > li > .brx-submenu-toggle { gap: 0; }
#brx-header .sowa-nav .bricks-nav-menu > li > .brx-submenu-toggle > a { padding-right: 0; }
/* GP: the current section stays dark on hover */
#brx-header .sowa-nav .bricks-nav-menu > li[class*="current-menu-"] > a,
#brx-header .sowa-nav .bricks-nav-menu > li[class*="current-menu-"] > .brx-submenu-toggle > * { color: var(--contrast); }
/* GP dropdown: 200px wide, 10px padding */
.sowa-nav .bricks-nav-menu .sub-menu { min-width: 200px; }
.sowa-nav .bricks-nav-menu .sub-menu a { padding: 10px; }

/* Sticky: Bricks' "absolute header" rule outranks its own fixed state, so set it here (GP sticky nav look) */
#brx-header.brx-sticky.scrolling {
	position: fixed;
	top: 0;
	background-color: var(--base-3);
	box-shadow: 0 2px 2px -2px rgba(0, 0, 0, .2);
	animation: sowa-slide-down .3s ease;
}
body.admin-bar #brx-header.brx-sticky.scrolling { top: 32px; }
@media (max-width: 782px) { body.admin-bar #brx-header.brx-sticky.scrolling { top: 46px; } }
@keyframes sowa-slide-down { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.sowa-nav .bricks-nav-menu > li > a,
.sowa-nav .bricks-nav-menu > li > .brx-submenu-toggle > * { white-space: nowrap; }
#brx-header .sowa-nav .bricks-nav-menu > li.nav-button > a {
	background-color: var(--contrast);
	border: 2px solid var(--contrast);
	color: var(--base-2);
	line-height: 35px;
	border-radius: 50px;
	padding-left: 20px;
	padding-right: 20px;
}
#brx-header .sowa-nav .bricks-nav-menu > li.nav-button > a:hover { color: var(--base); }
#brx-header.scrolling .sowa-header { padding-top: 10px; padding-bottom: 10px; transition: padding .3s ease; }
.sowa-logo-mobile { display: none; }
@media (max-width: 1240px) {
	.sowa-logo-desktop { display: none !important; }
	.sowa-logo-mobile { display: block; }
	.sowa-nav { background: transparent !important; padding: 0 !important; }
	.sowa-header { max-width: 85%; margin: 20px auto 0; padding: 3px 10px 3px 20px !important; background: var(--base-3); border-radius: 40px; }
	/* GP mobile header: 85% wide pill, 45px logo with 10px above and below */
	#brx-header .sowa-header { width: 85% !important; max-width: 85% !important; margin-left: auto !important; margin-right: auto !important; }
	#brx-header .sowa-logo-mobile { padding: 10px 0; }
	#brx-header .sowa-logo-mobile .bricks-site-logo { height: 45px !important; width: auto !important; }
	/* GP menu icon: 15px, 30px in from the pill edge */
	#brx-header .sowa-header .bricks-mobile-menu-toggle { width: 15px !important; margin-right: 20px; }
}

/* ==========================================================================
   Carried over from GeneratePress "Additional CSS"
   ========================================================================== */
.fs-highlight { background-image: linear-gradient(rgba(0, 0, 0, 0) 30%, rgb(242, 234, 224) 90%); }

div#n2-ss-114 .n2-font-8cdb5096804922b045571cf83337047c-link a {
	font-family: "Noto Sans JP";
	transition: 0.5s;
	background-color: var(--contrast) !important;
	border-radius: 50px;
	column-gap: 0.5em;
	padding: 15px 30px;
	width: 150px !important;
	justify-content: center;
}

.fs-timeline-bg { background-color: var(--base) !important; padding: 3rem 2rem; }

/* headline highlight underline */
.underline mark { box-shadow: inset 0 -0.3em 0 0 rgba(166, 164, 161, 0.5); }

/* scroll animation up (keyframes braces fixed; original had an unclosed 50% block) */
.fs-fade-up { animation: fs-fade-up linear forwards; animation-timeline: view(); animation-range: entry; }
@keyframes fs-fade-up {
	0%   { opacity: 0; transform: translateY(400px); }
	50%  { opacity: 0; }
	100% { opacity: 1; transform: translateY(0); }
}
.fs-delay { animation-delay: 2s; }

/* fade-in animation */
.fs-fade-in { animation: fs-fade-in ease 3s; animation-iteration-count: 1; animation-fill-mode: forwards; }
@keyframes fs-fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }

/* Note: the old ".fs-project-picture:not([style])" empty-field hack is replaced by
   Bricks element conditions ("hide if {acf_project_picture_N} is empty"). */

/* ==========================================================================
   Blog post blocks (converted from GenerateBlocks; see sowa-bricks-migration)
   ========================================================================== */
/* Classic themes wrap group children in an inner container; make it transparent so GB flex rows still work */
.brxe-post-content .wp-block-group > .wp-block-group__inner-container { display: contents; }
.brxe-post-content .wp-block-group .wp-block-image img { vertical-align: middle; }
/* VK Blocks zeroes the last paragraph/list margin inside core groups; GB containers never had that */
.brxe-post-content .sowa-gb-group p:last-child, .brxe-post-content .sowa-gb-group ul:last-child, .brxe-post-content .sowa-gb-group ol:last-child { margin-bottom: 1.5em; }
/* GB images had no figure margin; GB captions were 0.9em with 1em margins */
.brxe-post-content .wp-block-image:not(.alignleft):not(.aligncenter):not(.alignright):not(.alignwide) { margin: 0; }
.brxe-post-content .sowa-gb-image .wp-element-caption { font-size: inherit; line-height: inherit; margin: 0; color: inherit; }
p.sowa-text-1 { padding-left:30px; }
p.sowa-text-2 { color:var(--base-3); }
p.sowa-text-3 { padding-top:0px; }
.sowa-text-4 .wp-element-caption { text-align:center; }
.sowa-img-1 img { vertical-align:middle; }
p.sowa-text-5 { padding-top:30px; }
.sowa-box-1 { min-width:60%;max-width:1200px;margin-right:auto;margin-left:auto; }
.sowa-box-2 { max-width:1200px;margin-right:auto;margin-left:auto; }
.sowa-box-3 { display:flex; }
.sowa-box-4 { max-width:200px;margin-right:auto;margin-left:auto; }
.sowa-box-5 { display:flex;flex-direction:row;column-gap:30px; }
p.sowa-text-6 { text-align:center;padding-top:0px;padding-bottom:15px; }
.sowa-box-6 { display:flex;flex-direction:column;align-items:center;justify-content:center;column-gap:20px;row-gap:20px;padding-top:50px;border:1px dotted; }
p.sowa-text-7 { display:flex;align-items:center;justify-content:center;column-gap:0.5em; }
p.sowa-text-7 .gb-icon { line-height:0; }
p.sowa-text-7 .gb-icon svg { width:1em;height:1em;fill:currentColor; }
.sowa-img-2 img { width:500px;vertical-align:middle; }
.sowa-box-8 { display:flex;flex-direction:row;align-items:center;column-gap:20px;row-gap:20px; }
@media (max-width: 767px) {
	.sowa-box-7 { min-width:100%; }
	.sowa-box-8 { flex-direction:column; }
}

/* ------------------------------------------------------------------
   Parity fixes from the production comparison
   ------------------------------------------------------------------ */
/* GP sets bold (700), not "bolder" (900 inside 600-weight headings). */
b, strong { font-weight: bold; }
/* Empty paragraphs GP prints still keep their bottom margin. */
.sowa-empty-p { margin: 0 0 1.5em; }
.sowa-empty-p:last-child { margin-bottom: 0; }
/* A missing image file still leaves an empty line box on the live site. */
.brxe-div:has(> img.brx-media-unavailable) { min-height: 1lh; }
/* GP preformatted text. */
pre {
	background: rgba(0, 0, 0, .05);
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	line-height: normal;
	margin: 0 0 1.5em;
	max-width: 100%;
	overflow: auto;
	padding: 20px;
	word-wrap: break-word;
	border: 0;
}
/* GP quotes: body font, no gap after the last paragraph. */
blockquote, blockquote p { font-family: inherit; }
blockquote p:last-child { margin: 0; }
/* GP's article box is a block, so long words never widen its content. */
.sowa-article > * { min-width: 0; width: 100%; }

/* ==========================================================================
   Mobile menu: GP Premium off-canvas panel (slides in from the right)
   ========================================================================== */
@media (max-width: 1240px) {
	#brx-header .sowa-nav .bricks-mobile-menu-wrapper {
		left: auto; right: 0; top: 19.2px; bottom: 12.8px; height: auto;
		width: 80%; max-width: 85%;
		padding: 64px 30px 0;
		color: var(--contrast);
		border-radius: 8px;
		overflow: hidden;
		transform: translateX(100%);
		transition: transform .2s cubic-bezier(.16, .68, .43, .99), visibility .2s;
		z-index: 100001;
	}
	#brx-header .sowa-nav .bricks-mobile-menu-wrapper::before { background-color: var(--base-3); }
	#brx-header .sowa-nav .bricks-mobile-menu-overlay { background-color: rgba(0, 0, 0, .8); }
	#brx-header .sowa-nav.show-mobile-menu .bricks-mobile-menu-overlay { z-index: 100000; }
	#brx-header .sowa-nav .bricks-mobile-menu { overflow-y: auto; }
	#brx-header .sowa-nav .bricks-mobile-menu li { margin: 0; border: 0; }
	#brx-header .sowa-nav .bricks-mobile-menu > li > a,
	#brx-header .sowa-nav .bricks-mobile-menu > li > .brx-submenu-toggle > a {
		padding: 0 10px !important;
		font-size: 15px !important;
		font-weight: 600 !important;
		line-height: 30px !important;
		color: var(--contrast) !important;
	}
	#brx-header .sowa-nav .bricks-mobile-menu a:hover,
	#brx-header .sowa-nav .bricks-mobile-menu a:focus { color: var(--contrast-2) !important; outline: none; }
	#brx-header .sowa-nav .bricks-mobile-menu .brx-submenu-toggle { justify-content: space-between; }
	#brx-header .sowa-nav .bricks-mobile-menu .brx-submenu-toggle > button {
		padding: 0 10px !important; width: 35px; height: 30px; color: var(--contrast) !important; font-size: 15px;
	}
	#brx-header .sowa-nav .bricks-mobile-menu .brx-submenu-toggle > button svg { width: 15px; height: 15px; }
	/* Bricks forces the sub-menu background off (layered !important), so colour the items */
	#brx-header .sowa-nav .bricks-mobile-menu .sub-menu { line-height: normal; }
	#brx-header .sowa-nav .bricks-mobile-menu .sub-menu > li { background-color: rgb(242, 235, 225); }
	#brx-header .sowa-nav .bricks-mobile-menu .sub-menu li > a {
		padding: 10px !important; font-size: 14px !important; font-weight: 600 !important; line-height: normal !important; color: var(--contrast) !important;
	}
	#brx-header .sowa-nav .bricks-mobile-menu > li.nav-button > a {
		background-color: var(--contrast) !important;
		border: 2px solid var(--contrast);
		border-radius: 50px;
		color: var(--base-2) !important;
		line-height: 35px !important;
		padding: 0 20px !important;
	}
	/* The toggle becomes the panel's close button (GP: top left of the panel) */
	#brx-header .sowa-nav.show-mobile-menu .bricks-mobile-menu-toggle {
		position: fixed !important;
		top: 43px; left: calc(20vw + 40px);
		width: 16px !important; min-width: 16px; height: 16px; margin: 0;
		color: var(--contrast);
		z-index: 100002;
	}
	#brx-header .sowa-nav.show-mobile-menu .bricks-mobile-menu-toggle span { width: 21px !important; min-width: 0; right: -2.5px; }
}
