/* ==================================================================
   style.css  —  HOW THE WHOLE SITE LOOKS

   One file controls all three pages. Change something here and it
   changes everywhere at once.

   Comments in CSS look like this one: slash-star to star-slash.

   Every rule has the same shape:

       what-to-style {
         what-to-change: new-value;
       }

   Nothing in here can break anything. If it looks wrong, change the
   value back or hit Cmd+Z.
   ================================================================== */


/* ---- THE BRAND COLORS, ALL IN ONE PLACE -------------------------
   These are nicknames. Change a color HERE and every heading,
   button, and link across all three pages changes with it.
   This is the single most useful idea in CSS.

   START HERE: change --brand to a different color, save, and look.

   Colors are #RRGGBB in hex. Easiest way to get one: search
   "color picker" and copy the # code.
   ------------------------------------------------------------------ */
:root {
  --brand:       #e8562a;   /* K3 orange — TRY CHANGING THIS FIRST */
  --brand-dark:  #b73d18;   /* darker version, for hover */
  --ink:         #22222a;   /* main text */
  --ink-soft:    #6a6a75;   /* less important text */
  --paper:       #fdfcfa;   /* page background */
  --card-bg:     #ffffff;   /* inside the boxes */
  --line:        #e6e3dd;   /* thin divider lines */
  --highlight:   #fdf3ee;   /* tinted background for callouts */

  --radius:      12px;      /* how round the corners are. 0 = square */
}


/* ---- THE WHOLE PAGE --------------------------------------------- */
body {
  /* A stack of fonts — the browser uses the first one it has.
     This list gets the clean modern system font on any computer. */
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;

  line-height: 1.6;        /* space between lines of text */
  color: var(--ink);        /* var() looks up a nickname from above */
  background-color: var(--paper);

  /* Keeps the text column narrow enough to read, and centers it. */
  max-width: 54rem;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}


/* ---- THE TOP OF EVERY PAGE -------------------------------------- */
header {
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--line);
  margin-bottom: 2rem;
}

h1 {
  font-size: 2.6rem;
  color: var(--brand);
  margin: 0;

  /* Pulls the letters slightly closer together. Big text usually
     looks better this way. Try deleting this line to see why. */
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.2rem 0 1rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}


/* ---- THE MENU --------------------------------------------------- */
nav a {
  margin-right: 1.5rem;
  text-decoration: none;     /* removes the underline */
  color: var(--ink);
  font-weight: 600;
}

/* :hover means "only while the mouse is on it." Hover a menu
   item and watch it turn orange. */
nav a:hover {
  color: var(--brand);
}


/* ---- HEADINGS --------------------------------------------------- */
h2 {
  font-size: 1.7rem;
  margin-top: 2.75rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
}


/* ---- THE OPENING PITCH ON THE HOME PAGE ------------------------- */
.hero h2 {
  margin-top: 0;
  font-size: 2rem;
  max-width: 28rem;      /* forces a nice short line length */
}

.hero p {
  font-size: 1.1rem;
  max-width: 34rem;
}


/* ---- THE PRODUCT GRID ------------------------------------------
   This is the part worth understanding, because it does the work.

   "repeat(auto-fit, minmax(15rem, 1fr))" means:
     fit as many columns as you can, but never let one get
     narrower than 15rem, and share the leftover space evenly.

   The result: 3 across on a laptop, 2 on a tablet, 1 on a phone —
   and you never wrote a single rule about laptops or phones.
   Add a 10th product and it still works.

   EXPERIMENT: change 15rem to 22rem and watch the columns get
   fewer and wider. Then change it back.
   ------------------------------------------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;            /* space between the boxes */
  margin: 1.5rem 0;
}


/* ---- THE PRODUCT BOXES ----------------------------------------
   Styles anything labeled class="card". The dot means "class."
   ------------------------------------------------------------------ */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem 1.25rem;

  /* A soft shadow: across, down, blur, color.
     Delete this line to see how much it was doing. */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);

  /* Makes the hover effect below glide instead of snapping. */
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Lifts the box slightly when the mouse is over it. Small touch,
   makes the page feel alive. translateY(-3px) = move up 3 pixels. */
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.09);
}

.price {
  font-weight: 700;
  color: var(--brand);
  font-size: 1.15rem;
  margin: 0.5rem 0 0;
}


/* ---- THE PLACEHOLDER WHERE PHOTOS WILL GO ----------------------
   A striped gray box that holds the right shape until you have a
   real photo. Once every card has an <img>, you can delete this
   whole rule.
   ------------------------------------------------------------------ */
.photo-placeholder {
  /* aspect-ratio keeps it a consistent shape no matter the width */
  aspect-ratio: 4 / 3;
  background-color: #f1efe9;
  border-radius: 8px;
  margin-bottom: 0.85rem;

  /* These three lines center the text inside the box. */
  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--ink-soft);
  font-size: 0.85rem;
}


/* ---- REAL PHOTOS ------------------------------------------------ */
.card img {
  /* This line is the important one: it stops a huge photo from
     blowing out the layout. Never leave it out. */
  max-width: 100%;

  aspect-ratio: 4 / 3;

  /* Crops the photo to fill the shape instead of squashing it. */
  object-fit: cover;

  border-radius: 8px;
  margin-bottom: 0.85rem;
  display: block;
}


/* ---- BUTTONS ---------------------------------------------------
   These are ordinary links wearing class="button". Nothing about
   them is really a button — CSS just makes them look like one.
   ------------------------------------------------------------------ */
.button {
  display: inline-block;
  background-color: var(--brand);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;     /* huge number = perfect pill shape */
  margin-top: 0.5rem;
}

.button:hover {
  background-color: var(--brand-dark);
}


/* ---- TINTED CALLOUT BOXES -------------------------------------- */
.callout {
  background-color: var(--highlight);
  border-left: 4px solid var(--brand);   /* the orange stripe */
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 2.5rem 0;
}

.callout h2,
.callout h3 {
  margin-top: 0;
}


/* ---- LINKS IN THE TEXT ----------------------------------------- */
main a {
  color: var(--brand);
}

/* :not(.button) means "every link EXCEPT the button-shaped ones" —
   otherwise the buttons would get underlined too. */
main a:not(.button):hover {
  color: var(--brand-dark);
}


/* ---- LISTS ----------------------------------------------------- */
ol, ul {
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.4rem;
}


/* ---- THE TABLE ------------------------------------------------- */
table {
  width: 100%;

  /* Makes the cell borders share one line instead of doubling up. */
  border-collapse: collapse;

  margin: 1.25rem 0;
}

th, td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--ink-soft);
  font-size: 0.85rem;

  /* Makes the header row ALL CAPS without retyping the words. */
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


/* ---- THE BOTTOM OF EVERY PAGE ---------------------------------- */
footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-soft);
}


/* ---- THE "PROUDLY PART OF" LOGO ROW ----------------------------
   Sits just above the copyright line at the bottom of every page.

   The two logos are different shapes — one is stacked and squarish,
   the other is long and low — so giving them the SAME height would
   make the long one look twice as big. Instead each gets its own
   height below, picked so they look evenly matched side by side.
   ------------------------------------------------------------------ */
.affiliation {
  margin-bottom: 1.1rem;
}

.affiliation-label {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.affiliation-logos {
  display: flex;
  align-items: center;
  gap: 2.25rem;        /* space between the logos */

  /* On a narrow phone, let them drop onto two lines instead of
     squashing. Delete this line and shrink your window to see why. */
  flex-wrap: wrap;
}

/* Only the height is set. Leaving width on "auto" lets each logo
   keep its own proportions — never set both, or they stretch. */
.affiliation-logos img {
  width: auto;
  display: block;
}

.logo-group  { height: 46px; }   /* the stacked one, so it runs taller */
.logo-popeck { height: 32px; }


/* ---- PHONES ---------------------------------------------------
   Rules in here apply ONLY on screens narrower than 480px. This is
   how one site works on a laptop and a phone both.

   Drag your browser window skinny and watch the big heading shrink
   and the product grid stack into one column.
   ------------------------------------------------------------------ */
@media (max-width: 480px) {
  body {
    padding: 1.25rem 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .hero h2 {
    font-size: 1.5rem;
  }

  nav a {
    margin-right: 1rem;
    font-size: 0.95rem;
  }

  /* the footer logos, a little smaller on a phone */
  .logo-group  { height: 38px; }
  .logo-popeck { height: 26px; }
}
