{
  "id": "diagonal-split",
  "name": "Diagonal Split Screen",
  "category": "layouts",
  "tags": [
    "split screen",
    "clip-path",
    "diagonal",
    "hero",
    "two audiences"
  ],
  "description": "A two-sided hero cut by a diagonal line with clip-path, each side holding its own message and link.",
  "url": "https://copy-css.com/snippets/diagonal-split",
  "markdown": "https://copy-css.com/snippets/diagonal-split.md",
  "html": "<section class=\"diag-split\">\n  <div class=\"diag-split-a\">\n    <h2>For buyers</h2>\n    <a href=\"#\">Shop now</a>\n  </div>\n  <div class=\"diag-split-b\">\n    <h2>For sellers</h2>\n    <a href=\"#\">Start selling</a>\n  </div>\n</section>",
  "css": ".diag-split {\n  display: grid;\n  min-height: 60vh;\n  font: 15px/1.3 system-ui, sans-serif;\n}\n\n/* Both halves share one grid cell; the second is cut diagonally */\n.diag-split > * {\n  grid-area: 1 / 1;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  gap: 10px;\n  padding: 40px;\n}\n\n.diag-split h2 {\n  margin: 0;\n  font-size: 28px;\n}\n\n.diag-split a {\n  color: inherit;\n  font-weight: 700;\n}\n\n.diag-split a:focus-visible {\n  outline: 2px solid currentColor;\n  outline-offset: 3px;\n}\n\n.diag-split-a {\n  align-items: flex-start;\n  padding-right: 55%;\n  background: #fef3c7;\n  color: #78350f;\n}\n\n.diag-split-b {\n  align-items: flex-end;\n  padding-left: 55%;\n  background: #1e1b4b;\n  color: #e0e7ff;\n  text-align: right;\n  clip-path: polygon(58% 0, 100% 0, 100% 100%, 42% 100%);\n}\n\n/* Phones: stack, with a slanted top edge on the second half */\n@media (max-width: 560px) {\n  .diag-split > * {\n    grid-area: auto;\n    padding: 32px 24px;\n  }\n\n  .diag-split-b {\n    margin-top: -24px;\n    clip-path: polygon(0 24px, 100% 0, 100% 100%, 0 100%);\n  }\n}",
  "features": [
    "clip paths",
    "CSS Grid",
    "Flexbox",
    "keyboard focus styles"
  ],
  "customProperties": []
}
