/*
Theme Name: Imaginia Stationery
Version: 1.0.0
Text Domain: imaginia
*/
:root {
    --ink: #172745;
    --paper: #fff;
    --desk: #f5f7f9;
    --grid: #dde4eb;
    --line: #a0aab8;
    --subtle: #47566b;
    --yellow: #ffe451;
    --tape: #ffe76cd9;
    --pencil: #ac3138;
    --shadow: 3px 6px 0 #1827401e;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px), var(--desk);
    background-size: 22px 22px;
    font: 16px/1.75 system-ui, -apple-system, "Hiragino Sans", Meiryo, sans-serif;
    font-variant-numeric: tabular-nums;
}
::selection { background: var(--yellow); color: var(--ink); }
a { color: inherit; text-underline-offset: .21em; }
a:hover { text-decoration-thickness: 2px; }
button, select, input, textarea { font: inherit; }
button, select, input, textarea, a { accent-color: var(--ink); }
:focus-visible { outline: 3px solid var(--pencil); outline-offset: 4px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.32; margin: 0 0 .55em; font-weight: 900; }
p { margin: 0 0 1em; }
.frame { width: min(1200px, calc(100% - 72px)); margin-inline: auto; }
.site-header { background: var(--paper); border-bottom: 2px solid var(--ink); }
.header-row, .footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 10px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: clamp(1rem, 2vw, 1.4rem); font-weight: 900; text-decoration: none; letter-spacing: -.06em; }
.site-header ul, .site-footer ul, #shop-drawer ul { padding: 0; list-style: none; margin: 0; display: flex; gap: 8px 21px; flex-wrap: wrap; }
.site-header nav a, .site-footer nav a, #shop-drawer nav a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; font-size: .89rem; font-weight: 700; }
.cart-link { display: flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; font-size: .85rem; font-weight: 800; }
.drawer-toggle { display: none; }
.skip-link { position: fixed; z-index: 10; inset: 8px auto auto 8px; padding: 10px; background: var(--yellow); }
.skip-link:not(:focus) { clip-path: inset(50%); }
.desk { padding-top: clamp(32px, 6vw, 88px); }
.collage { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; position: relative; }
.lead-sheet { min-width: 0; position: relative; z-index: 1; transform: rotate(-1.5deg); border: 1px solid var(--ink); background: var(--paper); box-shadow: var(--shadow); }
.sheet-holes { position: absolute; width: 34px; inset: 0 auto 0 0; border-right: 1px solid var(--grid); background: radial-gradient(circle at 50% 50%, var(--desk) 4px, var(--line) 4.5px, transparent 5.5px) 0 4px/100% 32px; }
.lead-inner { padding: clamp(26px, 4.5vw, 70px) clamp(22px, 4vw, 57px) clamp(26px, 4vw, 56px) clamp(51px, 6vw, 88px); }
.lead-inner h1 { font-size: clamp(2.35rem, 4.35vw, 4.3rem); letter-spacing: -.06em; line-height: 1.22; line-break: strict; overflow-wrap: anywhere; margin-bottom: 0; }
.underline { display: block; color: var(--pencil); width: min(78%, 330px); height: auto; margin: 2px 0 18px; }
.shop-intro { max-width: 33ch; font-weight: 700; }
.paper-button, body.woocommerce a.button, body .woocommerce a.button, body .woocommerce button.button, body.woocommerce button.button {
    display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 12px;
    color: var(--ink); background: var(--yellow); border: 1px solid var(--ink); border-radius: 0;
    padding: .65em 1em; font-weight: 800; text-decoration: none; line-height: 1.25;
}
.paper-button:hover, body.woocommerce a.button:hover, body .woocommerce a.button:hover, body .woocommerce button.button:hover, body.woocommerce button.button:hover { background: var(--ink); color: var(--paper); }
a:active, button:active { filter: brightness(.88); }
.collage-images { min-width: 0; height: clamp(300px, 31vw, 480px); position: relative; }
.photo { display: block; position: absolute; background: var(--paper); border: 1px solid var(--ink); padding: 10px 10px 26px; box-shadow: var(--shadow); width: 63%; transform: rotate(5deg); top: 1%; right: 2%; }
.photo:nth-of-type(2) { transform: rotate(-7deg); width: 53%; top: auto; bottom: 0; left: 3%; }
.photo::before, .products li.product::before { content: ""; position: absolute; z-index: 1; pointer-events: none; width: 64px; height: 20px; left: 50%; top: -10px; transform: translateX(-50%) rotate(-6deg); background: var(--tape); }
.photo img { display: block; aspect-ratio: 1.23; width: 100%; object-fit: contain; background: var(--desk); }
.sketch-arrow { position: absolute; z-index: 2; pointer-events: none; color: var(--pencil); width: 24%; bottom: 9%; right: 4%; }
.index-tabs { display: flex; align-items: flex-end; gap: 9px; border-bottom: 2px solid var(--ink); margin: clamp(44px, 7vw, 100px) 0 34px; }
.index-tabs a { position: relative; isolation: isolate; display: flex; justify-content: space-between; align-items: center; gap: .3em; flex: 0 1 205px; text-decoration: none; font-size: clamp(1rem, 2.6vw, 1.8rem); font-weight: 900; padding: 9px clamp(9px, 2vw, 25px); border: 1px solid var(--ink); border-bottom: 0; background: var(--paper); }
.index-tabs a::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.index-tabs a:first-child::before, .index-tabs a:is(:hover, :focus-visible)::before { transform: scaleX(1); }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 20px; margin-bottom: 14px; }
.section-heading h2, .desk-news h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.7rem); }
.section-heading a, .category-menu a { min-height: 44px; display: inline-flex; align-items: center; }
body :is(.woocommerce, .woocommerce-page) ul.products[class*="columns-"], body:is(.woocommerce, .woocommerce-page) ul.products[class*="columns-"] {
    display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 27px 21px; margin: 12px 0 30px;
}
body :is(.woocommerce, .woocommerce-page) ul.products:before, body :is(.woocommerce, .woocommerce-page) ul.products:after,
body:is(.woocommerce, .woocommerce-page) ul.products:before, body:is(.woocommerce, .woocommerce-page) ul.products:after { display: none; }
body :is(.woocommerce, .woocommerce-page) ul.products[class*="columns-"] li.product, body:is(.woocommerce, .woocommerce-page) ul.products[class*="columns-"] li.product {
    width: 100%; float: none; clear: none; margin: 0; min-width: 0; position: relative; padding: 11px; background: var(--paper);
    border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .18s ease;
}
.products li.product:hover { transform: rotate(-1.3deg); }
body :is(.woocommerce, .woocommerce-page) ul.products li.product img, body:is(.woocommerce, .woocommerce-page) ul.products li.product img { aspect-ratio: 1; object-fit: contain; margin: 0 0 6px; background: var(--desk); }
body :is(.woocommerce, .woocommerce-page) ul.products li.product .price, body:is(.woocommerce, .woocommerce-page) ul.products li.product .price { color: var(--ink); background: var(--yellow); display: table; padding: 2px 6px; font-weight: 800; }
.products .woocommerce-loop-product__title { overflow-wrap: anywhere; }
.products li.product .button { font-size: .82rem; margin-top: .3em; }
.products li.product .added_to_cart { display: inline-flex; min-height: 44px; align-items: center; }
.desk-news { margin: 54px 0; background: var(--paper); padding: 20px 26px; border: 1px solid var(--ink); box-shadow: var(--shadow); }
.desk-news a { display: flex; min-height: 44px; align-items: center; flex-wrap: wrap; gap: 0 1em; }
.desk-news time { font-weight: 750; color: var(--subtle); }
.site-footer { border-top: 2px solid var(--ink); background: var(--paper); padding: 16px 0; }
.footer-row { align-items: flex-start; flex-wrap: wrap; }
.inner { padding: 32px 0 65px; min-height: 52vh; }
.entry-paper { width: min(790px, 100%); background: var(--paper); padding: clamp(16px, 4vw, 46px); border: 1px solid var(--line); margin: 0 auto 24px; overflow-wrap: anywhere; }
body:is(.woocommerce-cart, .woocommerce-checkout) .entry-paper { width: 100%; }
.entry-paper h2 { margin-top: 1.5em; }
.entry-paper table { border-collapse: collapse; width: 100%; }
.entry-paper :is(th, td) { padding: .65em .5em; text-align: left; border: 1px solid var(--line); vertical-align: top; }
.entry-paper :is(td, th):first-child { width: 29%; }
.entry-paper .contact-cards { display: grid; gap: 8px; margin-bottom: 20px; }
.contact-cards a { display: grid; min-height: 44px; }
.category-menu { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.category-menu a { text-decoration: none; padding-inline: 9px; }
.category-menu [aria-current="page"] { background: var(--yellow); font-weight: 800; }
.commerce .summary, .commerce .woocommerce-tabs { background: var(--paper); padding: clamp(16px, 3vw, 32px); border: 1px solid var(--line); }
.commerce .summary .price { color: var(--ink); font-weight: 800; }
.commerce .summary form.cart { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.woocommerce :is(input.input-text, select, textarea, .quantity .qty) { background: var(--paper); border: 1px solid var(--line); min-height: 44px; padding: 6px; color: var(--ink); }
.woocommerce .quantity .qty { width: 4em; }
.woocommerce form .form-row.woocommerce-invalid input.input-text { border-color: var(--pencil); animation: shake .24s; }
.woocommerce .woocommerce-error { border: 1px solid var(--pencil); }
.woocommerce .woocommerce-message { border: 1px solid var(--ink); }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@keyframes ticker { from { transform: translateY(.25em); opacity: .65; } }
.ticking { animation: ticker .19s ease-out; }
[data-pending="true"] { cursor: progress; }
[data-pending="true"]::after { content: ""; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.feedback:empty { display: none; }
.feedback { position: fixed; z-index: 5; inset: auto 14px 14px auto; max-width: calc(100% - 28px); padding: 10px 16px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow); animation: fade-in .2s ease; }
@keyframes fade-in { from { opacity: 0; } }
#shop-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; max-width: calc(100% - 28px); width: 340px; height: 100%; max-height: 100%; padding: 18px; color: var(--ink); background: var(--paper); border: 0; border-left: 2px solid var(--ink); }
#shop-drawer[open] { animation: drawer .22s ease-out; }
#shop-drawer::backdrop { background: #17274590; }
#shop-drawer header { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--ink); padding-bottom: 8px; }
#shop-drawer header h2 { margin: 0; }
#shop-drawer nav ul { display: block; }
#shop-drawer button, .drawer-toggle { color: var(--ink); background: var(--yellow); border: 1px solid var(--ink); padding: 6px 8px; min-height: 44px; min-width: 44px; line-height: 1.2; font-weight: 800; }
@keyframes drawer { from { transform: translateX(42px); opacity: 0; } }
@media (max-width: 767px) {
    .frame { width: calc(100% - 32px); }
    .header-row { gap: 8px; }
    .wordmark svg { width: 27px; height: 27px; }
    .desktop-nav { display: none; }
    .cart-link { margin-left: auto; min-width: 44px; justify-content: center; }
    .cart-link span { position: absolute; clip-path: inset(50%); }
    .drawer-toggle { display: inline-grid; align-items: center; text-decoration: none; font-size: .8rem; }
    .collage { grid-template-columns: 1fr; }
    .lead-inner { padding-left: 48px; }
    .sheet-holes { width: 26px; }
    .collage-images { height: clamp(182px, 51vw, 365px); margin-top: 18px; }
    .photo { width: 50%; top: 0; right: 3%; padding: 6px 6px 15px; }
    .photo:nth-of-type(2) { width: 46%; left: 4%; bottom: 5%; }
    .sketch-arrow { width: 17%; bottom: 4%; right: 3%; }
    .index-tabs { margin-top: 28px; }
    body :is(.woocommerce, .woocommerce-page) ul.products[class*="columns-"], body:is(.woocommerce, .woocommerce-page) ul.products[class*="columns-"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 13px; }
    .desk-news { margin-block: 38px; padding: 14px 16px; }
    .woocommerce :is(.checkout, .woocommerce-cart-form) .form-row { float: none; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .products li.product:hover { transform: none; }
    [data-pending="true"]::after { border-right-color: currentColor; }
}
.supplier-copy { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 0 0 1.3em; }
