/* Inner Compass Portal (static) - local-only styles
   - No CDN dependencies
   - Supports reduced motion
*/

:root {
  --paper: #faf8f5;
  --paper-2: #f0ebe3;
  --ink: #3d2f24;
  --ink-2: #5c4a37;
  --muted: #6b5740;
  --line: rgba(176, 154, 120, 0.45);
  --card: rgba(255, 255, 255, 0.72);
  --card-2: rgba(255, 255, 255, 0.55);
  --navy: #1e2a3a;
  --navy-2: #334663;

  --radius-lg: 18px;
  --radius-md: 14px;

  --shadow-sm: 0 10px 30px rgba(61, 47, 36, 0.06);
  --shadow-md: 0 16px 50px rgba(61, 47, 36, 0.10);

  --max-w: 1040px;
  --max-w-narrow: 760px;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans CN",
    Arial, sans-serif;
  --font-serif: ui-serif, "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC",
    "Source Han Serif CN", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Paper texture (local, inline) */
.paper {
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(79, 106, 142, 0.12), transparent 65%),
    radial-gradient(900px 520px at 12% 10%, rgba(139, 115, 85, 0.10), transparent 60%),
    radial-gradient(900px 520px at 88% 15%, rgba(51, 70, 99, 0.10), transparent 60%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
}

.container {
  width: min(var(--max-w), calc(100% - 48px));
  margin: 0 auto;
}
.container--narrow {
  width: min(var(--max-w-narrow), calc(100% - 48px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(61, 47, 36, 0.15);
  border-radius: 10px;
  z-index: 9999;
}
.skip-link:focus { left: 12px; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(224, 213, 198, 0.60);
  background: rgba(250, 248, 245, 0.72);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(51, 70, 99, 0.08), rgba(139, 115, 85, 0.10));
  border: 1px solid rgba(61, 47, 36, 0.12);
  box-shadow: 0 10px 30px rgba(30, 42, 58, 0.08);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.brand__mark img { width: 26px; height: 26px; display: block; }
.brand__name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}
.brand__company {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 14px;
  color: var(--ink);
}
.brand__sub {
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(107, 87, 64, 0.78);
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav a {
  text-decoration: none;
  color: rgba(61, 47, 36, 0.86);
  font-size: 13px;
  letter-spacing: 0.12em;
  padding: 10px 10px;
  border-radius: 12px;
  transition: background 160ms ease, color 160ms ease;
}
.nav a:hover {
  background: rgba(255, 255, 255, 0.50);
  color: var(--ink);
}
.nav a:focus-visible {
  outline: 2px solid rgba(79, 106, 142, 0.45);
  outline-offset: 2px;
}

/* Hero */
.hero {
  position: relative;
  padding: 86px 0 66px;
}
.hero__bg {
  position: absolute;
  inset: -80px 0 auto 0;
  height: 520px;
  pointer-events: none;
  opacity: 1;
}
.hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 420px at 50% 20%, rgba(79, 106, 142, 0.20), transparent 60%),
    radial-gradient(900px 440px at 30% 10%, rgba(139, 115, 85, 0.16), transparent 60%),
    radial-gradient(900px 440px at 70% 12%, rgba(51, 70, 99, 0.14), transparent 60%);
  filter: blur(0px);
  animation: heroGlow 12s ease-in-out infinite;
}
.hero__ink {
  position: absolute;
  left: 50%;
  top: 40px;
  width: min(1100px, 140%);
  transform: translateX(-50%);
  opacity: 0.35;
  mix-blend-mode: multiply;
}
.hero__ink img { width: 100%; height: auto; display: block; }
.hero__compass {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 360px;
  height: 360px;
  transform: translateX(-50%);
  opacity: 0.26;
  filter: drop-shadow(0 18px 50px rgba(30, 42, 58, 0.12));
  animation: compassRotate 48s linear infinite;
}
.hero__compass img { width: 100%; height: 100%; display: block; }

.hero__content {
  position: relative;
  text-align: center;
}
.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto 18px;
  color: rgba(107, 87, 64, 0.75);
  font-size: 12px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}
.hero__kicker::before,
.hero__kicker::after {
  content: "";
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.hero__title {
  margin: 0 auto 14px;
  font-family: var(--font-serif);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.12em;
  line-height: 1.3;
  font-size: clamp(30px, 4.2vw, 56px);
}
.hero__subtitle {
  margin: 0 auto;
  max-width: 42ch;
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.95;
  color: rgba(107, 87, 64, 0.82);
  letter-spacing: 0.04em;
}
.hero__divider {
  margin: 24px auto 0;
  width: 180px;
  height: 20px;
  opacity: 0.9;
}
.hero__divider img { width: 100%; height: 100%; display: block; }
.hero__meta {
  margin: 26px auto 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pill {
  font-size: 12px;
  letter-spacing: 0.10em;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(61, 47, 36, 0.10);
  background: rgba(255, 255, 255, 0.42);
  color: rgba(61, 47, 36, 0.76);
}

/* Sections */
.section {
  position: relative;
  padding: 86px 0;
}
.section--tint {
  background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.22));
  border-top: 1px solid rgba(224, 213, 198, 0.40);
  border-bottom: 1px solid rgba(224, 213, 198, 0.40);
}
.section__header {
  text-align: center;
  margin-bottom: 34px;
}
.eyebrow {
  margin: 0 0 10px 0;
  font-size: 12px;
  letter-spacing: 0.34em;
  color: rgba(107, 87, 64, 0.76);
}
.headline {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 750;
  letter-spacing: 0.10em;
  color: var(--ink);
  font-size: clamp(22px, 2.7vw, 34px);
  line-height: 1.35;
}
.ornament {
  width: 120px;
  height: 18px;
  margin: 14px auto 0;
  opacity: 0.85;
}
.ornament img { width: 100%; height: 100%; display: block; }

.prose {
  font-size: 14.5px;
  line-height: 2.05;
  letter-spacing: 0.03em;
  color: rgba(92, 74, 55, 0.92);
  text-align: justify;
}
.prose p { margin: 0 0 14px 0; }
.prose p:last-child { margin-bottom: 0; }
.indent { text-indent: 2em; }

/* Services */
.grid {
  display: grid;
  gap: 18px;
}
.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.card {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(224, 213, 198, 0.70);
  border-radius: var(--radius-lg);
  padding: 26px 24px 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: -40% -40% auto -40%;
  height: 160px;
  background: radial-gradient(220px 120px at 50% 50%, rgba(79, 106, 142, 0.18), transparent 70%);
  transform: rotate(-8deg);
  opacity: 0.9;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(176, 154, 120, 0.65);
}
.card__icon {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  background: rgba(30, 42, 58, 0.04);
  border: 1px solid rgba(30, 42, 58, 0.08);
}
.card__icon svg {
  width: 28px;
  height: 28px;
  color: var(--navy-2);
}
.card__title {
  margin: 0;
  text-align: center;
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--ink);
  font-size: 18px;
}
.card__divider {
  width: 86px;
  height: 16px;
  margin: 10px auto 12px;
  opacity: 0.85;
}
.card__divider img { width: 100%; height: 100%; display: block; }
.card__text {
  margin: 0;
  text-align: center;
  color: rgba(107, 87, 64, 0.86);
  font-size: 13.5px;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

/* Contact */
.contactGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 720px;
  margin: 0 auto;
}
.infoCard {
  background: var(--card-2);
  border: 1px solid rgba(224, 213, 198, 0.55);
  border-radius: var(--radius-lg);
  padding: 18px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}
.infoCard__icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(30, 42, 58, 0.04);
  border: 1px solid rgba(30, 42, 58, 0.08);
  flex: 0 0 auto;
}
.infoCard__icon svg { width: 20px; height: 20px; color: var(--navy-2); }
.infoCard__label {
  margin: 0 0 6px 0;
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.10em;
  color: rgba(61, 47, 36, 0.88);
  font-size: 13px;
}
.infoCard__value {
  margin: 0;
  font-size: 13.5px;
  color: rgba(107, 87, 64, 0.86);
  line-height: 1.7;
}
.infoCard a { color: inherit; text-decoration: none; }
.infoCard a:hover { text-decoration: underline; }

/* Footer */
.footer {
  background: rgba(30, 42, 58, 0.04);
  border-top: 1px solid rgba(224, 213, 198, 0.70);
  padding: 26px 0;
  text-align: center;
}
.footer p {
  margin: 0;
  font-size: 12px;
  color: rgba(107, 87, 64, 0.78);
  letter-spacing: 0.02em;
}
.footer a {
  color: rgba(107, 87, 64, 0.78);
  text-decoration: none;
}
.footer a:hover { text-decoration: underline; }

/* Reveal animation (JS adds .is-visible) */
[data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 520ms ease, transform 520ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Motion */
@keyframes compassRotate { to { transform: translateX(-50%) rotate(360deg); } }
@keyframes heroGlow {
  0%, 100% { opacity: 0.85; filter: blur(0px); }
  50% { opacity: 1; filter: blur(0.2px); }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .hero { padding: 72px 0 54px; }
  .hero__compass { width: 300px; height: 300px; top: 18px; }
  .grid--3 { grid-template-columns: 1fr; }
  .contactGrid { grid-template-columns: 1fr; }
  .brand__company { letter-spacing: 0.14em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__bg::before,
  .hero__compass { animation: none !important; }
  .card, .nav a { transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
