/* Tapestry — Core CSS
   Layout, sizing, positioning, and responsive structure.
   Load this file before elements.css.
*/

/* ==========================================================================
   GLOBAL & TYPOGRAPHY
   ========================================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    margin: 0;
}

h3.kim {
    margin: 5px !important;
}


/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    z-index: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.header-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 35px;
}

.site-title {
    margin: 0 0 15px;
}

.hero-layout {
    display: grid;
    grid-template-columns: 210px 412px 210px;
    align-items: center;
    justify-content: center;
    column-gap: 35px;
    width: 100%;
}

.hero-image {
    display: block;
    width: 412px;
    height: 536px;
}

.nav-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 210px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-item span {
    display: block;
    margin-top: 1px;
}


/* ==========================================================================
   BODY
   ========================================================================== */

#body {
    position: relative;
    z-index: 1;
    margin-top: 100vh;
    margin-top: 100svh;
    min-height: 100vh;
    min-height: 100svh;
}

.body-content {
    width: 100%;
    max-width: 1000px;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0 auto;
    padding: 60px 30px;
}


/* ==========================================================================
   DIVIDERS
   ========================================================================== */

.divider {
    display: block;
    width: 84px;
    height: 25px;
    margin: 30px auto;
}

#footer .divider {
    margin: 0 auto 15px;
}


/* ==========================================================================
   FOOTER
   ========================================================================== */

#footer {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


/* ==========================================================================
   OWNED, WISHES, SPOTLIGHT & NETWORK
   ========================================================================== */

.owned-item img,
.wishes-item img,
.spotlight-item img,
.network-item img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 3px;
    box-sizing: border-box;
}

.owned-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, 175px);
    justify-content: center;
    gap: 35px;
    padding: 20px 0;
}

.owned-item {
    width: 175px;
}

.owned-item a {
    display: block;
    width: 175px;
    height: 175px;
    background: none;
}

.owned-item img {
    width: 175px;
    height: 175px;
}

.owned-item .subject {
    margin-top: 10px;
}

.owned-item .details {
    margin-top: 6px;
}

.wishes-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, 150px);
    justify-content: center;
    gap: 35px;
    padding: 20px 0;
}

.wishes-item {
    width: 150px;
}

.wishes-item a {
    display: block;
    width: 150px;
    height: 150px;
    background: none;
}

.wishes-item img {
    width: 150px;
    height: 150px;
}

.wishes-item .subject {
    margin-top: 10px;
}

.spotlight-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
    gap: 30px;
    padding: 20px 0;
}

.spotlight-item h3 {
    margin-top: 0;
}

.spotlight-item a {
    display: block;
    width: 175px;
    height: 175px;
    max-width: 100%;
    margin: 0 auto;
    background: none;
}

.spotlight-item img {
    width: 100%;
    height: 100%;
}

.spotlight-item .subject {
    margin-top: 10px;
}

.network-wrapper {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 20px 0;
}

.network-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.network-item a {
    display: block;
    flex: 0 0 150px;
    width: 150px;
    height: 150px;
    background: none;
}

.network-item img {
    width: 150px;
    height: 150px;
}

.network-content {
    flex: 1;
    min-width: 0;
}

.network-content h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.network-content p {
    margin-top: 0;
}

.owned-item a:hover,
.wishes-item a:hover,
.spotlight-item a:hover,
.network-item a:hover {
    background: none;
}


/* ==========================================================================
   CONTENT COLUMNS
   ========================================================================== */

.two-col {
    display: flex;
    gap: 20px;
    margin: 40px 0;
}

.two-col .col, .col {
    flex: 1;
}

.col img {
    display: inline-block;
    vertical-align: middle;
    max-width: 100%;
}

.three-col {
    display: flex;
    gap: 20px;
    margin: 40px 0;
}

.three-col .col {
    flex: 1;
}

.three-col .col img {
    display: inline-block;
    vertical-align: middle;
    max-width: 100%;
}


/* ==========================================================================
   KIM FORM
   ========================================================================== */

ul.kim {
    padding: 0 !important;
    margin: 5px 0 20px 20px !important;
}

.kim-success {
    padding: 10px;
    margin-bottom: 15px;
}

.kim-error {
    padding: 10px;
    margin-bottom: 15px;
}


/* ==========================================================================
   JOINED / OWNED LISTS
   ========================================================================== */

p.center {
    padding: 0 0 0 30px !important;
}

p.center img {
    margin: 0 0;
}

ul.show_joined_list_items, ul.show_owned_list_items {
    columns: 1;
    -webkit-columns: 1;
    -moz-columns: 1;
}


/* ==========================================================================
   AFFILIATES
   ========================================================================== */

ul.affiliates {
    columns: 1;
    -webkit-columns: 1;
    -moz-columns: 1;
}


/* ==========================================================================
   SAMPLE LINK & COPY BUTTON
   ========================================================================== */

.samplelink {
    width: 400px;
    margin: 0 auto;
    padding: 10px;
}

.copy-button {
    width: 400px;
    margin: 0 auto;
    padding: 10px;
    margin-top: 3px;
}


/* ==========================================================================
   FORMS
   ========================================================================== */

.custom_input {
    display: flex;
    align-items: center;
    margin-bottom: 5px !important;
}

.custom_input label {
    width: 120px;
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 20px;
}

.custom_input .input {
    width: 300px;
    padding: 10px;
}

.custom_input input[type="submit"] {
    width: auto;
    padding: 10px 20px;
}


/* ==========================================================================
   STATISTICS TABLE
   ========================================================================== */

#statsTable {
    width: 700px;
}

#statsTable th,
#statsTable td {
    padding: 8px 10px;
}

#statsTable .sort-arrow {
    margin-left: 5px;
}

#statsTable .summary-row td {
    padding-top: 10px;
    padding-bottom: 10px;
}


/* ==========================================================================
   CODE BLOCKS
   ========================================================================== */

pre {
    padding: 10px;
}


/* ==========================================================================
   RESPONSIVE LAYOUT
   ========================================================================== */

@media (max-width: 480px) {

    .owned-wrapper,
  .wishes-wrapper {
    column-gap: 20px;
    row-gap: 30px;
}

    .spotlight-wrapper {
    grid-template-columns: 1fr;
}

    .network-item {
    gap: 15px;
}

    .network-item a {
    flex-basis: 110px;
    width: 110px;
    height: 110px;
    background: none;
}

    .network-item img {
    width: 110px;
    height: 110px;
}
}

@media (min-width: 600px) {

    ul.show_joined_list_items, ul.show_owned_list_items {
    columns: 2;
    -webkit-columns: 2;
    -moz-columns: 2;
}
}

@media (min-width: 600px) {

    ul.affiliates {
    columns: 2;
    -webkit-columns: 2;
    -moz-columns: 2;
}
}

@media screen and (max-width: 850px) {

    #header {
    position: relative;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    padding: 40px 20px;
}

    .header-content {
    padding-top: 0;
}

    .site-title {
    margin-bottom: 15px;
}

    .hero-layout {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

    .hero-image {
    order: 1;
    width: min(100%, 320px);
    height: auto;
}

    .nav-column {
    width: 100%;
    gap: 20px;
}

    .nav-left {
    order: 2;
}

    .nav-right {
    order: 3;
}

    .nav-item span {
    margin-top: 8px;
}

    #body {
    margin-top: 0;
    min-height: 100vh;
    min-height: 100svh;
}

    .body-content {
    min-height: 100vh;
    min-height: 100svh;
    padding: 40px 20px;
}

    #footer {
    height: 200px;
    padding: 20px;
}
}
