:root {
  --ink: #111210;
  --ink-soft: #242622;
  --paper: #eee9dd;
  --paper-bright: #f7f3e9;
  --muted: #898b84;
  --line-dark: #3a3d37;
  --line-light: #c8c1b2;
  --signal: #347461;
  --mint: #9bf0cf;
  --cad: #9fd8c1;
  --max: 1180px;
  font-family: "Noto Sans JP", "Yu Gothic", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); }
a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  padding: 0 max(22px, calc((100vw - var(--max)) / 2));
  color: var(--paper-bright);
  background: rgba(17, 18, 16, .96);
  border-bottom: 1px solid var(--line-dark);
  backdrop-filter: blur(10px);
}

.wordmark { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 600 15px/1 "IBM Plex Mono", monospace; letter-spacing: .06em; }
.brand-icon { display: block; width: 68px; height: 18px; margin-right: 4px; background: var(--mint); filter: drop-shadow(0 0 7px rgba(155,240,207,.18)); -webkit-mask: url("./assets/mdkx-logo.svg") center / contain no-repeat; mask: url("./assets/mdkx-logo.svg") center / contain no-repeat; }
.wordmark strong { color: var(--mint); }
.site-header nav { display: flex; align-items: center; gap: 26px; font-size: 12px; font-weight: 600; }
.site-header nav a { text-decoration: none; }
.site-header nav > a:not(.header-cta) { color: #b8bab4; }
.site-header nav > a:not(.header-cta):hover { color: white; }
.header-cta { padding: 9px 14px; border: 1px solid rgba(155,240,207,.48); }

.section-shell { max-width: var(--max); margin: 0 auto; padding-inline: 28px; }
.hero { display: grid; grid-template-columns: .88fr 1.12fr; gap: clamp(36px, 7vw, 96px); align-items: center; min-height: calc(100svh - 64px); padding-block: 80px; }
.eyebrow, .section-number, .plan-name { margin: 0 0 22px; font: 600 11px/1.4 "IBM Plex Mono", monospace; letter-spacing: .13em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(42px, 5.4vw, 76px); line-height: 1.18; letter-spacing: -.055em; font-weight: 800; }
.lead { max-width: 560px; margin: 28px 0 0; color: #484b45; font-size: 15px; line-height: 2; }
.lead em { color: var(--ink); font-style: normal; font-weight: 700; border-bottom: 1px solid var(--ink); }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 38px; }
.button { display: inline-flex; justify-content: space-between; align-items: center; gap: 36px; min-width: 220px; padding: 15px 18px; border: 1px solid currentColor; text-decoration: none; font-size: 13px; font-weight: 700; transition: background .18s, color .18s, transform .18s; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--paper-bright); background: var(--ink); }
.button-primary:hover { background: var(--signal); }
.button-light { color: var(--ink); background: var(--paper-bright); }
.button-light:hover { color: white; background: var(--signal); }
.text-link { font-size: 12px; text-underline-offset: 5px; }
.fine-print { margin-top: 18px; color: #696c65; font-size: 10px; }

.demo-frame { position: relative; display: grid; place-items: center; overflow: visible; background: transparent; }
.hero-demo-video { display: block; width: auto; max-width: 100%; height: min(78svh, 760px); background: white; object-fit: contain; }

.problem-strip { display: grid; grid-template-columns: 1fr auto 1fr; gap: 40px; align-items: center; padding: 36px max(28px, calc((100vw - var(--max)) / 2)); color: #d8d4ca; background: var(--signal); }
.problem-strip p { margin: 0; font-size: clamp(17px, 2vw, 25px); font-weight: 700; }
.problem-strip p:last-child { text-align: right; }
.problem-strip span { width: 64px; height: 1px; background: currentColor; opacity: .6; }

.statement { display: grid; grid-template-columns: .38fr 1fr; padding-block: 140px; border-bottom: 1px solid var(--line-light); }
.statement h2, .section-heading h2 { margin: 0; font-size: clamp(30px, 4vw, 52px); line-height: 1.35; letter-spacing: -.035em; }
.statement div p { max-width: 720px; margin: 30px 0 0; color: #55574f; font-size: 16px; line-height: 2.1; }

.functions { display: grid; grid-template-columns: .55fr 1fr; gap: 70px; padding-block: 140px; }
.function-list { border-top: 1px solid var(--ink); }
.function-list article { display: grid; grid-template-columns: 62px 1fr; padding: 29px 0 32px; border-bottom: 1px solid var(--line-light); }
.function-index { padding-top: 5px; color: var(--signal); font: 600 11px "IBM Plex Mono", monospace; }
.function-list h3 { margin: 0; font-size: 19px; }
.function-list p { margin: 12px 0 0; color: #62645d; font-size: 13px; line-height: 1.9; }

.field-note { padding: 140px 28px; color: #d8d5cc; background: var(--ink); }
.field-note-inner { max-width: 900px; margin: 0 auto; }
.field-note .section-number { color: #82877e; }
.field-note blockquote { margin: 50px 0; font-size: clamp(27px, 4vw, 48px); line-height: 1.65; letter-spacing: -.025em; font-weight: 500; }
.field-note blockquote strong { color: var(--cad); font-weight: 600; }
.field-note-inner > p:last-child { max-width: 590px; margin-left: auto; color: #9b9f96; font-size: 13px; line-height: 2; }

.workflow { display: grid; grid-template-columns: .55fr 1fr; gap: 70px; padding-block: 140px; }
.workflow ol { display: grid; grid-template-columns: repeat(3, 1fr); grid-column: 2; padding: 0; margin: 0; list-style: none; border-top: 1px solid var(--ink); }
.workflow li { min-height: 160px; padding: 24px 16px; border-right: 1px solid var(--line-light); }
.workflow li:last-child { border-right: 0; }
.workflow li span { display: block; margin-bottom: 36px; color: var(--signal); font: 600 11px "IBM Plex Mono", monospace; }
.workflow li strong { font-size: 14px; line-height: 1.7; }
.security-note { grid-column: 2; margin: 0; color: #686b63; font-size: 11px; }

.home-screen { color: #e1ded5; background: var(--ink); border-top: 1px solid var(--line-dark); }
.home-screen-inner { display: grid; grid-template-columns: .55fr 1fr; gap: 70px; padding-block: 130px; }
.home-screen-copy .section-number { color: #858a81; }
.home-screen-copy h2 { margin: 0; font-size: clamp(30px, 4vw, 52px); line-height: 1.35; letter-spacing: -.035em; }
.home-screen-copy > p:last-child { max-width: 390px; margin: 28px 0 0; color: #9da198; font-size: 13px; line-height: 2; }
.install-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.install-steps > li { min-width: 0; border: 1px solid #393d37; background: #171916; }
.install-visual { display: grid; place-items: center; height: 188px; overflow: hidden; background-color: #1d201c; background-image: linear-gradient(rgba(155,240,207,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(155,240,207,.035) 1px, transparent 1px); background-size: 18px 18px; border-bottom: 1px solid #393d37; }
.install-text { display: grid; grid-template-columns: 28px 1fr; gap: 8px; min-height: 128px; padding: 18px 14px; }
.install-text > span { padding-top: 3px; color: var(--mint); font: 600 10px/1 "IBM Plex Mono", monospace; }
.install-text strong { display: block; font-size: 13px; }
.install-text p { margin: 9px 0 0; color: #8f938b; font-size: 10px; line-height: 1.75; }
.mini-phone { position: relative; width: 112px; height: 158px; overflow: hidden; color: #d8dcd5; background: #0b0d0c; border: 1px solid #62675f; border-radius: 15px 15px 7px 7px; box-shadow: 7px 9px 18px rgba(0,0,0,.28); }
.mini-phone::before { content: ""; position: absolute; z-index: 3; top: 5px; left: 50%; width: 34px; height: 5px; border-radius: 4px; background: #050605; transform: translateX(-50%); }
.mini-status { position: absolute; z-index: 2; top: 5px; left: 10px; font: 500 5px "IBM Plex Mono", monospace; }
.mini-cad { position: absolute; inset: 19px 5px 32px; overflow: hidden; background: #101512; border: 1px solid #2c3832; }
.mini-cad::before, .mini-cad::after { content: ""; position: absolute; background: #678779; }
.mini-cad::before { top: 27px; left: 12px; width: 78px; height: 1px; box-shadow: 0 39px #678779, 0 64px #678779; }
.mini-cad::after { top: 10px; left: 31px; width: 1px; height: 87px; box-shadow: 39px 0 #678779; }
.mini-cad i { position: absolute; width: 5px; height: 5px; border: 1px solid var(--mint); border-radius: 50%; }
.mini-cad i:nth-child(1) { top: 25px; left: 29px; }
.mini-cad i:nth-child(2) { top: 64px; left: 68px; }
.mini-cad i:nth-child(3) { top: 49px; left: 49px; width: 27px; height: 1px; border: 0; border-top: 1px solid var(--mint); border-radius: 0; transform: rotate(44deg); }
.mini-cad i:nth-child(4) { top: 38px; left: 39px; width: 38px; height: 15px; border-radius: 2px; background: #17231e; }
.safari-bar { position: absolute; right: 4px; bottom: 4px; left: 4px; display: grid; place-items: center; height: 23px; color: #555a53; background: #e8e6df; border-radius: 7px; font: 500 5px "IBM Plex Mono", monospace; }
.share-visual { align-content: center; gap: 13px; color: #dfe5dd; }
.share-mark { display: grid; place-items: center; width: 68px; height: 68px; border: 1px solid #5b6259; background: rgba(238,243,235,.035); box-shadow: inset 0 1px rgba(255,255,255,.06), 6px 8px 0 rgba(0,0,0,.16); }
.share-mark svg { width: 28px; height: 33px; fill: none; stroke: var(--mint); stroke-width: 2.4; stroke-linecap: square; stroke-linejoin: miter; }
.share-visual > span { color: #858b82; font-size: 9px; }
.add-sheet { width: calc(100% - 24px); max-width: 190px; overflow: hidden; color: #1d211d; background: #e8e6df; border: 1px solid #f5f3ed; border-radius: 7px 7px 3px 3px; box-shadow: 7px 9px 18px rgba(0,0,0,.28); }
.add-sheet > div { display: flex; align-items: center; gap: 9px; min-height: 45px; padding: 8px 10px; }
.app-tile { display: block; flex: 0 0 29px; width: 29px; height: 29px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.32); }
.add-sheet b { font-size: 8px; }
.webapp-row { justify-content: space-between; border-top: 1px solid #c9c9c2; font-size: 7px; }
.webapp-row i { position: relative; width: 25px; height: 14px; border-radius: 10px; background: var(--signal); }
.webapp-row i::after { content: ""; position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: white; }
.install-result { grid-column: 2; display: flex; align-items: center; gap: 10px; margin: 2px 0 0; color: #b8bcb3; font-size: 11px; }
.install-result span { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px rgba(155,240,207,.38); }

.pricing { display: grid; grid-template-columns: .55fr 1fr; gap: 70px; padding-block: 140px; border-top: 1px solid var(--line-light); }
.price-panel { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 38px; color: white; background: var(--ink-soft); }
.price { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.price strong { font: 500 72px/1 "IBM Plex Mono", monospace; letter-spacing: -.07em; }
.price span, .annual { color: #b6bab1; font-size: 12px; }
.annual { margin: 13px 0 0; }
.price-panel ul { margin: 2px 0 0; padding: 0; list-style: none; color: #c8cbc4; font-size: 12px; line-height: 2.2; }
.price-panel li::before { content: "—"; margin-right: 10px; color: var(--cad); }
.price-panel .button { grid-column: 1 / -1; }
.price-direct-link { grid-column: 1 / -1; display: inline-flex; justify-content: space-between; align-items: center; gap: 36px; min-width: 220px; padding: 15px 18px; color: #c8cbc4; border: 1px solid #6d7169; text-decoration: none; font-size: 13px; font-weight: 700; transition: color .18s, border-color .18s, transform .18s; }
.price-direct-link:hover { color: white; border-color: var(--cad); transform: translateY(-2px); }
.price-note { grid-column: 2; margin: -54px 0 0; padding-left: 1px; color: #73766f; font-size: 10px; transform: translateY(80px); }

.faq { padding-block: 140px; border-top: 1px solid var(--line-light); }
.faq details { margin-left: 38%; border-top: 1px solid var(--line-light); }
.faq details:last-child { border-bottom: 1px solid var(--line-light); }
.faq summary { padding: 24px 0; cursor: pointer; font-size: 14px; font-weight: 600; }
.faq details p { max-width: 650px; margin: -3px 0 26px; color: #62645d; font-size: 12px; line-height: 1.9; }

.closing { display: flex; justify-content: space-between; align-items: flex-end; gap: 50px; padding: 100px max(28px, calc((100vw - var(--max)) / 2)); color: var(--paper-bright); background: var(--signal); }
.closing p { margin: 0; font-size: clamp(29px, 3.7vw, 52px); line-height: 1.45; font-weight: 700; letter-spacing: -.04em; }
.closing-line { white-space: nowrap; }
.closing .button-primary { flex: 0 0 auto; }

footer { display: flex; justify-content: space-between; padding: 42px max(28px, calc((100vw - var(--max)) / 2)); color: #969a91; background: var(--ink); font-size: 10px; }
.footer-brand { display: flex; gap: 18px; align-items: center; }
.footer-brand strong { color: white; font: 600 13px "IBM Plex Mono", monospace; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 18px 30px; }
.footer-meta a { color: #b8bcb3; text-underline-offset: 4px; }

@media (max-width: 820px) {
  .site-header nav > a:not(.header-cta) { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-block: 68px 80px; }
  .hero-copy { max-width: 620px; }
  .hero-demo-video { height: min(72svh, 680px); }
  .statement, .functions, .workflow, .pricing, .home-screen-inner { grid-template-columns: 1fr; gap: 48px; padding-block: 96px; }
  .workflow ol, .workflow .security-note, .price-panel, .price-note { grid-column: 1; }
  .install-result { grid-column: 1; }
  .price-note { margin: -30px 0 0; transform: none; }
  .faq details { margin-left: 0; }
  .closing { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .site-header { min-height: 58px; }
  .header-cta { padding: 8px 10px; }
  .section-shell { padding-inline: 20px; }
  .hero { padding-top: 56px; }
  .hero h1 { font-size: clamp(37px, 11.5vw, 54px); }
  .lead br { display: none; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .text-link { align-self: flex-start; }
  .problem-strip { grid-template-columns: 1fr; gap: 18px; }
  .problem-strip span { width: 38px; }
  .problem-strip p:last-child { text-align: left; }
  .statement { display: block; }
  .statement .section-number { margin-bottom: 42px; }
  .functions, .workflow, .pricing { gap: 42px; }
  .home-screen-inner { gap: 42px; }
  .install-steps { grid-template-columns: 1fr; }
  .install-steps > li { display: grid; grid-template-columns: 124px 1fr; }
  .install-visual { height: 150px; border-right: 1px solid #393d37; border-bottom: 0; }
  .install-text { min-height: 150px; align-content: center; }
  .mini-phone { width: 91px; height: 130px; }
  .mini-cad { bottom: 28px; }
  .safari-bar { height: 20px; }
  .workflow ol { grid-template-columns: 1fr; border-bottom: 1px solid var(--line-light); }
  .workflow li { display: grid; grid-template-columns: 45px 1fr; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line-light); }
  .workflow li:last-child { border-bottom: 0; }
  .workflow li span { margin: 4px 0 0; }
  .price-panel { grid-template-columns: 1fr; padding: 28px 22px; }
  .price-panel .button { grid-column: 1; }
  .price-direct-link { grid-column: 1; }
  .price strong { font-size: 60px; }
  .field-note, .closing { padding-inline: 20px; }
  .closing p { font-size: clamp(14px, 4.7vw, 26px); }
  footer, .footer-meta { align-items: flex-start; flex-direction: column; gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
