/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

:root {
  --bg: #fffdf9;
  --ink: #222222;
  --muted-ink: #555555;
  --accent: #ff6d00; /* warm  */
  --accent-2: #5cab7d; /* soft green */
  --surface: rgb(255, 255, 255);
  --card-surface: rgba(255, 255, 0, 0.2);
  --border: #e6e1d9;
  --shadow: 0 2px 10px rgba(0,0,0,0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1100px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* subtle knit-like grid background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(0deg, rgba(0,0,0,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.035) 1px, transparent 1px);
  background-size: 20px 20px, 20px 20px;
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-sticker {
  width: 100px;
  /*height: 20px;*/
  object-fit: contain;
  border-radius: 6px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: #fff;
}

.brand-name {
  font-size: 1.25rem;
  letter-spacing: 1px;
  margin: 0;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  margin-left: 18px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.site-nav a:hover {
  border-color: var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

/* Hero */
.hero {
  padding: 56px 0 24px;
}
.hero-inner {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 14px;
}
.hero-badge {
  display: inline-grid;
  place-items: center;
  padding: 10px 12px;
  background: #fff;
  border: 2px solid #000;
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 #000;
  transform: rotate(-2deg);
}
.hero-badge img {
  width: 300px;
  /*height: 150px;*/
  object-fit: contain; }

.hero h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  margin: 0;
}
.hero p {
  color: var(--muted-ink);
  margin: 0;
}

/* Products */
.products {
  padding: 28px 0 60px;
}
.products h2 {
  font-size: 1.4rem;
  margin: 0 0 16px 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 50px;
}

.card {
  background: var(--card-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, rgba(0,0,0,0.04), rgba(0,0,0,0.02));
  display: grid;
  place-items: center;
}
.card-media img {
  width: 90%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.12));
  border-radius: var(--radius);
  border-color: var(--border);
  border-width: 2px;
}
.card-body {
  padding: 14px;
  display: grid;
  gap: 8px;
  white-space: pre-line;
}
.card-title {
  margin: 0;
  font-size: 1.5rem;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.25rem;
}
.price {
  font-weight: 700;
}
.tag {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  padding: 6px 10px;
  border: 1px solid #000;
  border-radius: 999px;
  /*box-shadow: 3px 3px 0 #000;*/
  background: greenyellow;
  color: #000
}
.tag.alt { background: var(--accent-2); }

.card-actions {
  min-height: 20px;
  text-align: center;
  margin-top: auto;
  margin-bottom: 1em;
  padding: 0 14px 14px;
}
.button {
  display: inline-block;
  text-decoration: none;
  background: #fff;
  color: #000;
  border: 1px solid #000;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-weight: 700;
  /*box-shadow: 4px 4px 0 #000;*/
  transition: transform 0.05s ease-in-out;
}
.button:hover { transform: translate(-1px, -1px); }
.button:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 #000; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 22px 0;
  color: var(--muted-ink);
  font-size: 0.95rem;
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .site-nav a { margin-left: 10px; }
  .header-inner { padding: 10px 0; }
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 100;
}

.modal {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  padding: 20px 20px 24px;
  position: relative;
}

.modal h3 {
  margin: 0 0 8px 0;
  font-size: 1.35rem;
}

.modal-body {
  margin: 0;
  color: var(--muted-ink);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.contact-email {
  font-weight: 700;
  color: var(--ink);
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

