/* P&R — pandrjapan.com */

:root {
  --navy: #132033;
  --navy-2: #1b2c41;
  --navy-deep: #0d1724;
  --ink: #1a1f29;
  --slate: #3e4652;
  --muted: #5a6270;
  --line: #d8d3c9;
  --line-strong: #c6c0b4;
  --paper: #f6f3ed;
  --paper-2: #efebe3;
  --white: #fcfbf8;
  --accent: #b08a4a;
  --accent-soft: #ede3d0;
  --warm: #e8dec8;
  --focus: #b08a4a;
  --header-h: 4.25rem;
  --font-sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, "Noto Sans CJK JP", sans-serif;
  --font-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif CJK JP", serif;
  --max: 70rem;
  --content: 42rem;
  --pad: 1.25rem;
  --radius: 0.75rem;
  --shadow: 0 1px 2px rgba(19, 32, 51, 0.04), 0 8px 24px rgba(19, 32, 51, 0.05);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html[lang="ja"] body {
  line-height: 1.85;
  letter-spacing: 0.02em;
  line-break: strict;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.3; color: var(--navy); letter-spacing: 0; }
html[lang="ja"] h1,
html[lang="ja"] h2,
html[lang="ja"] h3 {
  letter-spacing: 0.06em;
  line-height: 1.45;
  font-feature-settings: "palt" 1;
}

p, ul, ol { margin: 0; }
ul, ol { padding: 0; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 0.9rem;
  border-radius: 0.25rem;
  text-decoration: none;
  font-size: 0.9rem;
}
.skip:focus { top: 0.75rem; }

.wrap {
  width: min(var(--max), 100% - (var(--pad) * 2));
  margin-inline: auto;
}

/* ----- Header ----- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1.15rem;
  min-height: var(--header-h);
  padding-block: 0.65rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand img {
  height: 2.65rem;
  width: auto;
}
.brand:hover { opacity: 0.82; }
.brand:focus-visible { outline-offset: 4px; }

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
  flex: 1 0 100%;
  order: 3;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.primary-nav a {
  text-decoration: none;
  color: var(--slate);
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
}
.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--navy);
  border-bottom-color: var(--accent);
}

.lang {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.lang a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.2rem 0.35rem;
  border-radius: 0.25rem;
}
.lang a:hover { color: var(--navy); }
.lang a[aria-current="page"] {
  color: var(--navy);
  background: var(--accent-soft);
}
.lang .sep {
  color: var(--line-strong);
  user-select: none;
}

@media (min-width: 800px) {
  .header-bar { flex-wrap: nowrap; }
  .brand img { height: 2.85rem; }
  .primary-nav {
    flex: 1 1 auto;
    order: 0;
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
    font-size: 0.95rem;
  }
  .lang { margin-left: 1.35rem; }
}

/* ----- Hero ----- */

.hero {
  padding: 3.25rem 0 3.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
html[lang="ja"] .eyebrow {
  letter-spacing: 0.14em;
  text-transform: none;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  margin: 0 0 1.15rem;
  font-size: clamp(1.85rem, 6.2vw, 3.05rem);
  font-weight: 600;
  line-height: 1.22;
  max-width: 17.5em;
  color: var(--navy);
}
html[lang="ja"] .hero h1 {
  max-width: 11em;
  font-size: clamp(1.7rem, 5.6vw, 2.7rem);
  line-height: 1.4;
}

.lead {
  max-width: 38rem;
  margin: 0 0 1.85rem;
  color: var(--slate);
  font-size: 1.08rem;
  line-height: 1.8;
}
html[lang="ja"] .lead {
  font-size: 1.05rem;
  line-height: 1.95;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ----- Buttons ----- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 1.25rem;
  border-radius: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-primary:hover {
  background: var(--navy-2);
  border-color: var(--navy-2);
}
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  border-color: var(--navy);
  background: var(--white);
}
.btn-on-dark {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}
.btn-on-dark:hover {
  background: var(--warm);
  border-color: var(--warm);
}

/* ----- Sections ----- */

.section {
  padding: 3.5rem 0;
}
.section-alt {
  background: var(--paper-2);
}
.section-kicker {
  margin: 0 0 0.45rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
html[lang="ja"] .section-kicker {
  letter-spacing: 0.16em;
  text-transform: none;
}
/* Accent is 2.88:1 on paper — too low for text. Use navy + a gold rule instead. */
.section-kicker {
  color: var(--muted);
}
.section-kicker::after {
  content: "";
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--accent);
  margin: 0.55rem 0 0;
}
.section h2 {
  margin: 0 0 2rem;
  font-size: clamp(1.55rem, 3.5vw, 2.05rem);
}

/* ----- Service cards ----- */

.cards {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 800px) {
  .cards { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.45rem 1.7rem;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--accent);
}
.card-index {
  margin: 0 0 0.7rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.card h3 {
  margin: 0 0 0.85rem;
  font-size: 1.28rem;
}
.card > p {
  color: var(--slate);
  margin-bottom: 1.05rem;
}
.card ul {
  list-style: none;
  display: grid;
  gap: 0.7rem;
}
.card li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.65;
}
.card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.45rem;
  height: 1px;
  background: var(--accent);
}

/* ----- Process ----- */

.steps {
  list-style: none;
  display: grid;
  gap: 1.5rem;
  counter-reset: step;
}
@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 0.25rem;
}
.step-num {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.65rem;
  color: var(--navy);
  margin-bottom: 0.45rem;
  letter-spacing: 0.04em;
}
.step-num::after {
  content: "";
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--accent);
  margin-top: 0.45rem;
}
.steps h3 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
}
.steps p { color: var(--slate); font-size: 0.98rem; }

/* ----- Why ----- */

.qualities {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 800px) {
  .qualities { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}
.quality h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}
.quality p { color: var(--slate); font-size: 0.98rem; }

/* ----- Contact ----- */

.contact {
  background: var(--navy);
  color: var(--white);
  padding: 4rem 0 4.25rem;
}
.contact h2,
.contact .section-kicker { color: var(--white); }
.contact .section-kicker { color: var(--warm); }
.contact .section-kicker::after { background: var(--accent); }
.contact h2 { margin-bottom: 1rem; }
.contact .intro {
  max-width: 34rem;
  color: var(--warm);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}
.contact-email {
  display: inline-block;
  color: var(--white);
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.15rem;
  margin-bottom: 1.5rem;
  word-break: break-all;
}
.contact-email:hover { border-bottom-color: var(--white); }
.contact .person {
  margin: 0 0 1.5rem;
  color: var(--warm);
  font-size: 0.95rem;
}

/* ----- Footer ----- */

.site-footer {
  background: var(--navy-deep);
  color: var(--warm);
  padding: 2.25rem 0 2.4rem;
  font-size: 0.85rem;
}
.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.5rem;
}
.footer-brand img {
  height: 2.1rem;
  width: auto;
  opacity: 0.95;
}
.footer-brand { text-decoration: none; }
.footer-copy { margin-right: auto; }
.site-footer .lang a { color: var(--warm); }
.site-footer .lang a[aria-current="page"] {
  color: var(--navy);
  background: var(--warm);
}
.site-footer .lang a:hover { color: var(--white); }

/* ----- 404 ----- */

.page-404 {
  min-height: calc(100dvh - 8rem);
  display: grid;
  align-items: center;
  padding: 3rem 0;
}
.page-404 h1 { margin-bottom: 0.75rem; }
.page-404 p { color: var(--slate); margin-bottom: 1.5rem; max-width: 28rem; }

/* ----- Misc ----- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

@media print {
  .site-header, .hero-actions, .site-footer .lang { display: none; }
  .contact { background: none; color: var(--ink); border-top: 1px solid var(--line); }
  .contact h2, .contact .intro, .contact-email, .contact .person { color: var(--ink); }
  body { background: #fff; }
}

.nowrap { white-space: nowrap; }

/* Footer: keep mark and copyright together, lang on the right */
.footer-bar { row-gap: 0.7rem; }
.footer-brand img { height: 2.25rem; }
