/* OLEOLY — site layer on top of the design's inline styles.
   Inline styles carry the PC design (and fluid clamp() sizes);
   this file adds the shared basics and the tablet / smartphone layout. */

html { background: #222326; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; overflow-x: clip; }
main { display: block; }
a { color: #222326; }
a:hover { color: #5E4A33; }
[id] { scroll-margin-top: 104px; }
@media (max-width: 960px) { [id] { scroll-margin-top: 80px; } }
img { height: auto; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid #222326; outline-offset: 3px;
}
.site-footer a:focus-visible, .site-footer button:focus-visible { outline-color: #FFFFFF; }
input[type="text"]:focus, input[type="email"]:focus, input[type="url"]:focus, textarea:focus {
  outline: none; border: 2px solid #222326 !important; box-shadow: 0 0 0 4px rgba(34,35,38,0.14);
}
button[type="submit"]:hover { background: #3A3B3F !important; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: #222326; color: #FFFFFF; border-radius: 6px; font: 700 14px/1 'Noto Sans JP', sans-serif; text-decoration: none; }
.skip:focus { top: 12px; color: #FFFFFF; }

/* ---------- header / mobile menu ---------- */
.site-header { position: sticky; top: 0; z-index: 50; }
.menu-btn { display: none; width: 44px; height: 44px; padding: 0; border: none; background: transparent; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }
.mnav { display: none; }

/* ---------- screen mocks (scaled as one picture by site.js) ---------- */
.mock { overflow: hidden; }
.mock-in { position: absolute; left: 0; top: 0; transform-origin: top left; }
.sp-only { display: none !important; }

/* ---------- contact form ---------- */
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cf-turnstile { min-height: 65px; }
.turnstile-slot:empty { display: none; }
.field-error { margin: 0; display: flex; gap: 6px; font-size: 14px; line-height: 1.6; font-weight: 700; color: #A23B2C; }
.field-error svg { flex-shrink: 0; margin-top: 3px; }
[aria-invalid="true"] { border: 2px solid #A23B2C !important; }
.form-alert { display: flex; align-items: flex-start; gap: 10px; padding: 14px 18px; border-radius: 8px; font-size: 15px; line-height: 1.6; font-weight: 700; }
.form-alert svg { flex-shrink: 0; margin-top: 1px; }
.form-alert.is-error { background: #F8E9E6; border: 1px solid #E3B8B0; color: #A23B2C; }
.form-alert.is-warning { background: #F6EDDF; border: 1px solid #E2CBA6; color: #7A4E1A; }
.form-alert.is-info { background: #E9EEF2; border: 1px solid #BFCCD8; color: #34506A; }
.form-alert a { color: inherit; }
#f-submit[aria-busy="true"] { background: #4A4743 !important; }

/* =========================================================
   Tablet
   ========================================================= */
@media (max-width: 1100px) {
  .rg5 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .rg4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .rgx, .rga { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (max-width: 960px) {
  .site-header .hdr-in { height: 60px !important; padding: 0 12px 0 20px !important; gap: 8px !important; }
  .site-header .hdr-logo img { height: auto !important; width: 120px !important; }
  .site-header .site-nav { display: none !important; }
  .site-header .hdr-cta { margin-left: auto; height: 44px !important; padding: 0 7px 0 14px !important; font-size: 13px !important; }
  .menu-btn { display: flex; }
  .mnav { position: absolute; left: 0; right: 0; top: 100%; background: #F5EFE6; border-bottom: 1px solid #E6DED2; box-shadow: 0 16px 32px rgba(34,35,38,0.10); padding: 8px 20px 24px; }
  .mnav.is-open { display: block; }
  .mnav ul { margin: 0; padding: 0; list-style: none; }
  .mnav li + li { border-top: 1px solid #E6DED2; }
  .mnav a { display: flex; align-items: center; justify-content: space-between; min-height: 56px; font-family: 'Nunito', sans-serif; font-size: 18px; font-weight: 700; color: #222326; text-decoration: none; }
  .mnav a::after { content: "→"; font-size: 16px; color: #6B6358; }
  .mnav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
  .mnav-note { margin: 12px 0 0; font: 400 13px/1.6 'Noto Sans JP', sans-serif; color: #6B6358; }

  .rg2, .rgf { grid-template-columns: minmax(0, 1fr) !important; }
  .rg3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* =========================================================
   Smartphone
   ========================================================= */
@media (max-width: 760px) {
  .rg3, .rg4, .rg5 { grid-template-columns: minmax(0, 1fr) !important; }
  .rf { flex-direction: column !important; align-items: flex-start !important; }
  .pc-only { display: none !important; }
  .sp-only { display: flex !important; }
  /* long inline line breaks written for PC are relaxed */
  h1, h2, h3 { word-break: auto-phrase; }
}

@media (max-width: 380px) {
  .site-header .hdr-logo img { width: 100px !important; }
  .site-header .hdr-in { padding: 0 8px 0 16px !important; }
}

/* ---------- team cards & arrows on small screens ---------- */
@media (max-width: 900px) {
  .rgf > .arrow-h { transform: rotate(90deg); height: 40px; }
}
@media (max-width: 760px) {
  .team-card { display: grid !important; grid-template-columns: 112px minmax(0, 1fr); column-gap: 16px; row-gap: 8px; padding: 16px; align-items: start; }
  .team-card > :first-child { grid-row: 1 / span 3; width: 112px !important; aspect-ratio: 4 / 5; height: auto; border-radius: 8px; overflow: hidden; }
  .team-card > div[role="img"] > span { font-size: 11px !important; }
  .team-card > div[role="img"] > svg { width: 36px; height: 36px; }
  .team-card > :nth-child(2) { display: contents !important; }
  .team-card > :nth-child(2) > * { grid-column: 2; }
  .team-card > :nth-child(2) > :nth-child(n+4) { grid-column: 1 / -1; }
}

/* ---------- typography niceties ---------- */
h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }

@media (max-width: 760px) {
  dl .rgf { row-gap: 4px !important; }
  #f-topic label { height: auto !important; min-height: 44px; padding-top: 8px !important; padding-bottom: 8px !important; flex-wrap: wrap; }
  #contact-form span[style*="font-size: 11px"] { white-space: nowrap; flex-shrink: 0; }
}

/* tags that jump to a section keep the tag look, with a hover cue */
a[href^="#"][style*="background: rgba(255,255,255,0.10)"]:hover { background: rgba(255,255,255,0.24) !important; color: #FFFFFF !important; }

/* ---------- TEAM (2 members): 2 columns, then 1 column on phones ---------- */
@media (max-width: 760px) {
  .team-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
