/* =========================================================
   CSS Reset & Normalize
========================================================= */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,main,menu,nav,output,ruby,section,summary,time,mark,audio,video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html { font-size: 16px; }
body { line-height: 1.6; background: #F7F8FA; color: #222; }
article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section { display:block; }
img { max-width: 100%; height: auto; display: block; }
ul,ol { list-style:none; }
a { text-decoration: none; color: inherit; transition: color .2s; }
button { background: none; border: none; font: inherit; cursor: pointer; }

/* ===============================
  Brand Font Setup
=============================== */
@font-face {
  font-family: 'Noto Serif JP';
  font-style: normal; font-weight: 400;
  src: local('Noto Serif JP'), local('NotoSerifJP-Regular');
}
@font-face {
  font-family: 'Hiragino Kaku Gothic ProN';
  font-style: normal; font-weight: 400;
  src: local('Hiragino Kaku Gothic ProN'), local('HiraginoKakuGothicProN-W3');
  unicode-range: U+4E00-9FFF, U+3040-309F, U+30A0-30FF, U+FF66-FF9F;
}
body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', 'Noto Sans JP', sans-serif;
  color: #222;
  background: #F7F8FA;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Serif JP', 'Hiragino Kaku Gothic ProN', serif;
  color: #163560;
  font-weight: 700;
}
h1 { font-size: 2.4rem; line-height: 1.2; margin-bottom: 20px; }
h2 { font-size: 1.8rem; margin-bottom: 16px; }
h3 { font-size: 1.25rem; margin-bottom: 12px; }

p, li, span, label, input, textarea, th, td {
  font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', 'Noto Sans JP', sans-serif;
  font-size: 1rem;
}
strong { font-weight: bold; }
blockquote {
  font-family: 'Noto Serif JP', serif;
  color: #163560;
  background: #EFF2F8;
  border-left: 4px solid #163560;
  padding: 14px 20px;
  margin-bottom: 6px;
}

/* ===============================
  Color Variables
=============================== */
:root {
  --primary: #1A1A2E;
  --secondary: #163560;
  --accent: #F7E6C4;
  --text-main: #222;
  --text-light: #fff;
  --bg-main: #F7F8FA;
  --bg-section: #fff;
  --divider: #E0E4EB;
  --shadow-card: 0 4px 15px 0 rgba(22, 53, 96, 0.11);
  --shadow-hover: 0 8px 20px 0 rgba(22, 53, 96, 0.14);
}

/* ===============================
  Layout Containers & Utilities
=============================== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--bg-section);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  background: #fff;
  box-shadow: var(--shadow-card);
  border-radius: 14px;
  padding: 24px;
  transition: box-shadow .2s, transform .2s;
  position: relative;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background:#F7F8FA;
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  border: 1px solid var(--divider);
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* ===============================
  Header & Main Navigation
=============================== */
header {
  background: var(--primary);
  color: var(--text-light);
  padding: 0;
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(22,53,96,0.07);
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 74px;
}
header img {
  height: 40px;
  width: auto;
}
.main-nav {
  display: flex;
  gap: 32px;
  align-items: center;
}
.main-nav a {
  color: #fff;
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background .2s, color .2s;
  font-weight: 500;
}
.main-nav a:hover,
.main-nav a:focus {
  background: var(--secondary);
  color: var(--accent);
}
.cta-button {
  background: var(--secondary);
  color: var(--accent);
  border-radius: 24px;
  padding: 10px 32px;
  font-size: 1.08rem;
  font-family: 'Noto Serif JP',serif;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(22,53,96,0.11);
  border: none;
  outline: none;
  transition: background .18s, color .18s, filter .18s, box-shadow .18s;
  margin-left: 14px;
  cursor: pointer;
  letter-spacing: 1.2px;
}
.cta-button:hover,
.cta-button:focus {
  background: var(--primary);
  color: #fff;
  filter: brightness(1.04);
  box-shadow: var(--shadow-hover);
}

/* ===============================
  Mobile Navigation
=============================== */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 200;
  font-size: 2.1rem;
  background: var(--secondary);
  color: var(--accent);
  width: 46px; height: 46px;
  border-radius: 50%;
  text-align: center;
  align-items: center;
  justify-content: center;
  transition: filter .18s;
  box-shadow: 0 2px 12px rgba(22,53,96,0.13);
}
.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  filter: brightness(1.12);
}
.mobile-menu {
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  background: rgba(26,26,46,0.98);
  color: #fff;
  z-index: 300;
  transform: translateX(100%);
  transition: transform .33s cubic-bezier(0.77,0,0.18,1);
  display: flex;
  flex-direction: column;
}
.mobile-menu.open {
  transform: translateX(0%);
}
.mobile-menu-close {
  background: transparent;
  color: var(--accent);
  font-size:2.2rem;
  position: absolute;
  top: 24px; right: 26px;
  z-index: 320;
  width: 42px; height: 42px;
  text-align: center;
  border-radius: 50%;
  transition: background .2s;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus {
  background: rgba(247,230,196,0.12);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: flex-start;
  margin: 90px 0 0 30px;
}
.mobile-nav a {
  font-size: 1.22rem;
  color: var(--accent);
  padding: 8px 10px;
  border-radius: 4px;
  font-weight: 500;
  transition: background .16s, color .13s;
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  background: var(--accent);
  color: var(--secondary);
}

@media (max-width: 1024px) {
  header .container {
    gap: 8px;
  }
  .main-nav a { padding: 6px 8px; }
}

@media (max-width: 830px) {
  header .container {
    flex-direction: row;
    gap: 5px;
  }
  .main-nav { gap: 16px; }
  .cta-button { margin-left: 6px; }
}

@media (max-width: 768px) {
  header .container {
    flex-direction: row;
    gap: 4px;
    padding: 0 8px;
  }
  .main-nav, .cta-button {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}

/* ===============================
  Hero Section and Banners
=============================== */
.hero {
  background: linear-gradient(108deg, var(--primary) 60%, var(--secondary) 100%);
  color: var(--accent);
  border-radius: 0 0 26px 26px;
  padding: 44px 0 36px 0;
  margin-bottom: 40px;
  box-shadow: 0 6px 27px 0 rgba(22,53,96,0.07);
}
.hero .container { display: flex; justify-content: center; align-items: center; }
.hero .content-wrapper {
  align-items: flex-start;
  gap: 22px;
}
.hero h1 { color: var(--accent); }
.hero p { color: #fff; margin-bottom: 4px; }

@media (max-width: 540px) {
  .hero { padding: 28px 0 20px 0; }
  .hero h1 { font-size: 1.4rem; }
}

/* ===============================
  Features, Cards, and Grids
=============================== */
.feature-grid,
.listing-grid,
.review-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.feature-grid > div,
.property-card,
.review-card {
  flex: 1 1 290px;
  min-width: 270px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  transition: box-shadow .19s, transform .18s;
  margin-bottom: 20px;
}
.feature-grid > div:hover,
.property-card:hover,
.review-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px) scale(1.01);
}
.feature-grid img {
  width: 44px; height:44px;
}
.property-card ul, .review-card ul { margin-bottom: 10px; }
.property-card li, .review-card li { margin-bottom: 3px; color: #444; }

/* ===============================
  Review and Testimonial Cards
=============================== */
.review-list {
  gap: 24px;
}
.review-card {
  background: #FAFBFE;
  border: 1px solid var(--divider);
  min-width: 260px;
  color: #1A1A2E;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 20px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review-card h3 { color: var(--secondary); }
.review-card span { color: #686868; font-size: .98rem; margin-left: 6px; }

.testimonial-card {
  background: #fff;
  box-shadow: var(--shadow-card);
  border-left: 5px solid var(--secondary);
  font-family: 'Noto Serif JP', serif;
  color: #163560;
}
.testimonial-card blockquote {
  margin: 0; padding: 0; background: none; border-left: none; color: #163560;
}
.testimonial-card > div {
  font-size: 1.15rem; color: #E6B307; margin-left: 10px; font-family: 'Noto Serif JP', serif;
}
.testimonial-card span {
  color: #888; font-size: .96rem; margin-left: 18px;
}

/* ===============================
  Buying Steps & FAQs (buying-guide)
=============================== */
.buying-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: decimal inside;
  margin-bottom: 18px;
  padding-left: 6px;
}
.buying-steps li {
  font-size: 1.07rem; color: #163560;
}
.faqs {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-left: 1px;
}
.faqs li {
  background: #FAFBFE;
  border-radius: 10px;
  padding: 13px 17px;
  border: 1px solid var(--divider);
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-size: 1.05rem;
}

/* ===============================
  Text Sections (privacy, gdpr, cookies, thanks)
=============================== */
.text-section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--bg-section);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}
.text-section .container { max-width: 800px; }
.text-section .content-wrapper {
  gap: 20px;
}
.text-section h1, .text-section h2 {
  color: var(--secondary);
}
.text-section ul {
  margin-bottom: 12px;
  margin-left: 20px;
}
.text-section li {
  margin-bottom: 7px;
}
.map-embed { margin-top: 16px; }
.map-embed img { width: 100%; max-width: 340px; border-radius: 8px; }

/* ===============================
  Filter Section (listings)
=============================== */
.filter-section {
  background: #EFF2F8;
  border-radius: 10px;
  padding: 18px 22px;
  color: #21457A;
  margin-bottom: 20px;
  box-shadow: 0 1.5px 7px rgba(22,53,96,0.05);
}
.filter-section ul { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 5px; margin-bottom: 10px; }
.filter-section li { font-size: .98rem; }
.filter-section span { font-weight: 500; margin-left: 2px; }

/* ===============================
  Footer
=============================== */
footer {
  background: var(--primary);
  color: var(--text-light);
  padding: 36px 0 18px 0;
  font-size: 0.98rem;
  position: relative;
  z-index: 2;
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: flex-start;
}
footer img { height: 36px; margin-bottom: 10px; }
footer .footer-nav {
  display: flex; flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 4px;
}
footer .footer-nav a {
  color: var(--accent);
  font-size: 1rem;
  border-radius: 5px;
  padding: 3px 9px;
  transition: background .17s, color .17s;
}
footer .footer-nav a:hover,
footer .footer-nav a:focus {
  background: var(--accent);
  color: var(--secondary);
}
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}
.footer-contact img { height: 18px; width:18px; margin-right: 4px; vertical-align: middle; }
.footer-contact span {
  color: #eee;
  margin-right: 9px;
}

@media (max-width: 700px) {
  footer .container {
    gap: 14px;
    align-items: flex-start;
  }
  .footer-contact { gap: 10px; }
}

/* ============================
  Responsive Adaptations
============================ */
@media (max-width: 1000px) {
  .container { max-width: 97vw; }
}
@media (max-width: 820px) {
  .feature-grid, .listing-grid, .review-list {
    flex-direction: column;
    gap: 15px;
  }
  .card, .property-card, .review-card {
    min-width: 0; width: 100%;
  }
}
@media (max-width: 768px) {
  .section,
  .text-section {
    padding: 28px 9px;
    margin-bottom: 28px;
  }
  .hero { padding: 26px 0 18px 0; }
  .content-wrapper { gap: 10px; }
  .text-image-section { flex-direction: column; align-items: stretch; gap: 20px; }
  .feature-grid, .listing-grid, .review-list {
    flex-direction: column;
    gap: 13px;
  }
  .footer-nav, .footer-contact {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===============================
  Buttons, Links, and Interactions
=============================== */
button, .cta-button {
  transition: background .18s, color .18s, box-shadow .17s, filter .17s;
}
a:focus, button:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Links in text */
.content-wrapper a:not(.cta-button):not(.mobile-menu-toggle):not(.mobile-menu-close),
.text-section a:not(.cta-button) {
  color: var(--secondary);
  text-decoration: underline;
  font-weight: 500;
  padding: 2px 4px;
  transition: color .16s, background .14s;
  border-radius: 4px;
}
.content-wrapper a:not(.cta-button):hover,
.text-section a:not(.cta-button):hover {
  color: var(--primary);
  background: var(--accent);
}

/* ===============================
  Animations & Microinteractions
=============================== */
.card, .property-card, .testimonial-card, .review-card {
  will-change: box-shadow, transform;
}
.cta-button {
  will-change: background, color, box-shadow, filter;
}
.mobile-menu, .cookie-banner, .cookie-modal {
  will-change: transform, opacity;
}

/* ===============================
  Cookie Consent Banner/System
=============================== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  background: #163560;
  color: #fff;
  padding: 18px 12px 18px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  z-index: 550;
  box-shadow: 0 -3px 18px rgba(26,26,46,0.13);
  transition: transform .3s cubic-bezier(0.77,0,0.18,1), opacity .2s;
  font-size: 1rem;
  border-radius: 18px 18px 0 0;
  max-width: 840px;
  margin: 0 auto;
  left: 0; right: 0;
}
.cookie-banner.hide {
  transform: translateY(100%);
  opacity: 0;
}
.cookie-banner .cookie-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cookie-banner button {
  border-radius: 15px;
  background: var(--accent);
  color: var(--secondary);
  border: none;
  padding: 7px 18px;
  font-size: 1rem;
  font-weight: bold;
  margin-right: 0;
  transition: background .16s, color .13s, box-shadow .14s;
  box-shadow: 0 1.5px 6px rgba(22,53,96,0.07);
}
.cookie-banner button:hover,
.cookie-banner button:focus {
  background: #fff0d4;
  color: var(--primary);
}
.cookie-banner .cookie-settings {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-weight: 500;
  margin-left: 5px;
}
.cookie-banner .cookie-settings:hover { background: #f8ecd8; color: var(--secondary); }
@media (max-width: 740px) {
  .cookie-banner { flex-direction: column; gap: 10px; font-size: .96rem; padding: 17px 10px 13px 10px; }
  .cookie-banner .cookie-buttons { width: 100%; justify-content: flex-end; }
}

/* Cookie Modal */
.cookie-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(26,26,46,0.83);
  z-index: 560;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .26s, transform .21s;
}
.cookie-modal.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(50px);
}
.cookie-modal .cookie-modal-content {
  background: #fff;
  color: var(--primary);
  padding: 36px 30px 32px 30px;
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(22,53,96,0.16);
  min-width: 320px;
  max-width: 94vw;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 19px;
  position: relative;
  font-size: 1rem;
}
.cookie-modal .close-cookie-modal {
  position: absolute;
  right: 12px; top: 10px;
  background: transparent;
  color: #163560;
  font-size: 1.5rem;
  width: 34px; height: 34px;
  border-radius: 50%;
  transition: background .14s;
}
.cookie-modal .close-cookie-modal:hover,
.cookie-modal .close-cookie-modal:focus {
  background: #f7e6c4;
}
.cookie-modal h2 {
  color: var(--secondary);
  margin-bottom: 9px; font-size: 1.2em;
}
.cookie-modal .cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 0;
}
.cookie-category label {
  font-weight: 600;
  font-size: 1rem;
  min-width: 110px;
}
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.cookie-switch input {
  opacity: 0;
  width: 0; height: 0;
}
.cookie-slider {
  position: absolute;
  cursor: pointer;
  top:0; left:0;
  right:0; bottom:0;
  background: #dfe3ed;
  border-radius: 13px;
  transition: background .13s;
}
.cookie-switch input:checked + .cookie-slider {
  background: var(--secondary);
}
.cookie-slider:before {
  content: '';
  position: absolute;
  height: 20px; width: 20px;
  left: 2px; bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform .17s;
  box-shadow: 0 1.5px 4px rgba(126,126,150,0.10);
}
.cookie-switch input:checked + .cookie-slider:before {
  transform: translateX(20px);
}
.cookie-category .cookie-desc {
  color: #7b839c; font-size: .97rem; margin-left: 10px;
}
.cookie-modal .cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.cookie-modal .cookie-actions button {
  border-radius: 14px;
  background: var(--secondary);
  color: var(--accent);
  border: none;
  padding: 7px 20px;
  font-size: 1.04rem;
  font-weight: bold;
  margin-right: 0;
  transition: background .15s, color .12s, box-shadow .15s;
  box-shadow: 0 2px 7px rgba(22,53,96,0.09);
}
.cookie-modal .cookie-actions button:hover,
.cookie-modal .cookie-actions button:focus {
  background: var(--primary);
  color: #fff;
}

/* ===============================
  Utility (Divider, Spacing, etc)
=============================== */
.divider {
  width: 100%; height: 1px;
  background: var(--divider);
  margin: 28px 0;
}
.gap-16 { gap: 16px !important; }
.gap-24 { gap: 24px !important; }
.mb-20 { margin-bottom: 20px !important; }
.mb-32 { margin-bottom: 32px !important; }
.mt-20 { margin-top: 20px !important; }

/* Hide scroll for overlays (for mobile menu/cookie modal) */
body.menu-open,
body.cookie-modal-open {
  overflow: hidden;
  touch-action: none;
}

/* ===============================
  Accessibility
=============================== */
.skip-link {
  position: absolute;
  left: -120px;
  top: 10px;
  background: var(--secondary);
  color: var(--accent);
  padding: 10px 24px;
  z-index: 6000;
  border-radius: 0 16px 16px 0;
  transition: left 0.2s;
  font-size: 1rem;
}
.skip-link:focus { left: 0; }

/* =========== END OF CSS =========== */
