/* =========================================================
   INKWELL COLLECTIVE – UTILITY CLASSES
   ---------------------------------------------------------
   Sizes:        -s (small)  -m (medium)  -l (large)
   Breakpoints:  Mobile  : default (below 768px)
                 Tablet  : 768px and up
                 Desktop : 1024px and up
   All spacing and text sizes grow automatically on bigger
   screens, so "padding-m" is smaller on a phone than on a
   desktop. Change the values in :root to adjust everything.
   ========================================================= */


/* =========================================================
   1. DESIGN TOKENS (the numbers everything uses)
   ========================================================= */
:root {
    /* Colours (reuses style.css values, with fallbacks) */
    --clr-dark:   var(--color-bg, #0f0f0f);
    --clr-light:  var(--color-text, #f2f2f2);
    --clr-accent: var(--color-accent, #c9a227);
    --clr-muted:  #9a9a9a;
    --clr-surface: #1c1c1c;      /* cards / panels on dark bg */
    --clr-border: #2e2e2e;

    /* Spacing – mobile values */
    --space-s: 0.5rem;   /* 8px  */
    --space-m: 1rem;     /* 16px */
    --space-l: 2rem;     /* 32px */

    /* Section spacing (top & bottom of page sections) */
    --section-s: 2rem;
    --section-m: 3rem;
    --section-l: 4rem;

    /* Text sizes – mobile values */
    --text-s: 0.875rem;  /* 14px */
    --text-m: 1rem;      /* 16px */
    --text-l: 1.125rem;  /* 18px */

    /* Heading sizes – mobile values */
    --heading-s: 1.25rem;
    --heading-m: 1.75rem;
    --heading-l: 2.25rem;

    /* Container widths */
    --container-s: 640px;
    --container-m: 960px;
    --container-l: 1200px;

    /* Corners */
    --radius-s: 4px;
    --radius-m: 8px;
    --radius-l: 16px;

    /* Shadows */
    --shadow-s: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-m: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-l: 0 12px 32px rgba(0, 0, 0, 0.5);

    /* Animation speed */
    --speed: 0.25s;
}

/* Tablet: everything a bit bigger */
@media (min-width: 768px) {
    :root {
        --space-s: 0.75rem;
        --space-m: 1.5rem;
        --space-l: 3rem;

        --section-s: 3rem;
        --section-m: 4.5rem;
        --section-l: 6rem;

        --text-l: 1.25rem;

        --heading-s: 1.5rem;
        --heading-m: 2.25rem;
        --heading-l: 3rem;
    }
}

/* Desktop: largest values */
@media (min-width: 1024px) {
    :root {
        --space-s: 1rem;
        --space-m: 2rem;
        --space-l: 4rem;

        --section-s: 4rem;
        --section-m: 6rem;
        --section-l: 8rem;

        --text-m: 1.0625rem;
        --text-l: 1.375rem;

        --heading-s: 1.75rem;
        --heading-m: 2.75rem;
        --heading-l: 4rem;
    }
}


/* =========================================================
   2. PADDING
   ========================================================= */
.padding-none { padding: 0; }
.padding-s { padding: var(--space-s); }
.padding-m { padding: var(--space-m); }
.padding-l { padding: var(--space-l); }

/* Left + right */
.padding-x-s { padding-left: var(--space-s); padding-right: var(--space-s); }
.padding-x-m { padding-left: var(--space-m); padding-right: var(--space-m); }
.padding-x-l { padding-left: var(--space-l); padding-right: var(--space-l); }

/* Top + bottom */
.padding-y-s { padding-top: var(--space-s); padding-bottom: var(--space-s); }
.padding-y-m { padding-top: var(--space-m); padding-bottom: var(--space-m); }
.padding-y-l { padding-top: var(--space-l); padding-bottom: var(--space-l); }

/* Single sides */
.padding-top-s { padding-top: var(--space-s); }
.padding-top-m { padding-top: var(--space-m); }
.padding-top-l { padding-top: var(--space-l); }

.padding-bottom-s { padding-bottom: var(--space-s); }
.padding-bottom-m { padding-bottom: var(--space-m); }
.padding-bottom-l { padding-bottom: var(--space-l); }

.padding-left-s { padding-left: var(--space-s); }
.padding-left-m { padding-left: var(--space-m); }
.padding-left-l { padding-left: var(--space-l); }

.padding-right-s { padding-right: var(--space-s); }
.padding-right-m { padding-right: var(--space-m); }
.padding-right-l { padding-right: var(--space-l); }


/* =========================================================
   3. MARGIN
   ========================================================= */
.margin-none { margin: 0; }
.margin-s { margin: var(--space-s); }
.margin-m { margin: var(--space-m); }
.margin-l { margin: var(--space-l); }

/* Left + right */
.margin-x-s { margin-left: var(--space-s); margin-right: var(--space-s); }
.margin-x-m { margin-left: var(--space-m); margin-right: var(--space-m); }
.margin-x-l { margin-left: var(--space-l); margin-right: var(--space-l); }
.margin-x-auto { margin-left: auto; margin-right: auto; }   /* centres a block */

/* Top + bottom */
.margin-y-s { margin-top: var(--space-s); margin-bottom: var(--space-s); }
.margin-y-m { margin-top: var(--space-m); margin-bottom: var(--space-m); }
.margin-y-l { margin-top: var(--space-l); margin-bottom: var(--space-l); }

/* Single sides */
.margin-top-s { margin-top: var(--space-s); }
.margin-top-m { margin-top: var(--space-m); }
.margin-top-l { margin-top: var(--space-l); }

.margin-bottom-s { margin-bottom: var(--space-s); }
.margin-bottom-m { margin-bottom: var(--space-m); }
.margin-bottom-l { margin-bottom: var(--space-l); }

.margin-left-s { margin-left: var(--space-s); }
.margin-left-m { margin-left: var(--space-m); }
.margin-left-l { margin-left: var(--space-l); }

.margin-right-s { margin-right: var(--space-s); }
.margin-right-m { margin-right: var(--space-m); }
.margin-right-l { margin-right: var(--space-l); }


/* =========================================================
   4. SECTIONS & CONTAINERS
   ========================================================= */
/* Vertical breathing room for page sections */
.section-s { padding-top: var(--section-s); padding-bottom: var(--section-s); }
.section-m { padding-top: var(--section-m); padding-bottom: var(--section-m); }
.section-l { padding-top: var(--section-l); padding-bottom: var(--section-l); }

/* Centred content with max width + side gutters */
.container-s,
.container-m,
.container-l {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}
.container-s { max-width: var(--container-s); }
.container-m { max-width: var(--container-m); }
.container-l { max-width: var(--container-l); }


/* =========================================================
   5. TYPOGRAPHY
   ========================================================= */
/* Body text sizes */
.text-s { font-size: var(--text-s); }
.text-m { font-size: var(--text-m); }
.text-l { font-size: var(--text-l); }

/* Heading sizes (use on h1–h6 or any element) */
.heading-s,
.heading-m,
.heading-l {
    line-height: 1.2;
    font-weight: 700;
}
.heading-s { font-size: var(--heading-s); }
.heading-m { font-size: var(--heading-m); }
.heading-l { font-size: var(--heading-l); }

/* Alignment */
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* Weight & style */
.font-light  { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-bold   { font-weight: 700; }
.italic      { font-style: italic; }
.uppercase   { text-transform: uppercase; }

/* Letter spacing */
.tracking-s { letter-spacing: 0.05em; }
.tracking-m { letter-spacing: 0.1em; }
.tracking-l { letter-spacing: 0.2em; }

/* Line height */
.leading-s { line-height: 1.2; }
.leading-m { line-height: 1.6; }
.leading-l { line-height: 1.9; }

/* Limit line length for readability */
.readable { max-width: 65ch; }


/* =========================================================
   6. COLOURS
   ========================================================= */
.text-light  { color: var(--clr-light); }
.text-dark   { color: var(--clr-dark); }
.text-accent { color: var(--clr-accent); }
.text-muted  { color: var(--clr-muted); }

.bg-dark    { background-color: var(--clr-dark); }
.bg-light   { background-color: var(--clr-light); color: var(--clr-dark); }
.bg-accent  { background-color: var(--clr-accent); color: var(--clr-dark); }
.bg-surface { background-color: var(--clr-surface); }


/* =========================================================
   7. FLEXBOX LAYOUT
   ========================================================= */
.flex        { display: flex; }
.flex-col    { display: flex; flex-direction: column; }
.flex-wrap   { flex-wrap: wrap; }

/* Column on mobile, row from tablet up */
.flex-stack { display: flex; flex-direction: column; }
@media (min-width: 768px) {
    .flex-stack { flex-direction: row; }
}

/* Alignment */
.items-start   { align-items: flex-start; }
.items-center  { align-items: center; }
.items-end     { align-items: flex-end; }

.justify-start   { justify-content: flex-start; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.justify-between { justify-content: space-between; }

/* Centre anything both ways */
.center { display: flex; align-items: center; justify-content: center; }

/* Let an item fill leftover space */
.grow { flex: 1; }


/* =========================================================
   8. GRID LAYOUT (responsive columns)
   ========================================================= */
.grid { display: grid; }

/* 1 col on mobile → 2 cols on tablet+ */
.grid-2 { display: grid; grid-template-columns: 1fr; }

/* 1 col → 2 cols → 3 cols */
.grid-3 { display: grid; grid-template-columns: 1fr; }

/* 1 col → 2 cols → 4 cols */
.grid-4 { display: grid; grid-template-columns: 1fr; }

@media (min-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Auto-fit grid: fits as many cards as space allows */
.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Gaps (work with both flex and grid) */
.gap-s { gap: var(--space-s); }
.gap-m { gap: var(--space-m); }
.gap-l { gap: var(--space-l); }


/* =========================================================
   9. WIDTH, IMAGES & MEDIA
   ========================================================= */
.w-full  { width: 100%; }
.h-full  { height: 100%; }

/* Images that never overflow their box */
.img-fluid { max-width: 100%; height: auto; display: block; }

/* Fill a box and crop neatly (great for gallery tiles) */
.img-cover { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Fixed shapes */
.aspect-square    { aspect-ratio: 1 / 1; }
.aspect-portrait  { aspect-ratio: 4 / 5; }
.aspect-landscape { aspect-ratio: 16 / 9; }


/* =========================================================
   10. BORDERS, CORNERS & SHADOWS
   ========================================================= */
.border        { border: 1px solid var(--clr-border); }
.border-accent { border: 1px solid var(--clr-accent); }
.border-top    { border-top: 1px solid var(--clr-border); }
.border-bottom { border-bottom: 1px solid var(--clr-border); }

.radius-s     { border-radius: var(--radius-s); }
.radius-m     { border-radius: var(--radius-m); }
.radius-l     { border-radius: var(--radius-l); }
.radius-round { border-radius: 50%; }         /* circle avatars */

.shadow-s { box-shadow: var(--shadow-s); }
.shadow-m { box-shadow: var(--shadow-m); }
.shadow-l { box-shadow: var(--shadow-l); }

.overflow-hidden { overflow: hidden; }


/* =========================================================
   11. BUTTONS
   ========================================================= */
.btn {
    display: inline-block;
    padding: 0.75em 1.5em;
    font-size: var(--text-m);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background-color: var(--clr-accent);
    color: var(--clr-dark);
    border: 2px solid var(--clr-accent);
    border-radius: var(--radius-s);
    cursor: pointer;
    text-align: center;
    transition: background-color var(--speed), color var(--speed), transform var(--speed);
}
.btn:hover {
    background-color: transparent;
    color: var(--clr-accent);
}
.btn:active { transform: scale(0.97); }

/* Outline style */
.btn-outline {
    background-color: transparent;
    color: var(--clr-accent);
}
.btn-outline:hover {
    background-color: var(--clr-accent);
    color: var(--clr-dark);
}

/* Sizes (combine with .btn) */
.btn-s { font-size: var(--text-s); padding: 0.5em 1em; }
.btn-m { font-size: var(--text-m); padding: 0.75em 1.5em; }
.btn-l { font-size: var(--text-l); padding: 1em 2.25em; }


/* =========================================================
   12. CARDS
   ========================================================= */
.card {
    background-color: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-m);
    overflow: hidden;
}

/* Lift slightly on hover */
.hover-lift { transition: transform var(--speed), box-shadow var(--speed); }
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-m);
}


/* =========================================================
   13. SHOW / HIDE BY SCREEN SIZE
   ========================================================= */
.hidden { display: none !important; }

/* Hide on phones only */
@media (max-width: 767px) {
    .hide-mobile { display: none !important; }
}
/* Hide on tablets only */
@media (min-width: 768px) and (max-width: 1023px) {
    .hide-tablet { display: none !important; }
}
/* Hide on desktop only */
@media (min-width: 1024px) {
    .hide-desktop { display: none !important; }
}

/* Visually hidden but still read by screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
