/* ===========================================
   MEYER RESET
   Keeps all browsers starting from the same baseline.
   http://meyerweb.com/eric/tools/css/reset/
   =========================================== */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video{
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section{
  display: block;
}

body{ line-height: 1; }
ol, ul{ list-style: none; }
blockquote, q{ quotes: none; }
blockquote::before, blockquote::after,
q::before, q::after{ content: ""; }
table{ border-collapse: collapse; border-spacing: 0; }

/* Every element uses border-box for easier sizing */
*{ box-sizing: border-box; }

/* ===========================================
   DESIGN TOKENS
   Re-usable colours and spacing values.
   =========================================== */

:root{
  /* Text colours */
  --ink: #111111;
  --ink-strong: #083D77;

  /* Accent colours */
  --accent: #DA4167;     /* used for underlines and details */
  --brand:  #24DAEB;     /* highlight colour for buttons etc. */

  /* Backgrounds and borders */
  --page-bg:   #ffffff;
  --card-bg:   #ffffff;
  --card-edge: #dfeaf1;

  /* Per-object accents (used on object pages if needed) */
  --obj-1: #7c5cff;   /* headphones */
  --obj-2: #34d399;   /* perfume diffuser */
  --obj-3: #f59e0b;   /* Stanley cup */

  /* Layout */
  --max-width: 960px;
}

/* ===========================================
   BASE TYPOGRAPHY AND PAGE SETUP
   =========================================== */

html, body{
  height: 100%;                 /* supports sticky footer pattern */
}

body{
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page-bg);

  /* Stack layout: header, main, footer */
  display: flex;
  flex-direction: column;
}

/* Main area grows to push the footer to the bottom of the screen */
main{
  flex: 1;
}

/* Headings and navigation links: use Montserrat for contrast */
h1, h2, h3, nav a{
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

/* Limit content width and centre it */
main{
  max-width: var(--max-width);
  margin: 60px auto;
  padding: 0 20px;
}

/* Page title */
main > h1{
  font-size: 2.4rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--ink-strong);
  margin-bottom: 4px;
}

/* Intro paragraph directly after the page title */
main > h1 + p{
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 26px;
}

/* Generic paragraph spacing inside main content */
main p{
  margin-bottom: 1rem;
}

/* ===========================================
   HEADER + NAVIGATION (shared on all pages)
   =========================================== */

header{
  background: #ffffff;
  border-bottom: 1px solid var(--accent);
  padding: 14px 24px;
  display: flex;
  align-items: centre;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Site name in the header */
header h1{
  font-size: 1.4rem;
  text-transform: lowercase;
  letter-spacing: 0.18em;
  color: var(--ink-strong);
}

/* Top-level navigation list */
nav ul{
  display: flex;
  gap: 10px;
}

/* Individual navigation links */
nav ul li > a{
  display: block;
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  background: #e4f7ff;
  color: var(--ink-strong);
  transition: background .2s ease, transform .2s ease;
}

/* Simple hover feedback */
nav ul li > a:hover{
  background: var(--brand);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Active tab style: highlight the "Objects" link on this page */
nav ul li:first-child > a{
  background: var(--brand);
  color: #ffffff;
}

/* ===========================================
   OBJECTS HOMEPAGE – CARD GRID
   Applied to the <section> that contains the three articles.
   =========================================== */

section{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

/* Entire article is clickable via the link */
section article a{
  display: block;
  text-decoration: none;
  color: inherit;

  background: var(--card-bg);
  border: 1px solid var(--card-edge);
  border-radius: 16px;
  overflow: hidden;

  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transform: translateZ(0);
  transition: transform .25s ease, box-shadow .25s ease;
}

/* Card image – show the full photo instead of cropping it */
section article img{
  width: 100%;          /* fill the card width */
  height: auto;         /* keep original proportions */
  display: block;       /* remove inline gaps */
  border-bottom: 4px solid #47cfff; /* keep your accent line */
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

/* Card heading */
section article h2{
  font-size: 1.15rem;
  margin: 12px 14px 4px;
}

/* Card description */
section article p{
  color: var(--ink-strong);
  margin: 0 14px 16px 14px;
}

/* Hover state: very light lift and shadow */
section article a:hover{
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

/* Keyboard focus: clearly indicate the focused card */
section article a:focus-visible{
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

/* ===========================================
   OBJECT DETAIL PAGES (headphones, perfume, Stanley)
   Use the same HTML structure on each:
   <main>
     <h1>Object name</h1>
     <p class="lede">Short intro sentence…</p>
     <img …>
     <article>Full 200–300 word description…</article>
   </main>
   =========================================== */

/* Slightly different layout when a page has a single article */
main > article{
  max-width: 720px;
  margin: 24px auto 0;
}

/* Optional helper class for the intro paragraph on object pages */
.lede{
  font-size: 1.05rem;
  color: var(--accent);
}

/* Images on object detail pages */
main > img{
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  margin: 18px auto 10px;
  border-radius: 12px;
  border: 4px solid var(--card-edge);
}

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

footer{
  text-align: centre;
  color: var(--ink-strong);
  font-size: 0.85rem;
  border-top: 1px solid var(--accent);
  padding: 16px 0;
}

/* ===========================================
   RESPONSIVE ADJUSTMENTS
   =========================================== */

/* Medium screens: let the content breathe a bit more */
@media (max-width: 900px){
  main{
    margin: 40px auto;
  }
}

/* Small screens: stack navigation and cards cleanly */
@media (max-width: 640px){

  header{
    gap: 10px;
  }

  nav ul{
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  main{
    margin: 32px auto 40px;
  }

  section{
    grid-template-columns: 1fr;   /* one card per row */
  }

  main > img{
    max-width: 100%;
  }
}

/* =========================================
   OBJECT DETAIL PAGES
   Matching the card style from objects.html
   Target: body.object-page
   ========================================= */

/* Stack layout and width for all object pages */
body.object-page main{
  /* Stop using the two-column grid on these pages */
  display: block;

  /* Match overall width / centring */
  max-width: 800px;
  margin: 60px auto;
  padding: 0 20px 60px;
  text-align: left;
}

/* Object page main heading (no gradient here) */
body.object-page main h1{
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 4px;

  /* Turn off the global gradient effect just for this heading */
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: var(--ink-strong);
}

/* The small label under the heading: “Designed Object” */
body.object-page main p:first-of-type{
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 24px;
}

/* Main object image – card treatment to match homepage tiles */
body.object-page main > img{
  width: 100%;
  height: auto;
  display: block;

  border-radius: 16px;
  border: 1px solid var(--card-border);
  box-shadow: var(--glow);
  margin: 0 0 24px;
}

/* Text block for the reflection */
body.object-page article{
  max-width: 60ch;           /* keeps line length comfortable */
  font-size: 1rem;
  line-height: 1.7;
}

body.object-page article p{
  margin-bottom: 1rem;
}

/* Small screen tweak: give it a bit more breathing room */
@media (max-width: 520px){
  body.object-page main{
    margin: 40px auto 48px;
    padding: 0 16px 48px;
  }
}