/* Base Reset */
* {
  /* suppresses browser defaults */
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Includes padding and border in element's total width and height */
}

:root {
  /* responsive typography  */
  --step-0: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  --step-1: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  --step-2: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  

  /* layout variables */
  --text-max-width: 120ch; /* Constrain text for readability */
  --image-column-width: clamp(25rem, 42.5vw, 46rem);
  --gap-size: 1rem; /* Space between columns */
}

html {  
  font-size: 100%;
  line-height: 1.5;
}


.page-wrapper {
  display: block; /* Default for mobile */
}


@media (min-width: 768px) {
  .page-wrapper {
    position: relative;  
    display: grid;
    grid-template-columns:
      1fr
      var(--image-column-width);
    grid-template-rows:
      auto   /* header */
      1fr    /* main stretches to fill space */
      auto;  /* footer */


    grid-template-areas:
      "header image"
      "main   image"
      "footer image";

    gap: var(--gap-size);
    min-height: 100vh; /* Ensures full viewport height */
  }

  .layout-header { grid-area: header; }

  .layout-main {
    grid-area: main;
    max-width: var(--text-max-width);
  }

  .layout-footer { grid-area: footer; } 


  /* Diagnostic outlines 
  .layout-header { outline: 1px dashed limegreen; }
  .layout-main   { outline: 1px dashed orange; }
  .layout-footer { outline: 1px dashed cyan; } */

  .hero-wrapper {
    position: absolute;
    grid-area: image;
    width: 100%;
    /* Remove height: 115vh and top: -10% */
    bottom: 0; /* Pin to the bottom */
    left: 0;
    display: flex;
    justify-content: center;
    /* Remove align-items (let the image scale naturally) */
    overflow: visible; /* Allow the image to resize outside if needed */
  }

  .hero-image {

    width: clamp(75%, 85vw, 95%);
    height: auto; /* Let height scale with width */
    max-width: 100%;
    min-width: 12.5rem;
    object-fit: contain; /* Prevent cropping */
    object-position: center;
    /* Anchor the image to the bottom of its container */
    margin-top: auto;
    display: block;
  }
}


/* on mobile */
@media (max-width: 767px) {
  .hero-container {
    height: clamp(11rem, 40vw, 17rem); /* ~176px to ~272px */
    overflow: hidden;
    position: relative;
  }

.hero-image {
  display: block;
  margin: -5rem auto 0 auto; /* Pull upward and center horizontally */
  width: 50%; /* Or whatever scale you prefer */
  height: auto;
  position: relative;
  z-index: 1;
}


}

body {
  min-height: 100vh;
  background: linear-gradient(
    165deg,
    rgba(120, 115, 100, 1) 0%,
    rgba(84, 80, 68, 1) 10%,
    rgba(60, 58, 47, 1) 30%,
    rgba(31, 30, 26, 1) 70%
  );
  color: rgba(239, 226, 210, 1);
  font-family: system-ui, sans-serif;
  margin: 0;
  padding: 1rem;  
  padding-top: 0rem;
  padding-bottom: 0.25rem;
}

.layout-header > * {
  
  background-color: rgba(255, 0, 0, 0.05);
}



.layout-header {
  font-size: clamp(1.25rem, 1rem + 2vw, 2rem);
  margin-block-start: clamp(0.25rem, 1vh, 0.75rem);
  text-align: left;

}

.layout-main {
  margin-top: 0; /* If there's any inherited margin */
  padding-top: 0; /* If padding is contributing */
  overflow: hidden;

}

.layout-footer {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: clamp(0.75rem, 2vw, 1.5rem);
  padding-bottom: 0.25rem;
  font-size: 0.875rem;
  color: rgba(239, 226, 210, 0.8);
}

.nav-logo {
  display: block;
  margin: 0;
  padding: 0;
  width: clamp(8rem, 16.7vw, 10rem);
  height: clamp(8rem, 16.7vw, 10rem);
  object-fit: cover;
  border-radius: 50%;
}

@media (max-width: 768px) {
  .nav-logo {
    width: clamp(7rem, 21vw, 10rem);
    height: clamp(7rem, 21vw, 10rem);
    margin-left: 0;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    display: block;
    flex-shrink: 0;
    transition: width 0.3s ease, height 0.3s ease;

  }
}




.nav-wrapper {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1vw, 1.25rem); /* tighter spacing */
  margin: 0;
  padding: 0;
}


nav {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1vw, 1.25rem); /* matches wrapper */
  justify-content: flex-start;
  padding-top: clamp(0.1rem, 0.25vh, 0.25rem);
  padding-bottom: clamp(0.5rem, 1vh, 1rem);
}

@media (max-width: 600px) {

  /* Keep the nav vertical and left-aligned */
  nav {
    flex-direction: column; /* Force vertical stacking */
    align-items: flex-start; /* Align left */
    gap: clamp(0.25rem, 0.5vw, 0.75rem);
    padding-inline: clamp(0.25rem, 2vw, 0.75rem);
    overflow-x: hidden;
  }

  /* Ensure nav items stay full-width and left-aligned */
  .nav-item {
    width: 100%;
    align-items: flex-start; /* Align left */
    flex: none; /* Disable flex resizing */
  }


  nav a,
  .nav-item > a {
    font-size: clamp(0.9rem, 0.5vw + 0.8rem, 1.05rem);
    padding: 0.2rem 0; /* Only vertical padding */
    white-space: nowrap;
  }

  .subnav-box {
    width: 50%;
    min-width: auto; /* Remove fixed min-width */
    margin-left: 1rem; /* Indent for hierarchy */
    font-size: clamp(0.75rem, 0.5vw + 0.7rem, 0.9rem);
    position: static; /* Ensure it pushes down the next item */
  }
}


.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center; /* keeps top-level link vertically aligned */
}


nav a,
.nav-item > a {
  display: inline-block;
  font-size: clamp(1.05rem, 0.6vw + 0.9rem, 1.25rem);
  letter-spacing: 0.02em;
  text-decoration: none;
  color: inherit;
  padding: 0.25rem 0.5rem; 
  transition: text-decoration 0.2s ease-in-out;
}


.nav-item > a:hover {
  text-decoration: underline;
}

.nav-item > a:visited {
  color: inherit;
}

.subnav-box {
  display: none;
  position: absolute;
  top: 100%; /* Position below the parent link */
  left: 0;
  background-color: rgba(239, 235, 223, 0.95);
  border: 1px solid rgba(239, 235, 223, 0.6);
  padding: 0.5rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
  z-index: 10;
  min-width: 150px;
  border-radius: 0.3rem;
}

.nav-item:hover .subnav-box {
  display: block;
}

.subnav-box a {
  display: block;
  padding: 0.15rem 0.25rem;
  font-size: clamp(0.85rem, 0.75rem + 0.5vw, 1rem);
  color: rgba(57, 61, 71, 1);
  text-decoration: none;
}

.subnav-box a:hover {
  text-decoration: underline;
  color: rgba(57, 61, 71, 1);
}


@media (max-width: 768px) {
  /* Reset ONLY what causes indentation */
  .nav-wrapper,
  nav {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }

  /* Force vertical stacking */
  .nav-wrapper {
    display: flex;
    flex-direction: column; /* Vertical layout */
    align-items: flex-start; /* Align left */
    gap: 0.5rem; /* Spacing between items */
    width: 100%; /* Full width */
  }

  nav {
    display: flex;
    flex-direction: column; /* Vertical layout */
    align-items: flex-start; /* Align left */
    width: 100%; /* Full width */
    gap: 0.5rem; /* Spacing between items */
  }

  /* Nav items: full width, no indentation */

  .nav-item {
    width: 100%;
    text-align: left;
    padding-left: 0; /* Default: no indentation */
  }

  /* Subnav items: add padding-left for indentation */
  .nav-item.has-subnav { /* Add this class to nav items with subnav */
    margin-left: 1rem; /* Indent only subnav boxes */
    padding-left: 0;
  }

  /* Nav links: full width, no indentation */
  .nav-item > a {
    display: block;
    width: 100%;
    padding: 0.5rem 0; /* Only vertical padding */
    font-size: clamp(1.05rem, 0.6vw + 0.9rem, 1.25rem);
    border-bottom: 1px solid rgba(57, 61, 71, 0.1);
    text-align: left;
  }

  .subnav-box {
    position: static;
    display: none;
    width: 50%;
    background-color: rgba(239, 235, 223, 0.95);
    border: 1px solid rgba(239, 235, 223, 0.6);
    border-radius: 0.3rem;
    padding: 0.5rem;
    margin-top: 0.25rem;
    margin-left: 1rem; /* Indent the box */
    box-sizing: border-box;
  } 

  /* Subnav links */
  .subnav-box a {
    display: block;
    padding: 0.25rem 0.5rem;
    font-size: clamp(0.85rem, 0.5vw + 0.8rem, 1rem);
    color: rgba(57, 61, 71, 1);
    text-decoration: none;
  }

  /* Show subnav on interaction */
  .nav-item:hover .subnav-box,
  .nav-item:focus-within .subnav-box {
    display: block;
  }
}

.breadcrumb {
  margin: 0;
  padding: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.breadcrumb p {
  margin: 0;
  padding: 0;
}

@media (max-width: 768px) {
  .breadcrumb {
    font-size: 0.875rem; /* Slightly smaller for mobile */
    margin-top: 0.75rem; /* Creates space below nav */
    margin-bottom: 0;    /* Ensures it sits flush with the <hr> */
    padding-left: 0;     /* Prevents unintended indentation */
    padding-right: 0;
  }

  .breadcrumb p {
    font-size: inherit;
    margin: 0;
    padding: 0;
  }
}

/* Main details */
.layout-main h1 {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  margin-block-end: 0.5em;
}

.layout-main h2 {
  font-size: clamp(0.95rem, 0.85rem + 0.3vw, 1.1rem); /* Smaller and subtler */
  font-weight: 700;
  line-height: 1.3;
  margin-block-start: 1em;
  margin-block-end: 0.25em; /* Reduced spacing below */
}


.layout-main p {
  font-size: clamp(0.85rem, 0.75rem + 0.5vw, 1rem);
  line-height: 1.6;
  max-width: 80ch;
  margin: 0 0 1em 0; /* Removes top margin, keeps bottom spacing */
}


.layout-main ul {
  padding-left: 1rem; /* Matches body horizontal padding */
  margin: 0 0 1em 0;
  list-style-position: outside;
}

a {
  color: rgba(210, 160, 100, 1); /* copper tone for better contrast */
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
  color: rgba(230, 180, 120, 1); /* hover accent */
}



.journey-btn {
  background: linear-gradient(135deg, rgba(255, 200, 0, 0.9), rgba(255, 100, 0, 0.9));
  color: #000;
  font-size: clamp(1rem, 2vw, 1.25rem);
  padding: clamp(0.5rem, 1vw, 0.75rem) clamp(1.5rem, 3vw, 2rem);
  margin-block: 1.5rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow:
    0 0.25rem 0.5rem rgba(255, 200, 0, 0.4), /* subtle yellow glow */
    0 0.5rem 1rem rgba(255, 150, 50, 0.3);   /* warm ambient shadow */
}

.journey-btn:hover {
  transform: scale(1.05);
  box-shadow:
    0 0.5rem 1rem rgba(255, 200, 0, 0.6),   /* intensified yellow glow */
    0 0.75rem 1.5rem rgba(255, 150, 50, 0.5);
}

.journey-btn:active {
  transform: scale(0.98);
  box-shadow:
    0 0.2rem 0.4rem rgba(255, 200, 0, 0.5), /* compressed yellow glow */
    0 0.4rem 0.8rem rgba(255, 100, 0, 0.4); /* slightly deeper orange */
}


/* Table details */

table {
  width: 100%;
  max-width: 800px;
  margin: 0 0 2.5rem 0; /* top, right, bottom, left */
  border-collapse: collapse;
  font-size: clamp(0.85rem, 0.75rem + 0.5vw, 1rem);
  color: rgba(239, 226, 210, 1);
}

.table-layout_books {
  width: 100%;
  max-width: 800px;
  margin-left: 0;
  border-collapse: collapse;
  table-layout: fixed; /* ← this is essential */
  font-size: clamp(0.85rem, 0.75rem + 0.5vw, 1rem);
  color: rgba(239, 226, 210, 1);
}

/* Prevent long words from overflowing */
.table-layout_books td,
.table-layout_books th {
  word-break: break-word;
  overflow-wrap: anywhere;
}

thead {
  background-color: rgba(239, 235, 223, 0.15);
  color: rgba(239, 226, 210, 1);
}

thead th {
  text-align: center;
}

th,
td {
  font-size: inherit; /* inherits from table */
  font-weight: normal;
  padding: 0.5rem 0.75rem;
  vertical-align: top;
  text-align: left;
  border: 1px solid rgba(239, 235, 223, 0.6);
}

/* General column widths */
td:nth-child(1),
th:nth-child(1) {
  width: 10%; /* image column */
}

td:nth-child(2),
th:nth-child(2) {
  width: 50%; /* attribution */
}

td:nth-child(3),
th:nth-child(3) {
  width: 38%; /* course info */
}

/* Specific to .table-layout_books */
.table-layout_books td:nth-child(1),
.table-layout_books th:nth-child(1) {
  width: 20%; /* Book title */
}

.table-layout_books td:nth-child(2),
.table-layout_books th:nth-child(2) {
  width: 20%; /* Author */
}

.table-layout_books td:nth-child(3),
.table-layout_books th:nth-child(3) {
  width: 60%; /* Description */
}

td a {
  color: rgba(210, 160, 100, 1); /* copper tone */
}

td a:hover {
  color: rgba(230, 180, 120, 1); /* hover accent */
  text-decoration: underline;
}



/* Online Form */

/* Contact Form Styles */
form {
  max-width: var(--text-max-width);
  margin: 0 auto;
  padding: 1.5rem;
  font-family: system-ui, sans-serif;
}

form label {
  display: block;
  margin-block-end: 0.5rem;
  font-size: var(--step-0);
  color: rgba(239, 226, 210, 1);
}

form input[type="email"],
form input[type="text"],
form select,
form textarea {
  width: 100%;
  padding: 0.75rem;
  margin-block-end: 1.5rem;
  border: 1px solid rgba(239, 226, 210, 0.3);
  border-radius: 0.5rem;
  background-color: rgba(60, 58, 47, 0.6);
  color: rgba(239, 226, 210, 1);
  font-size: var(--step-0);
  transition: border-color 0.2s ease;
}

form input[type="email"]:focus,
form input[type="text"]:focus,
form select:focus,
form textarea:focus {
  outline: none;
  border-color: rgba(255, 200, 0, 0.8);
  box-shadow: 0 0 0 2px rgba(255, 200, 0, 0.3);
}

form textarea {
  min-height: 120px;
  resize: vertical;
}

form button[type="submit"] {
  /* Match your .journey-btn style */
  background: linear-gradient(135deg, rgba(255, 200, 0, 0.9), rgba(255, 100, 0, 0.9));
  color: #000;
  font-size: var(--step-0);
  padding: 0.75rem 2rem;
  margin-block: 1.5rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow:
    0 0.25rem 0.5rem rgba(255, 200, 0, 0.4),
    0 0.5rem 1rem rgba(255, 150, 50, 0.3);
}

form button[type="submit"]:hover {
  transform: scale(1.05);
  box-shadow:
    0 0.5rem 1rem rgba(255, 200, 0, 0.6),
    0 0.75rem 1.5rem rgba(255, 150, 50, 0.5);
}

form button[type="submit"]:active {
  transform: scale(0.98);
  box-shadow:
    0 0.2rem 0.4rem rgba(255, 200, 0, 0.5),
    0 0.4rem 0.8rem rgba(255, 100, 0, 0.4);
}

form label[for="consent"] {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-block: 1rem;
  font-size: var(--step-0);
}

form input[type="checkbox"] {
  width: auto;
  margin: 0;
}




/* Footer details */

.footer-left,
.footer-center,
.footer-right {
  flex: none;
}

.footer-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

/* Trademark Superscript */
.footer-projectname sup {
  font-size: 0.8em;
  position: relative;
  top: -0.2em;
}

/* Responsive Fallback */
@media (max-width: 600px) {
  .layout-footer {
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-top: 1rem;
    gap: 0.5rem;
    font-size: 0.75rem; /* Scales down from default */
  }

  .footer-left,
  .footer-right {
    text-align: center;
    margin-block: 0.25rem;
  }

  .footer-center {
    position: static;
    transform: none;
    margin-block: 0.25rem;
  }
}


  .footer-left,
  .footer-right {
    text-align: center;
    margin-block: 0.25rem;
  }

  .footer-center {
    position: static;
    transform: none;
    margin-block: 0.25rem;
  }
}


