/* 
Theme Name: valueSTK Apps
File: valuestkapp.css
Description: Styles used for the icpreview app.
Author: valueSTK
Author URI: https://www.valuestk.com/
*/

/* 
    Table of Contents
      1. Reset  - Andy Bell's Modern Reset
      2. Design tokens and themes
      3. Base element styles
      4. Shared layout primitives
      5. Shared components
      6. Page sections 
      7. Page-specific components
      8. Utilities and states

  Responsive rules are colocated with their components.
*/

/* ==========================================================================
   1. RESET (Andy Bell's Modern Reset)
========================================================================== */

/* 1.1 Box sizing rules across all elements */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 1.2 Prevent mobile browser font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* 1.3. Remove default margin for micro-level layout control */
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd {
  margin-block-end: 0;
}

/* 1.4. Remove list styles on lists used explicitly as layout roles */
ul[role='list'], ol[role='list'] {
  list-style: none;
}

/* 1.5. Core body layout & line-height defaults */
body {
  min-height: 100vh;
  line-height: 1.5;
}

/* 1.6. Tighter line heights for headings and buttons */
h1, h2, h3, h4, button, input, label {
  line-height: 1.1;
}

/* 1.7. Balance heading text wrapping automatically */
h1, h2, h3, h4 {
  text-wrap: balance;
}

/* 1.8. Unstyled links inherit color naturally */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* 1.9. Make images & media responsive */
img, picture {
  max-width: 100%;
  height:auto;
  display: block;
}

/* 1.10 Form controls inherit parent typography */
input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* 1.11. Ensure empty textareas aren't microscopic on mobile touch */
textarea:not([rows]) {
  min-height: 10em;
}

/* 1.12 Add comfortable scroll margin when anchor targeting (#section) */
:target {
  scroll-margin-block: 5ex;
}

/* ==========================================================================
   2. DESIGN TOKENS (Variables used across ALL pages)
========================================================================== */

:root {
  /* Typography */
  --font-main: 'Lato', system-ui, -apple-system, sans-serif;
  --font-heading: 'Montserrat', system-ui, -apple-system, sans-serif;

  /* layout and spacing */
  --space-gutter: clamp(1rem, 4vw, 2.5rem);

  /* valueSTK Brand Palette */
  --brand-off-white: #F9F7F4; /* Warm off-white / light canvas */
  --brand-off-black: #3C3C3C; /* Soft off-black / dark canvas */
  --brand-primary:   #4E769E; /* Primary brand color / Slate Blue */
  --brand-secondary: #D7D1D5; /* Secondary brand color / Soft Greige */
  --brand-accent:    #B5D8CC; /* Accent / CTA color / Sea Foam */
  --brand-accent2:   #CE9DA9; /* Second Accent / CTA color / Dusty Pink*/
 
  /* UI Structural Layers derived from your palette */
  --brand-surface:   #F0EBEF; /* A slightly softer tint of your greige for distinct card depth */
  --brand-border:    #D7D1D5; /* Base greige acts as the perfect structural border */

  /* Light Mode Functional Roles */
  --bg-page:      var(--brand-off-white);
  --bg-card:      #FFFFFF;
  --text-heading: var(--brand-primary);
  --text-body:    var(--brand-off-black);
  --brand-cta:    var(--brand-accent);

  --border-color: var(--brand-surface);

  --color-link: var(--brand-primary); 
  --color-link-hover: var(--brand-off-black); 

}

/* Dark Mode Role Flip */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-page:      var(--brand-off-black);
    --bg-card:      #1E2328; /* Slightly lighter off-black for card depth */
    --text-heading: var(--brand-off-white);
    --text-body:    var(--brand-surface); /* Softer light color for reading comfort */
    --brand-cta:    var(--brand-secondary); /* Accent swap for dark contrast */
    --brand-border: #2D343B;

    --color-link: var(--brand-accent); 
    --color-link-hover: var(--brand-off-white); 
  }
}

/* ==========================================================================
   3. Base Elements
========================================================================== */

body {
  font-family: var(--font-main);
  font-size: 1.125rem;  /*18px if 16px is default */
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1,h2,h3 {
    margin-top: 0;
    color: var(--text-heading);
    font-family: var(--font-heading);
}

p{
    margin-bottom: 1rem;
}

a:not(.logo-link):not(.btn) {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:not(.logo-link):not(.btn):hover {
  color: var(--color-link-hover);
}

/* ==========================================================================
   4. LAYOUT PRIMITIVES
========================================================================== */

.site-container {
  width: 100%;
  max-width: 75rem; /* ~1200px max width */
  margin: 0 auto;
  padding-inline: var(--space-gutter);
}

/* ==========================================================================
   5. SHARED COMPONENTS
      5.1 Header
      5.2 Footer
      5.3 Buttons
      5.4 Forms
========================================================================== */

/* 5.1 Site Header ======================================================= */

/* FLEXIBLE HEADER (Your exact logo + title setup) */
.header-container {
  max-width: 75rem;
  margin-inline: auto; /* <-- ADD THIS to center the container */
  padding-inline: var(--space-gutter); /* <-- OPTIONAL: prevents touching screen edges on mobile */
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--brand-border);
}

/* Convert to side-by-side row on desktop */
@media (min-width: 48rem) {
  .header-container {
    flex-direction: row;
    justify-content: space-between;
  }
}

.logo-link {
  display: block;
  width: clamp(8rem, 15vw, 12rem); /* Your exact fluid logo sizing */
  text-decoration: none;
  line-height: 0;                   /* Prevents ghost space under image */
}

.site-logo {
  width: 100%;
  height: auto;
  display:block;
}

.report-title {
    margin: 0;
    font-size: 1rem;
    color: var(--text-heading);
    font-weight: 500;
}

.report-name {
    font-size:1.5rem;
}

/* 5.2 Site Footer ======================================================= */

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem;
    text-align: center;
}

.footer-line {
    display: block;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font: weight 300;
    line-height: 1.6;
   }

/* 5.3 Buttons =========================================================== */

/* Base Button (Default Size: Medium) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  
  /* Default Medium Size */
  padding: 0.625rem 1.25rem;
  font-size: 1rem;
  
  /* Smooth transitions for all state changes */
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

/* Accessibility: Focus state for keyboard navigation */
.btn:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* Tactile press effect for all buttons */
.btn:active {
  transform: translateY(1px);
}

/* Size Modifiers */
.btn-sm {
  padding: 0.375rem 0.75rem; /* ~6px 12px */
  font-size: 0.875rem;       /* 14px */
}

.btn-lg {
  padding: 0.875rem 1.75rem; /* ~14px 28px */
  font-size: 1.125rem;       /* 18px */
}


/* Color Variants with Hover States */

/* Primary Button (Dusty Pink Accent) */
.btn-primary {
  background-color: var(--brand-accent2);
  color: var(--brand-off-black);
}

.btn-primary:hover {
  /* Subtle dim/brightening effect that works in both light & dark mode */
  filter: brightness(0.92);
  transform: translateY(-1px);
}

/* Secondary / Outline Button */
.btn-secondary {
  background-color: transparent;
  border-color: var(--brand-border);
  color: var(--text-heading);
}

.btn-secondary:hover {
  background-color: var(--brand-surface);
  border-color: var(--text-heading);
  transform: translateY(-1px);
}

/* Third / Brand Colours */
.btn-brand { 
  background-color: var(--brand-primary); 
  color: var(--brand-off-white);}

.btn-brand:hover {
  /* Subtle dim/brightening effect that works in both light & dark mode */
  filter: brightness(0.80);
  transform: translateY(-1px);
}

/* Submit Button */
.btn-submit {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1.25rem;
  color: var(--brand-off-black);
  background-color: var(--brand-accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-submit:hover {
  filter: brightness(0.90);
  transform: translateY(-1px);
  /*background-color: #1d4ed8; */
}

.btn-submit:active {
  transform: scale(0.99);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #8aa3bb; /* optional muted version */
}

.btn-submit:disabled:hover {
  background-color: #8aa3bb;
}

/* 5.4 Forms ============================================================= */

/* Base container for the form */
.form-container {
  max-width: 45rem;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: 0.95rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Form group spacing */
.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
}

/* Labels */
.form-group label {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--brand-primary);
  margin-bottom: 0.5rem;
}

/* Text inputs, textareas, and selects */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: var(--text-body);
  background-color: var(--brand-off-white);
  border: 1px solid var(--brand-primary);
  border-radius: 8px;
  box-sizing: border-box; /* Ensures padding doesn't overflow container */
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Interactive focus state (essential for accessibility) */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #2563eb;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.form-group textarea { 
  /* Prevents horizontal expansion outside the form container */
  resize: vertical; 
  min-height: 200px; /* Optional: sets a sensible floor */
}


/* ==========================================================================
   6. PAGE SECTIONS
      6.1 Hero
      6.2 Call to Action (CTA)
      6.3 Widget Grid
========================================================================== */

/* 6.1 Hero Section ====================================================== */

.site-hero {
    background: var(--bg-page);
}

.hero-box {
    margin-top: 2rem;
}

.hero-box h1 {
  line-height: 2rem;
  margin-bottom: 2rem;
}

/* 6.2 Call-To-Action (CTA) Grid Module (Responsive Grid w Mobile sandwich */

.site-cta-grid {
  padding-block: clamp(2rem, 5vw, 2rem);
}

.cta-grid-wrapper {
  display: grid;
  gap: 1rem;
}

/* ------------------------------------------
   MOBILE LAYOUT (Default / Mobile-First)
   Order: Intro -> Image -> Features -> Button
------------------------------------------ */
.cta-grid-wrapper {
  grid-template-areas:
    "intro"
    "media"
    "features"
    "action";
}

.cta-intro    { grid-area: intro; }
.cta-media    { grid-area: media; }
.cta-features { grid-area: features; }
.cta-action   { grid-area: action; }

/* ------------------------------------------
   DESKTOP LAYOUT (768px and up)
   Left Column: Intro -> Features -> Button
   Right Column: Media (Spans top to bottom)
------------------------------------------ */
@media (min-width: 48rem) {
  .cta-grid-wrapper {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "intro    media"
      "features media"
      "action   media";
    column-gap: var(--space-gutter);
    align-items: center;
  }
}

/* Feature List & Icon Styling */
.cta-features {
  display: grid;
  gap: 1.25rem;
}

.feature-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.feature-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--brand-primary);
}

.feature-item p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  background-color: var(--brand-primary);
  color: var(--brand-off-white);
  border-radius: 50%;
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.cta-media img {
  border-radius: 0.75rem;
  object-fit: cover;
  width: 100%;
  max-height: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* 6.3 Widget Grid - Multi-Card Grid Module (For features, services, or widgets) */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: var(--space-gutter);
  margin-top: 2rem;
}

.card-widget {
  background: var(--brand-off-white);
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--brand-off-black);
}



/* ==========================================================================
   7. PAGE-SPECIFIC Components (Only if a page needs something unique)
      7.1 index.html
      7.2 results.html
========================================================================== */

/* 7.1 index.html ======================================================== */

/* form submit, please wait spinner */
.loading[hidden] {
    display: none;
}

.loading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 7.2 results.html ====================================================== */

/* REPORT ACTIONS & PRINT STYLING */
.report-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: -0.5rem; /* Tighter pull toward the first card */
}

.btn-print {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-primary);
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-print:hover {
  background-color: var(--brand-off-white);
  border-color: var(--brand-primary);
}

.print-icon {
  width: 16px;
  height: 16px;
}

/* REPORT CARDS & SECTIONS (Fixed Full-Width Stack) */
/* Main Container: Forces children to stretch to full container width */
.report-container {
  display: flex;
  flex-direction: column;
  align-items: stretch; /* Prevents cards from collapsing to fit content */
  width: 100%;
  gap: 1.5rem;
  margin-block: 2.5rem;
}

/* Outer Parent Cards */
.report-card {
  width: 100%; /* Ensures all 3 cards are identical full width */
  box-sizing: border-box;
  background-color: var(--bg-card) !important;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

/* Header Banner inside Report Cards */
.report-card .card-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left; /* Explicitly forces header text to the left */
}

.report-card .card-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  text-align: left;
}

/* Body Padding for Report Cards */
.report-card .card-body {
  padding: 1rem;
  background-color: #ffffff;
  text-align: left;
}

.report-card .card-body p {
  color: var(--brand-off-black);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.report-card .card-body p:last-child {
  margin-bottom: 0;
}

/* NESTED OPPORTUNITY CARDS (Dynamically Generated via JS) */
#opportunities-block {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Individual Opportunity Sub-Cards */
.opportunity-card {
  background-color: #fcfcfc; /* Off-white contrast against parent white card */
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--brand-primary); /* Accent strip on left */
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.opportunity-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.opportunity-observation,
.opportunity-business-implication,
.opportunity-recommendation {
  line-height: 1.6;
  margin-bottom: 0.75rem;
  color: var(--brand-off-black);
}

.opportunity-card p:last-child {
  margin-bottom: 0;
}

.opportunity-card strong {
  color: var(--brand-primary);
  font-weight: 700;
}

/* REPORT HEADER (Print) */
.report-header {
    display: none;
}

.report-header h1 {
    margin-bottom: 0.75rem;
}

.report-metadata {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var (--brand-border);
}

.report-metadata p {
    margin: 0.25rem 0;
}

.print-booking {
    display: none;
}


/* ==========================================================================
   8. UTILITIES AND STATES when needed place them here
   ========================================================================== */