/*
Theme Name: Rick Lab Decision Platform
Theme URI: https://ricklab.com.tw/
Description: Rick Lab｜購屋研究室專用子主題，將網站定位為新竹購屋決策平台。
Author: Rick Lab
Version: 0.1.0
Template: bluehost-blueprint
Text Domain: rick-lab
*/

:root {
  --color-brand-primary: #163C3A;
  --color-brand-secondary: #245957;
  --color-bg-main: #F7F3EC;
  --color-surface: #FFFDFC;
  --color-text: #1F2423;
  --color-accent: #C96F4B;
  --color-sand: #E7D8C7;

  /* Backward-compatible aliases for existing shared components. */
  --rl-teal: var(--color-brand-secondary);
  --rl-teal-dark: var(--color-brand-primary);
  --rl-coral: var(--color-accent);
  --rl-cream: var(--color-bg-main);
  --rl-sand: var(--color-sand);
  --rl-white: var(--color-surface);
  --rl-ink: var(--color-text);
  --rl-muted: #5F6B68;
  --rl-border: #D8CEC1;
  --rl-radius: 24px;
  --rl-shadow: 0 18px 48px rgba(22, 60, 58, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--rl-ink);
  background: var(--rl-cream);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.75;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.rl-container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.rl-section { padding: 76px 0; }
.rl-section--white { background: var(--rl-white); }
.rl-section--tint { background: #edf7f5; }
.rl-eyebrow { margin: 0 0 12px; color: var(--rl-coral); font-weight: 800; letter-spacing: .08em; font-size: .86rem; }
.rl-title { margin: 0 0 16px; font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1.18; letter-spacing: -.035em; }
.rl-section-title { margin: 0; font-size: clamp(1.65rem, 3vw, 2.5rem); line-height: 1.3; }
.rl-lead { max-width: 680px; color: var(--rl-muted); font-size: 1.08rem; }
.rl-section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.rl-grid { display: grid; gap: 22px; }
.rl-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rl-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rl-card { display: block; padding: 26px; border: 1px solid var(--rl-border); border-radius: var(--rl-radius); background: var(--rl-white); box-shadow: 0 8px 30px rgba(18,63,67,.06); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.rl-card:hover { transform: translateY(-4px); box-shadow: var(--rl-shadow); }
.rl-card h3 { margin: 10px 0 8px; font-size: 1.25rem; }
.rl-card p { margin: 0; color: var(--rl-muted); }
.rl-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: var(--rl-teal-dark); background: var(--rl-sand); font-size: 1.35rem; }
.rl-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 22px; border: 2px solid transparent; border-radius: 999px; font-weight: 800; text-decoration: none; transition: .2s ease; }
.rl-btn--primary { color: var(--rl-white); background: var(--rl-teal); }
.rl-btn--primary:hover { background: var(--rl-teal-dark); }
.rl-btn--secondary { color: var(--rl-teal-dark); border-color: var(--rl-teal); background: transparent; }
.rl-btn--coral { color: var(--rl-white); background: var(--rl-coral); }
.rl-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.rl-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid rgba(15,111,114,.12); background: rgba(251,247,239,.95); backdrop-filter: blur(12px); }
.rl-header__inner { display: flex; min-height: 74px; align-items: center; justify-content: space-between; gap: 24px; }
.rl-brand { display: flex; align-items: center; gap: 10px; font-weight: 900; text-decoration: none; }
.rl-brand__mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--rl-teal), #54b9b4); }
.rl-nav { display: flex; align-items: center; gap: 20px; }
.rl-nav a { font-size: .94rem; font-weight: 700; text-decoration: none; }
.rl-nav a:hover { color: var(--rl-coral); }
.rl-menu-toggle { display: none; border: 0; background: transparent; font: inherit; font-weight: 800; }

.rl-hero { position: relative; overflow: hidden; padding: 96px 0 86px; background: radial-gradient(circle at 80% 20%, #d8f1ed 0, transparent 28%), linear-gradient(145deg, #fffaf2, #edf8f6); }
.rl-hero::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 330px; height: 330px; border-radius: 50%; border: 56px solid rgba(242,125,98,.12); }
.rl-hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 46px; }
.rl-hero__panel { padding: 28px; border-radius: 32px; background: var(--rl-white); box-shadow: var(--rl-shadow); }
.rl-hero__panel strong { display: block; margin-bottom: 10px; font-size: 1.15rem; }
.rl-checks { margin: 0; padding: 0; list-style: none; }
.rl-checks li { padding: 10px 0; border-bottom: 1px solid var(--rl-border); }
.rl-checks li:last-child { border: 0; }
.rl-checks li::before { content: "✓"; margin-right: 9px; color: var(--rl-teal); font-weight: 900; }

.rl-post-card__meta { color: var(--rl-coral); font-size: .85rem; font-weight: 800; }
.rl-post-card h3 a { text-decoration: none; }
.rl-link { color: var(--rl-teal); font-weight: 800; text-decoration: none; }
.rl-mission { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 44px; padding: 42px; border-radius: 34px; background: var(--rl-teal-dark); color: var(--rl-white); }
.rl-mission p { color: #d8ebea; }
.rl-final-cta { padding: 54px 24px; border-radius: 34px; text-align: center; background: linear-gradient(135deg, var(--rl-sand), #fff); box-shadow: var(--rl-shadow); }

.rl-page-hero { padding: 70px 0 45px; background: linear-gradient(140deg, #edf7f5, var(--rl-cream)); }
.rl-content { max-width: 820px; margin: 0 auto; padding: 56px 0 80px; }
.rl-content h2 { margin-top: 2em; }
.rl-archive { padding: 64px 0 90px; }
.rl-empty { padding: 30px; border-radius: var(--rl-radius); background: var(--rl-white); }
.rl-pagination { margin-top: 34px; }
.rl-footer { padding: 56px 0 28px; color: #d9e9e8; background: #102f33; }
.rl-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.rl-footer h2, .rl-footer h3 { color: var(--rl-white); }
.rl-footer a { color: #d9e9e8; text-decoration: none; }
.rl-footer ul { margin: 0; padding: 0; list-style: none; }
.rl-footer__bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-size: .85rem; }

@media (max-width: 860px) {
  .rl-menu-toggle { display: block; }
  .rl-nav { display: none; position: absolute; inset: 74px 20px auto; flex-direction: column; align-items: stretch; padding: 20px; border-radius: 20px; background: var(--rl-white); box-shadow: var(--rl-shadow); }
  .rl-nav.is-open { display: flex; }
  .rl-hero__grid, .rl-mission, .rl-footer__grid { grid-template-columns: 1fr; }
  .rl-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .rl-container { width: min(100% - 30px, 1120px); }
  .rl-section { padding: 56px 0; }
  .rl-hero { padding: 66px 0 58px; }
  .rl-title { font-size: 2.25rem; }
  .rl-grid--3, .rl-grid--2 { grid-template-columns: 1fr; }
  .rl-section-head { align-items: start; flex-direction: column; }
  .rl-actions { flex-direction: column; }
  .rl-btn { width: 100%; }
  .rl-card { padding: 22px; }
  .rl-mission { padding: 28px 22px; }
}

/* Reusable conversion paths */
.rl-card--featured {
  position: relative;
  border: 2px solid var(--color-accent);
  background: var(--color-surface);
  box-shadow: 0 18px 42px rgba(22, 60, 58, .12);
}
.rl-card__badge {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--color-surface);
  background: var(--color-accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
}
.rl-card__cta {
  display: inline-block;
  margin-top: 12px;
  color: var(--color-accent);
  font-weight: 800;
}
.rl-section--seller {
  background: var(--color-sand);
}
.rl-conversion-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: center;
  padding: clamp(30px, 5vw, 56px);
  border-radius: var(--rl-radius);
  color: var(--color-surface);
  background: var(--color-brand-primary);
  box-shadow: var(--rl-shadow);
}
.rl-conversion-cta--buyer {
  background: var(--color-brand-secondary);
}
.rl-conversion-cta .rl-eyebrow {
  color: var(--color-sand);
}
.rl-conversion-cta h2 {
  margin: 0 0 12px;
  color: var(--color-surface);
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.25;
}
.rl-conversion-cta p:not(.rl-eyebrow) {
  max-width: 720px;
  margin: 0;
  color: var(--color-surface);
  opacity: .86;
}
.rl-conversion-cta .rl-btn {
  min-height: 48px;
  text-align: center;
}

@media (max-width: 760px) {
  .rl-conversion-cta {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 30px 22px;
  }
  .rl-conversion-cta .rl-btn {
    width: 100%;
  }
}



/* Lead intake */
.rl-lead-hero,
.rl-lead-form,
.rl-form-notice {
	max-width: 860px;
	margin-inline: auto;
}
.rl-lead-hero {
	padding: clamp(54px, 8vw, 92px) 24px 28px;
	text-align: center;
}
.rl-lead-hero h1 {
	margin: 8px 0 18px;
	color: var(--color-brand-primary);
	font-size: clamp(2rem, 5vw, 3.6rem);
	line-height: 1.18;
}
.rl-lead-hero > p:last-child {
	max-width: 680px;
	margin: 0 auto;
	color: var(--color-text);
	font-size: 1.08rem;
}
.rl-lead-form {
	margin-bottom: 80px;
	padding: clamp(24px, 5vw, 48px);
	border: 1px solid var(--color-sand);
	border-radius: var(--rl-radius);
	background: var(--color-surface);
	box-shadow: var(--rl-shadow);
}
.rl-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}
.rl-lead-form label {
	display: grid;
	gap: 8px;
	margin-bottom: 20px;
	color: var(--color-brand-primary);
	font-weight: 700;
}
.rl-lead-form input,
.rl-lead-form select,
.rl-lead-form textarea {
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	border: 1px solid #b8b5ae;
	border-radius: 10px;
	color: var(--color-text);
	background: #fff;
	font: inherit;
}
.rl-lead-form textarea {
	min-height: 128px;
	resize: vertical;
}
.rl-lead-form input:focus,
.rl-lead-form select:focus,
.rl-lead-form textarea:focus {
	border-color: var(--color-brand-secondary);
	outline: 3px solid rgba(36, 89, 87, .18);
}
.rl-lead-form .rl-consent {
	display: flex;
	grid-template-columns: 22px 1fr;
	align-items: start;
	gap: 10px;
	color: var(--color-text);
	font-size: .94rem;
	font-weight: 400;
}
.rl-consent input {
	width: 20px;
	min-height: 20px;
	margin-top: 2px;
}
.rl-lead-form .rl-btn {
	width: 100%;
	min-height: 52px;
	border: 0;
	cursor: pointer;
	font-size: 1rem;
}
.rl-form-footnote {
	margin: 14px 0 0;
	color: #5f625f;
	font-size: .86rem;
	text-align: center;
}
.rl-form-notice {
	margin-bottom: 72px;
	padding: 28px;
	border-radius: var(--rl-radius);
}
.rl-form-notice--success {
	color: var(--color-brand-primary);
	background: var(--color-sand);
}
.rl-form-notice--error {
	color: #733a29;
	background: #f5dfd5;
}
.rl-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
@media (max-width: 680px) {
	.rl-form-grid {
		grid-template-columns: 1fr;
		gap: 0;
	}
	.rl-lead-hero {
		padding-top: 44px;
		text-align: left;
	}
	.rl-lead-form {
		margin-inline: 16px;
		padding: 24px 18px;
	}
}


.rl-lead-principles {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	max-width: 860px;
	margin: 0 auto 28px;
	padding: 0 18px;
}
.rl-lead-principles span {
	padding: 8px 14px;
	border-radius: 999px;
	color: var(--color-brand-primary);
	background: var(--color-sand);
	font-size: .9rem;
	font-weight: 700;
}
@media (max-width: 680px) {
	.rl-lead-principles {
		justify-content: flex-start;
	}
}


/* Dark-section contrast */
.rl-mission .rl-section-title,
.rl-mission h2 {
	color: var(--color-surface);
}
.rl-mission .rl-btn--secondary {
	color: var(--color-brand-primary);
	background: var(--color-surface);
	border-color: var(--color-surface);
}
.rl-mission .rl-btn--secondary:hover,
.rl-mission .rl-btn--secondary:focus-visible {
	color: var(--color-brand-primary);
	background: var(--color-sand);
	border-color: var(--color-sand);
}
