/* =========================================================
   Trust Realty — Common foundation
   Shared reset + tokens + header/footer for all 3 variants.
   Each variant overrides on top of this file.
   ========================================================= */

:root {
  /* Warm brand palette — slightly muted from original for premium feel */
  --cream: #F7F1E8;
  --cream-2: #EFE6D6;
  --sand: #E4D5BE;
  --ink: #1F1712;
  --ink-2: #4A3B30;
  --ink-3: #7B6A5C;
  --line: #E6D9C4;
  --line-2: #D8C7AB;
  --orange: #C4622D;
  --orange-2: #A44E20;
  --clay: #8B4A2B;
  --gold: #C48A2C;
  --white: #FFFFFF;
  --near-white: #FBF8F2;

  --maxw: 1240px;
  --gutter: 40px;

  --f-jp: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --f-en: "Cormorant Garamond", "Times New Roman", serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-jp);
  color: var(--ink);
  background: var(--near-white);
  font-weight: 400;
  line-height: 1.85;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Layout container */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 720px) { :root { --gutter: 22px; } }

/* Typography helpers */
.en {
  font-family: var(--f-en);
  font-style: italic;
  letter-spacing: .01em;
}
.mono {
  font-family: var(--f-mono);
  letter-spacing: .04em;
  font-weight: 500;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--orange-2);
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: currentColor;
}

/* ---------- Header (shared skeleton) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 100;
  padding: 20px 0;
  transition: background .35s var(--ease), padding .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.solid {
  background: rgba(251,248,242,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding: 14px 0;
}
.site-header.plain {
  background: var(--near-white);
  border-bottom-color: var(--line);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink); font-weight: 600; font-size: 16px;
  letter-spacing: .02em;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--ink); color: var(--near-white);
  display: grid; place-items: center;
  font-family: var(--f-en); font-style: italic; font-size: 18px; font-weight: 500;
  line-height: 1;
}
.brand-mark::after { content: "T"; transform: translateY(-1px); }
.brand-text small {
  display: block; font-size: 10px; letter-spacing: .22em;
  color: var(--ink-3); font-weight: 400; margin-top: 2px;
}

.gnav {
  display: flex; align-items: center; gap: 32px;
}
.gnav a {
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  position: relative; padding: 4px 0;
  transition: color .2s var(--ease);
}
.gnav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 1px; background: var(--orange-2);
  transition: right .3s var(--ease);
}
.gnav a:hover { color: var(--ink); }
.gnav a:hover::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.dropdown { position: relative; }
.dropdown-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--line-2);
  color: var(--ink-2); padding: 9px 16px 9px 18px;
  border-radius: 999px; font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: all .2s var(--ease);
}
.dropdown-toggle:hover { background: var(--cream); border-color: var(--ink-3); color: var(--ink); }
.dropdown-toggle .caret {
  width: 6px; height: 6px;
  border-right: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s var(--ease);
}
.dropdown.open .dropdown-toggle .caret { transform: rotate(-135deg) translate(-1px, -1px); }
.dropdown-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 6px; box-shadow: 0 20px 40px -12px rgba(31,23,18,.14);
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.dropdown.open .dropdown-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.dropdown-menu a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 6px;
  font-size: 13px; color: var(--ink-2); font-weight: 500;
}
.dropdown-menu a::after {
  content: "→"; font-family: var(--f-en); color: var(--ink-3);
  transform: translateX(-4px); opacity: 0;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.dropdown-menu a:hover { background: var(--cream); color: var(--ink); }
.dropdown-menu a:hover::after { opacity: 1; transform: translateX(0); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; background: var(--ink); color: var(--near-white);
  border-radius: 999px; font-size: 12.5px; font-weight: 500;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.btn-primary:hover { background: var(--orange-2); transform: translateY(-1px); }
.btn-primary::after { content: "→"; font-family: var(--f-en); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 8px; width: 40px; height: 40px;
}
.nav-toggle span {
  display: block; width: 22px; height: 1.5px; background: var(--ink);
  margin: 5px auto; transition: transform .3s var(--ease), opacity .2s;
}

@media (max-width: 960px) {
  .gnav {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px);
    background: var(--near-white); flex-direction: column; align-items: flex-start;
    gap: 0; padding: 100px 32px 40px;
    transform: translateX(100%); transition: transform .4s var(--ease);
    box-shadow: -20px 0 40px -20px rgba(31,23,18,.2);
  }
  .gnav.open { transform: translateX(0); }
  .gnav a { padding: 16px 0; border-bottom: 1px solid var(--line); width: 100%; font-size: 15px; }
  .nav-toggle { display: block; z-index: 110; }
  .site-header .header-actions .dropdown { display: none; }
  .site-header .header-actions .btn-primary { padding: 8px 14px; font-size: 12px; }
}

/* Skip to content */
.skip {
  position: absolute; top: -60px; left: 20px;
  background: var(--ink); color: var(--white); padding: 8px 16px;
  border-radius: 4px; z-index: 200; font-size: 13px;
}
.skip:focus { top: 20px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(247,241,232,.75);
  padding: 80px 0 32px;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(247,241,232,.12);
}
@media (max-width: 840px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .site-footer { padding-top: 56px; }
}
.footer-brand {
  color: var(--near-white);
  font-family: var(--f-en); font-style: italic; font-size: 26px;
  margin: 0 0 14px;
}
.footer-brand + p {
  font-size: 13px; line-height: 1.9; margin: 0 0 20px;
  color: rgba(247,241,232,.6);
}
.footer-tel {
  font-family: var(--f-en); font-size: 22px; color: var(--near-white);
  letter-spacing: .02em; display: block; margin-top: 4px;
}
.footer-col h4 {
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--orange); font-weight: 500;
  margin: 0 0 20px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 12px; font-size: 13px; }
.footer-col a { color: rgba(247,241,232,.75); transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--near-white); }
.footer-bottom {
  padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 11px; letter-spacing: .12em; color: rgba(247,241,232,.4);
}
.footer-bottom .en { font-style: normal; letter-spacing: .2em; }

/* ---------- Utility ---------- */
.section { padding: 140px 0; }
@media (max-width: 840px) { .section { padding: 88px 0; } }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Fade-in on scroll — JS opts in by adding `.js` on <html> */
.js .reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  will-change: opacity, transform;
}
.js .reveal.in { opacity: 1; transform: translateY(0); }
.js .reveal[data-delay="1"] { transition-delay: .1s; }
.js .reveal[data-delay="2"] { transition-delay: .2s; }
.js .reveal[data-delay="3"] { transition-delay: .3s; }
.js .reveal[data-delay="4"] { transition-delay: .4s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Forms shared */
.form-section { background: var(--near-white); padding-top: 64px; padding-bottom: 140px; }
.page-banner {
  padding: 88px 0;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.page-banner .breadcrumb {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 26px;
}
.page-banner .breadcrumb a:hover { color: var(--orange-2); }
.page-banner .breadcrumb span { color: var(--line-2); }
.page-banner h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500; letter-spacing: .02em; line-height: 1.4;
  margin: 0 0 16px; color: var(--ink);
}
.page-banner .lede {
  font-size: 15px; color: var(--ink-2); max-width: 60ch;
  line-height: 1.9; margin: 0;
}

.form-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 4px; padding: 56px;
  max-width: 780px;
  box-shadow: 0 30px 60px -30px rgba(31,23,18,.1);
}
@media (max-width: 640px) { .form-card { padding: 32px 22px; } }
.form-note {
  background: transparent; border-left: 2px solid var(--orange);
  padding: 4px 0 4px 20px; font-size: 13px; color: var(--ink-2);
  margin: 0 0 40px; max-width: 780px; line-height: 1.85;
}
.form-row { margin-bottom: 28px; }
.form-row label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--ink); margin-bottom: 10px;
  letter-spacing: .06em; text-transform: uppercase;
}
.form-row .req {
  display: inline-block; color: var(--orange-2);
  font-size: 10px; font-weight: 600; margin-left: 8px;
  letter-spacing: .1em;
}
.form-row .opt {
  display: inline-block; color: var(--ink-3);
  font-size: 10px; font-weight: 500; margin-left: 8px;
  letter-spacing: .1em;
}
.form-row input[type="text"], .form-row input[type="tel"],
.form-row input[type="email"], .form-row input[type="date"],
.form-row input[type="file"], .form-row select, .form-row textarea {
  width: 100%; padding: 14px 16px;
  border: 1px solid var(--line-2); border-radius: 4px;
  font-family: inherit; font-size: 14.5px; color: var(--ink);
  background: var(--near-white);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.form-row textarea { min-height: 150px; resize: vertical; line-height: 1.8; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--ink); background: #fff;
}
.form-row .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 8px; letter-spacing: .04em; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 640px) { .form-grid-2 { grid-template-columns: 1fr; } }
.checkbox-row {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 13px; color: var(--ink-2); margin: 36px 0 32px;
  padding: 20px; background: var(--cream); border-radius: 4px;
}
.checkbox-row input { margin-top: 4px; accent-color: var(--orange-2); }
.checkbox-row a { color: var(--orange-2); text-decoration: underline; text-underline-offset: 3px; }
.form-submit {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 40px; background: var(--ink); color: var(--near-white);
  border: none; border-radius: 999px; font-size: 14px; font-weight: 500;
  letter-spacing: .04em; cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.form-submit::after { content: "→"; font-family: var(--f-en); font-style: italic; }
.form-submit:hover { background: var(--orange-2); transform: translateY(-2px); }
.form-success {
  display: none; text-align: center; padding: 80px 40px;
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
  max-width: 780px;
}
.form-success .check {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--cream); color: var(--orange-2);
  margin: 0 auto 24px;
  display: grid; place-items: center;
}
.form-success h3 { margin: 0 0 12px; font-size: 22px; font-weight: 500; letter-spacing: .04em; }
.form-success p { margin: 0; color: var(--ink-2); font-size: 14px; }

.form-error {
  display: none; background: #fdecea; border: 1px solid #f2b8b5; color: #7a1f1a;
  border-radius: 4px; padding: 16px 20px; font-size: 13.5px; line-height: 1.7;
  margin: 0 0 28px;
}
.form-error.is-visible { display: block; }
.form-submit[disabled] { opacity: .55; cursor: not-allowed; }
.form-submit[disabled]::after { content: ""; }

.field-error {
  display: block; color: #a4342c; font-size: 12px; margin-top: 8px; letter-spacing: .02em;
}
.form-row input.has-error, .form-row select.has-error, .form-row textarea.has-error {
  border-color: #d98c85; background: #fff8f7;
}

.confirm-list { list-style: none; margin: 0 0 36px; padding: 0; max-width: 780px; }
.confirm-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.confirm-list li:first-child { border-top: 1px solid var(--line); }
.confirm-list .term {
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 8px;
}
.confirm-list .desc { font-size: 14.5px; color: var(--ink); line-height: 1.85; white-space: pre-wrap; }

.confirm-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 18px 32px; background: transparent; color: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; font-weight: 500;
  letter-spacing: .04em; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.btn-secondary:hover { background: var(--cream); border-color: var(--ink-3); }

.form-success.is-visible { display: block; }

/* Policy / legal content pages (privacy, sales policy) */
.policy-section { padding: 88px 0 140px; background: var(--near-white); }
.policy-content { max-width: 760px; }
.policy-content .lead-text {
  margin: 0 0 44px; color: var(--ink-2); line-height: 1.95; font-size: 14.5px;
}
.policy-content dl { margin: 0; }
.policy-content dt {
  font-size: 15px; font-weight: 500; color: var(--ink);
  margin: 0 0 14px; padding-top: 36px; border-top: 1px solid var(--line);
}
.policy-content dt:first-of-type { padding-top: 0; border-top: none; }
.policy-content dd { margin: 0 0 8px; font-size: 14px; line-height: 1.95; color: var(--ink-2); }
.policy-content dd ul { margin: 14px 0 0; padding-left: 1.3em; }
.policy-content dd li { margin-bottom: 6px; }
.policy-content .contact-block {
  margin-top: 16px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 4px;
  font-size: 13.5px; line-height: 1.9; color: var(--ink-2);
}
.policy-content .contact-block strong { color: var(--ink); font-weight: 500; }

.policy-content h2 {
  font-size: 15px; font-weight: 500; color: var(--ink);
  margin: 40px 0 14px;
}
.policy-content h2:first-child { margin-top: 0; }
.policy-content ol.numbered { margin: 0 0 28px; padding-left: 1.4em; }
.policy-content ol.numbered > li { margin-bottom: 20px; font-size: 14px; line-height: 1.95; color: var(--ink-2); }
.policy-content ol.numbered > li > ul { margin: 10px 0 0; padding-left: 1.3em; list-style: "◆  "; }
.policy-content ol.numbered > li > ul li { margin-bottom: 8px; }

/* 404 page */
.error-section {
  padding: 200px 0; background: var(--near-white); text-align: center;
}
.error-section .code {
  font-family: var(--f-en); font-style: italic; font-size: clamp(56px, 10vw, 120px);
  color: var(--orange); line-height: 1; margin: 0 0 8px;
}
.error-section h1 { font-size: 20px; font-weight: 500; margin: 0 0 20px; color: var(--ink); }
.error-section p { font-size: 14px; color: var(--ink-2); margin: 0 0 40px; line-height: 1.9; }
