:root {
  /* 80% Simple: Calm warm-ivory gallery neutrals & OmPage ink */
  --bg-canvas: #fcfbf8;
  --bg-surface: #ffffff;
  --bg-subtle: #f7f4ec;
  --bg-subtle-hover: #f1ede1;

  --ink-primary: #22252a;
  --ink-secondary: #555a64;
  --ink-muted: #7d828d;

  --border-subtle: #eae6dc;
  --border-hover: #dcd5c5;

  /* 10% Omurice + 10% Cute: Controlled brand accents from OmPage logo */
  --egg-soft: #fef6d2;
  --egg-mid: #fde047;
  --egg-gold: #fbbf24;
  --egg-amber: #d97706;
  --egg-ink: #8f5103;
  --sauce-red: #dc2626;

  --radius-card: 18px;
  --radius-Dialog: 22px;
  --radius-inner: 11px;

  --shadow-card: 0 2px 10px rgba(34, 37, 42, 0.03);
  --shadow-card-hover: 0 14px 32px rgba(34, 37, 42, 0.075);
  --shadow-dialog: 0 24px 64px rgba(24, 27, 32, 0.2);

  --font-sans: "Plus Jakarta Sans", "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", Meiryo, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--ink-primary);
  background-color: var(--bg-canvas);
  background-image: radial-gradient(
    ellipse 75% 420px at 50% 0%,
    rgba(253, 224, 71, 0.085),
    transparent 70%
  );
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

/* ===========================
   Header
   =========================== */
.site-header {
  border-bottom: 1px solid rgba(34, 37, 42, 0.06);
  background-color: rgba(252, 251, 248, 0.84);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 8px;
  transition: opacity 0.2s ease;
}

.brand-link:hover {
  opacity: 0.84;
}

.brand-link:focus-visible {
  outline: 2px solid var(--egg-gold);
  outline-offset: 4px;
}

.brand-logo {
  height: 36px;
  width: auto;
}

.company-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--ink-secondary);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.company-link:hover {
  background-color: var(--bg-subtle);
  border-color: var(--border-subtle);
  color: var(--ink-primary);
}

.company-link:focus-visible {
  outline: 2px solid var(--egg-gold);
  outline-offset: 2px;
}

/* ===========================
   OmPage Intro
   =========================== */
.main-content {
  flex: 1;
}

.intro {
  padding: 44px 0 48px;
}

.intro__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.intro__logo-wrap {
  display: block;
}

.intro__logo {
  --intro-logo-width: clamp(240px, 34vw, 360px);
  width: var(--intro-logo-width);
  height: auto;
  margin-left: calc(var(--intro-logo-width) * -0.054);
}

.intro__heading {
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.intro__kicker {
  font-size: clamp(0.86rem, 1.2vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.intro__title {
  font-size: clamp(1.5rem, 2.5vw, 1.95rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.35;
  color: var(--ink-primary);
}

.intro__body {
  margin-top: 20px;
  max-width: 48rem;
  font-size: 0.95rem;
  line-height: 1.95;
  letter-spacing: 0.02em;
  color: var(--ink-secondary);
  line-break: strict;
}

.intro__body p {
  margin: 0;
}

.intro__body p + p {
  margin-top: 0.8em;
}

.u-intro-br {
  display: none;
}

@media (min-width: 820px) {
  .u-intro-br {
    display: inline;
  }
}

.intro__actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.hero-btn:focus-visible {
  outline: 2px solid var(--egg-gold);
  outline-offset: 3px;
}

.hero-btn--phone {
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  border: 1px solid var(--border-hover);
  box-shadow: 0 2px 8px rgba(34, 37, 42, 0.04);
}

.hero-btn--phone svg {
  color: var(--egg-amber);
}

.hero-btn--phone:hover {
  background-color: var(--bg-subtle);
  border-color: #cfc6b2;
  transform: translateY(-1px);
}

.hero-btn--inquiry {
  background-color: var(--ink-primary);
  color: #ffffff;
  border: 1px solid var(--ink-primary);
  box-shadow: 0 4px 14px rgba(34, 37, 42, 0.14);
}

.hero-btn--inquiry svg {
  color: var(--egg-gold);
}

.hero-btn--inquiry:hover {
  background-color: #2f333a;
  border-color: #2f333a;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(34, 37, 42, 0.2);
}

.u-desktop-br {
  display: none;
}

@media (min-width: 640px) {
  .u-desktop-br {
    display: inline;
  }
}

/* ===========================
   Works Grid & Cards
   =========================== */
.works {
  padding: 0 0 88px;
}

.works__inner {
  padding-top: 48px;
  border-top: 1px solid var(--border-subtle);
}

.works__header {
  margin-bottom: 30px;
}

.works__title {
  margin: 0;
  font-size: clamp(1.38rem, 2.2vw, 1.78rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.35;
  color: var(--ink-primary);
}

.works__ornament {
  margin-top: 11px;
  color: var(--sauce-red);
  opacity: 0.82;
}

.works__lead {
  margin: 16px 0 0;
  max-width: 58ch;
  font-size: 0.93rem;
  color: var(--ink-secondary);
  line-height: 1.9;
}

.works-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }
}

@media (min-width: 960px) {
  .works-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }
}

.works-grid__item {
  display: flex;
}

.work-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  font-family: inherit;
  color: inherit;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 12px 12px 18px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.24s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.work-card:focus-visible {
  outline: 2px solid var(--egg-gold);
  outline-offset: 3px;
}

.work-card:active {
  transform: translateY(-1px);
}

/* Browser thumbnail frame */
.work-card__browser {
  display: block;
  border-radius: var(--radius-inner);
  overflow: hidden;
  border: 1px solid rgba(34, 37, 42, 0.075);
  background-color: var(--bg-subtle);
}

.work-card__bar {
  height: 26px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background-color: #f8f6f0;
  border-bottom: 1px solid rgba(34, 37, 42, 0.06);
}

.work-card__dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.work-card__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.work-card__dot--sauce {
  background-color: #eca4a0;
}

.work-card__dot--egg {
  background-color: #f6d365;
}

.work-card__dot--plate {
  background-color: #d4d1c8;
}

.work-card__domain {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-card__thumb-wrap {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--bg-subtle);
}

.work-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-card:hover .work-card__thumb {
  transform: scale(1.028);
}

/* Card text body */
.work-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 6px 2px;
}

.work-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.work-card__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background-color: var(--egg-soft);
  color: var(--egg-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.work-card__category {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.work-card__title {
  margin-top: 9px;
  font-size: 1.03rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink-primary);
}

.work-card__action {
  margin-top: auto;
  padding-top: 14px;
  padding-right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.79rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 0.2s ease;
}

.work-card:hover .work-card__action {
  color: var(--ink-primary);
}

.work-card__plus {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-subtle);
  color: var(--ink-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.work-card:hover .work-card__plus {
  background-color: var(--egg-soft);
  color: var(--egg-ink);
  transform: rotate(90deg);
}

/* Subtle "Page-Ear" folded corner echoing OmPage logo */
.work-card__ear {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  border-top-left-radius: 7px;
  background: linear-gradient(
    135deg,
    #fef3c7 0%,
    #fcd34d 49%,
    #f3efe4 51%,
    var(--bg-canvas) 100%
  );
  box-shadow: -1px -1px 3px rgba(217, 119, 6, 0.12);
  pointer-events: none;
  transition: width 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-card:hover .work-card__ear {
  width: 24px;
  height: 24px;
  background: linear-gradient(
    135deg,
    #fde68a 0%,
    #f59e0b 49%,
    #efeae0 51%,
    var(--bg-canvas) 100%
  );
}

/* ===========================
   Footer
   =========================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background-color: rgba(255, 255, 255, 0.6);
  padding: 28px 0;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-footer__mark {
  width: 28px;
  height: 28px;
}

.site-footer__copy {
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.site-footer__legal {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* ===========================
   Modal Dialog (Modern Web Guidance compliant)
   =========================== */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
}

.work-dialog {
  margin: auto;
  width: min(640px, calc(100% - 28px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-Dialog);
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  box-shadow: var(--shadow-dialog);

  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.24s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  transition-behavior: allow-discrete;
}

.work-dialog::backdrop {
  background-color: rgba(28, 31, 36, 0);
  backdrop-filter: blur(0px);
  transition-property: background-color, backdrop-filter, display, overlay;
  transition-duration: 0.24s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

:is(.work-dialog[open]):where(:not([data-closing])) {
  opacity: 1;
  transform: translateY(0) scale(1);

  @starting-style {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }

  &::backdrop {
    background-color: rgba(28, 31, 36, 0.48);
    backdrop-filter: blur(4px);

    @starting-style {
      background-color: rgba(28, 31, 36, 0);
      backdrop-filter: blur(0px);
    }
  }
}

.work-dialog__surface {
  padding: 18px 20px 24px;
}

@media (min-width: 640px) {
  .work-dialog__surface {
    padding: 22px 26px 28px;
  }
}

.work-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.work-dialog__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.work-dialog__domain {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-dialog__icon-close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid transparent;
  background-color: var(--bg-subtle);
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.work-dialog__icon-close:hover {
  background-color: var(--bg-subtle-hover);
  color: var(--ink-primary);
}

.work-dialog__icon-close:focus-visible {
  outline: 2px solid var(--egg-gold);
  outline-offset: 2px;
}

.work-dialog__preview {
  aspect-ratio: 16 / 10;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-subtle);
}

.work-dialog__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.work-dialog__content {
  padding-top: 20px;
}

.work-dialog__title {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink-primary);
}

.work-dialog__description {
  margin: 12px 0 0;
  font-size: 0.93rem;
  line-height: 1.85;
  color: var(--ink-secondary);
}

.work-dialog__actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn-visit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 999px;
  background-color: var(--ink-primary);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(34, 37, 42, 0.16);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-visit:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.btn-visit svg {
  color: var(--egg-gold);
  transition: transform 0.2s ease;
}

.btn-visit:not(:disabled):hover {
  background-color: #2f333a;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(34, 37, 42, 0.22);
}

.btn-visit:not(:disabled):hover svg {
  transform: translate(2px, -2px);
}

.btn-visit:focus-visible {
  outline: 2px solid var(--egg-gold);
  outline-offset: 3px;
}

.btn-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-subtle);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-close:hover {
  background-color: var(--bg-subtle-hover);
  color: var(--ink-primary);
}

.btn-close:focus-visible {
  outline: 2px solid var(--egg-gold);
  outline-offset: 2px;
}

/* ===========================
   Contact Inquiry View
   =========================== */
.contact-dialog {
  width: min(620px, calc(100% - 28px));
}

.contact-dialog__mark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.contact-dialog__body {
  padding-top: 2px;
}

.contact-form {
  margin-top: 10px;
}

.contact-form__lead {
  margin: 0 0 18px;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--ink-secondary);
}

.contact-form__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media (min-width: 560px) {
  .contact-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
  }
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-field label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-primary);
}

.field-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.4;
}

.field-badge--req {
  background-color: var(--egg-soft);
  color: var(--egg-ink);
}

.field-badge--opt {
  background-color: var(--bg-subtle);
  color: var(--ink-muted);
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-primary);
  background-color: #fdfcfa;
  border: 1px solid #ded9ce;
  border-radius: 12px;
  padding: 11px 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: #a6aab3;
  font-size: 0.9rem;
}

.contact-field textarea {
  resize: vertical;
  min-height: 116px;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  background-color: #ffffff;
  border-color: var(--egg-amber);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.22);
}

.contact-field input:user-invalid,
.contact-field textarea:user-invalid {
  border-color: #dc2626;
}

.contact-status {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 11px;
  font-size: 0.85rem;
  line-height: 1.6;
  background-color: var(--bg-subtle);
  color: var(--ink-primary);
}

.contact-status[data-kind="error"] {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.contact-complete {
  padding: 20px 4px 6px;
  text-align: center;
}

.contact-complete[hidden],
.contact-form[hidden],
.contact-status[hidden] {
  display: none;
}

.contact-complete__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background-color: var(--egg-soft);
  color: var(--egg-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-complete__title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.contact-complete__text {
  margin: 10px auto 0;
  max-width: 40ch;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--ink-secondary);
}

.contact-complete__actions {
  justify-content: center;
}

@media (max-width: 480px) {
  .intro {
    padding: 28px 0 40px;
  }

  .intro__logo {
    --intro-logo-width: min(260px, 76vw);
  }

  .brand-logo {
    height: 31px;
  }

  .intro__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-btn {
    width: 100%;
  }

  .works__inner {
    padding-top: 36px;
  }

  .contact-form__lead {
    margin-bottom: 12px;
    font-size: 0.84rem;
  }

  .contact-form__grid {
    gap: 10px;
    margin-bottom: 10px;
  }

  .contact-field input,
  .contact-field textarea {
    padding: 9px 12px;
  }

  .contact-field textarea {
    min-height: 88px;
  }

  .work-dialog__actions {
    margin-top: 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .btn-visit,
  .btn-close {
    width: 100%;
  }
}

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

  .work-card,
  .work-card__thumb,
  .work-card__plus,
  .work-card__ear,
  .hero-btn,
  .btn-visit,
  .btn-visit svg {
    transition: none;
  }

  .work-dialog,
  .work-dialog::backdrop {
    transform: none;
    transition-duration: 0.1s;
  }

  @starting-style {
    :is(.work-dialog[open]):where(:not([data-closing])) {
      transform: none;
    }
  }
}
