/*
    File: css/style.css
    OZ On Line — 3D Ice Cubes theme (transparent crystalline glassmorphism)
    For ozol.au (shortener) + shared with ozol.org (portfolio)
    Date: 2026-06-14 22:30 AEST (Melbourne)
    Version: v1.05 (footer fixed to exact 1-line format with current version as requested)
*/

:root {
  /* Ice palette — cool, deep, premium */
  --ice-base: #0a111f;
  --ice-glass: rgba(12, 20, 36, 0.42);
  --ice-glass-light: rgba(240, 248, 255, 0.55);
  --ice-border: rgba(148, 163, 184, 0.28);
  --ice-border-strong: rgba(103, 232, 249, 0.35);
  --ice-rim: rgba(255, 255, 255, 0.65);
  --ice-specular: rgba(103, 232, 249, 0.25);
  --ice-cyan: #67e8f9;
  --ice-teal: #22d3ee;
  --ice-text: #e0f0ff;
  --ice-text-dark: #0f172a;
  --radius: 22px;
  --radius-sm: 14px;
  --pad: 1.5rem;
  --shadow-depth: 0 20px 60px -10px rgba(0, 0, 0, 0.55),
                  0 8px 24px -6px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100dvh;
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ice-text);
  background: #050a12 url('/images/hero/background2-3.webp') center/cover no-repeat fixed;
  background-attachment: fixed;
}

body.light {
  color: var(--ice-text-dark);
  background: #f1f5f9 url('/images/hero/background2-3.webp') center/cover no-repeat fixed;
}

/* Subtle cool veil for ice depth */
.veil {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(180deg, rgba(5,10,18,0.65) 0%, rgba(5,10,18,0.35) 45%, rgba(5,10,18,0.55) 100%);
  transition: background .4s ease;
}
body.light .veil {
  background: linear-gradient(180deg, rgba(241,245,249,0.55) 0%, rgba(241,245,249,0.25) 50%, rgba(241,245,249,0.45) 100%);
}

.page {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

/* Logo */
.logo {
  width: clamp(200px, 38vw, 340px);
  height: auto;
  display: block;
  margin: 0.5rem auto 1rem;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

/* Links — clean, no underlines (premium ice / Apple-like) */
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}

/* Key accent links (teaser, footer) get subtle cyan treatment on hover via their classes */
footer a:hover,
.portfolio-teaser a:not(.portfolio-link):hover {
  color: var(--ice-cyan);
}

/* === 3D ICE CUBE / CRYSTALLINE GLASS === */
.card,
.ice,
.ice-block {
  position: relative;
  border-radius: var(--radius);
  background: var(--ice-glass);
  border: 1px solid var(--ice-border);
  padding: var(--pad);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow: var(--shadow-depth);
  overflow: hidden;
  /* Extra ice thickness */
  box-shadow: 
    var(--shadow-depth),
    0 0 0 1px var(--ice-border-strong) inset,
    0 1px 0 0 var(--ice-rim) inset; /* top rim light */
  transition: transform 0.2s cubic-bezier(0.23, 1.0, 0.32, 1), 
              box-shadow 0.2s cubic-bezier(0.23, 1.0, 0.32, 1),
              border-color 0.2s;
}

/* Light mode glass */
body.light .card,
body.light .ice,
body.light .ice-block {
  background: var(--ice-glass-light);
  border-color: rgba(15, 23, 42, 0.18);
  box-shadow: 
    0 10px 40px -8px rgba(15, 23, 42, 0.12),
    0 4px 12px -2px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

/* Crystalline edge + specular highlight layer */
.card::before,
.ice::before,
.ice-block::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    145deg,
    rgba(255,255,255,0.18) 0%,
    rgba(255,255,255,0.03) 28%,
    transparent 52%
  );
  z-index: 1;
  mix-blend-mode: screen;
}

/* Subtle bottom internal shadow for thickness */
.card::after,
.ice::after,
.ice-block::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 -18px 28px -12px rgba(0, 0, 0, 0.45);
  z-index: 2;
}
body.light .card::after,
body.light .ice::after,
body.light .ice-block::after {
  box-shadow: inset 0 -14px 22px -10px rgba(15, 23, 42, 0.12);
}

/* Stronger "ice block" treatment for the hero shortener */
.ice-block {
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--ice-border-strong);
  background: rgba(10, 18, 32, 0.52);
  box-shadow: 
    0 25px 70px -15px rgba(0,0,0,0.65),
    0 10px 30px -8px rgba(0,0,0,0.5),
    inset 0 1.5px 0 rgba(255,255,255,0.6),
    0 0 0 1px rgba(103,232,249,0.12);
}
body.light .ice-block {
  background: rgba(255,255,255,0.72);
  border-color: rgba(103, 232, 249, 0.35);
}

/* 3D tilt support (applied via JS on .ice-tilt) */
.ice-tilt {
  transform-style: preserve-3d;
  transition: transform 0.12s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

/* Buttons — refined, glassy, premium */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 13px 22px;
  border-radius: 9999px;
  border: 1px solid var(--ice-border);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  font-weight: 700;
  color: inherit;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition: all 0.15s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: var(--ice-cyan);
  background: rgba(103, 232, 249, 0.12);
  box-shadow: 0 4px 14px -2px rgba(103, 232, 249, 0.3);
  text-decoration: none;
}
.btn.primary {
  background: linear-gradient(145deg, rgba(103,232,249,0.28), rgba(34,211,238,0.18));
  border-color: var(--ice-cyan);
  color: white;
  box-shadow: 0 4px 16px -2px rgba(103, 232, 249, 0.4);
}
.btn.primary:hover {
  background: linear-gradient(145deg, rgba(103,232,249,0.4), rgba(34,211,238,0.28));
  border-color: #a5f3fc;
  transform: translateY(-2px);
}

body.light .btn {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.2);
  color: var(--ice-text-dark);
}
body.light .btn:hover {
  background: rgba(103, 232, 249, 0.18);
  border-color: var(--ice-cyan);
}
body.light .btn.primary {
  background: linear-gradient(145deg, rgba(103,232,249,0.85), rgba(34,211,238,0.75));
  color: #0a111f;
  border-color: rgba(103,232,249,0.9);
}

/* Floating action buttons */
.floating-btn {
  position: fixed;
  z-index: 1001;
  padding: 10px 16px;
  font-size: 0.85rem;
  background: rgba(12, 20, 36, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  backdrop-filter: blur(18px);
}
.floating-btn.top-left { top: 1rem; left: 1rem; }
.floating-btn.bottom-left { bottom: 1rem; left: 1rem; }

.toggle-theme {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1002;
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--ice-border);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
body.light .toggle-theme {
  background: rgba(15,23,42,0.08);
  border-color: rgba(15,23,42,0.2);
}

/* Hero + Shortener */
.hero {
  position: relative;
  padding-top: clamp(70px, 10vw, 110px);
  text-align: center;
}

.shortener-card {
  margin: 2.5rem auto 1rem;
  max-width: 620px;
  text-align: left;
}

.hero-intro {
  font-size: clamp(1rem, 2.1vw, 1.15rem);
  line-height: 1.65;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

#shortenForm input[type="url"],
#shortenForm input[type="text"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ice-border);
  background: rgba(5, 10, 18, 0.45);
  color: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
}
body.light #shortenForm input {
  background: rgba(255,255,255,0.8);
  border-color: rgba(15,23,42,0.25);
}

#shortenForm input:focus {
  outline: none;
  border-color: var(--ice-cyan);
  box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.15);
}

/* Result states — icy success / error */
#shortenResult {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: var(--radius-sm);
  padding: 1rem;
}
#shortenError {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
  border-radius: var(--radius-sm);
  padding: 1rem;
}

/* QR area */
#qrCodeContainer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148,163,184,0.2);
}
#qrCodeContainer img {
  display: block;
  margin: 0 auto;
  border-radius: 10px;
  background: white;
  padding: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Portfolio bridge section */
.portfolio-teaser {
  margin: 3rem auto 2rem;
  max-width: 720px;
  text-align: center;
}
.portfolio-teaser h3 {
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}
.portfolio-teaser p {
  opacity: 0.85;
  margin-bottom: 1.25rem;
}
.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: 9999px;
  background: rgba(103, 232, 249, 0.1);
  border: 1px solid var(--ice-cyan);
  color: var(--ice-cyan);
  transition: all 0.2s ease;
}
.portfolio-link:hover {
  background: rgba(103, 232, 249, 0.22);
  transform: translateY(-1px);
  color: #a5f3fc;
}

/* Timeline teaser (lightweight preview on .au) */
.journey-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.journey-thumb {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--ice-border);
  aspect-ratio: 16 / 10;
  background: rgba(0,0,0,0.2);
}
.journey-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.journey-thumb:hover img {
  transform: scale(1.06);
}

/* Main content area */
main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* Forms (enquiry) */
.form-modal-content {
  max-width: 520px;
  width: 92%;
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.92rem;
  opacity: 0.9;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ice-border);
  background: rgba(255,255,255,0.06);
  color: inherit;
  font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
}
body.light .form-group input,
body.light .form-group textarea,
body.light .form-group select {
  background: rgba(255,255,255,0.85);
  border-color: rgba(15,23,42,0.2);
  color: var(--ice-text-dark);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--ice-cyan);
  box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.18);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1003;
  background: rgba(3, 7, 15, 0.82);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.open { display: flex; }

.modal .frame {
  max-width: min(94vw, 1400px);
  max-height: 92vh;
  background: var(--ice-glass);
  border: 1px solid var(--ice-border);
  border-radius: var(--radius);
  padding: 0.75rem;
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow-depth);
}
.modal img {
  display: block;
  max-width: 100%;
  max-height: calc(90vh - 3rem);
  border-radius: 12px;
}

#formatted-enquiry {
  white-space: pre-wrap;
  background: rgba(5,10,18,0.5);
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.5;
  border: 1px solid var(--ice-border);
}

/* Footer */
/* Old generic footer styles removed - using .ice-footer only */

/* Responsive */
@media (max-width: 720px) {
  .hero { padding-top: 60px; }
  .shortener-card { margin-top: 1.75rem; }
  .journey-preview { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .floating-btn { font-size: 0.78rem; padding: 8px 13px; }
}

/* Header layout: logo + 3D ice cube side-by-side on wide screens & tablets */
.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.75rem; /* increased gap so cube is not too close to logo */
  flex-wrap: wrap;
}

.site-header .logo {
  /* keep existing logo sizing from earlier rules */
}

/* ============================================
   ACTUAL 3D ICE CUBE — tumbling + mouse responsive
   Placed next to OZOL logo (smaller companion size)
   ============================================ */

.ice-cube-hero {
  /* Companion to logo on wide/tablet */
  flex-shrink: 0;
}

.cube-scene {
  width: 110px;  /* 20% larger */
  height: 110px;
  perspective: 780px;
  /* subtle outer glow so the cube reads as 3D object */
  filter: drop-shadow(0 8px 18px rgba(0, 20, 40, 0.45));
}

.ice-cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  cursor: grab;
  transition: transform 0.05s linear;
  /* CSS vars for dynamic light reflections (updated by JS on mousemove) */
  --lx: 50%;
  --ly: 30%;
  /* Initial rotation so the cube is visible from the start (not edge-on) */
  transform: rotateX(18deg) rotateY(32deg);
}

.ice-cube:active {
  cursor: grabbing;
}

.face {
  position: absolute;
  width: 110px;
  height: 110px;
  box-sizing: border-box;
  /* Much more visible rustic ice: higher opacity + stronger base */
  background: rgba(200, 230, 255, 0.55);
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    inset 18px 18px 30px rgba(255,255,255,0.65),
    inset -16px -16px 26px rgba(0, 25, 55, 0.45),
    0 4px 12px rgba(0,0,0,0.3),
    0 0 0 1px rgba(103, 232, 249, 0.3);
  /* Facet + heavy rustic texture (grain, frost, small bubbles/cracks) */
  background-image:
    linear-gradient(135deg, rgba(255,255,255,0.55) 0%, transparent 35%),
    linear-gradient(-45deg, rgba(255,255,255,0.28) 0%, transparent 60%),
    /* grain / rustic ice texture */
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.35) 1px, transparent 2px),
    radial-gradient(circle at 80% 75%, rgba(255,255,255,0.25) 0.7px, transparent 1.5px),
    radial-gradient(circle at 35% 85%, rgba(220,240,255,0.3) 1.2px, transparent 2px),
    /* subtle crack lines for uneven rustic look */
    linear-gradient(25deg, transparent 48%, rgba(255,255,255,0.15) 49%, rgba(255,255,255,0.15) 51%, transparent 52%);
  background-size: 100% 100%, 100% 100%, 8px 8px, 14px 14px, 11px 11px, 100% 100%;
  background-blend-mode: normal, normal, screen, screen, screen, overlay;
}

/* Distinct faces + uneven treatment via clip + extra reflections */
.face.front  { 
  transform: rotateY(0deg)   translateZ(55px); 
  background: rgba(210, 235, 255, 0.62); 
  clip-path: polygon(2% 4%, 97% 1%, 99% 93%, 4% 98%); /* slightly uneven */
}
.face.back   { 
  transform: rotateY(180deg) translateZ(55px); 
  background: rgba(175, 215, 245, 0.52); 
  clip-path: polygon(3% 3%, 96% 5%, 97% 96%, 5% 97%);
}
.face.right  { 
  transform: rotateY(90deg)  translateZ(55px); 
  background: rgba(195, 225, 250, 0.58); 
  clip-path: polygon(4% 2%, 98% 4%, 95% 97%, 2% 94%);
}
.face.left   { 
  transform: rotateY(-90deg) translateZ(55px); 
  background: rgba(185, 220, 248, 0.55); 
  clip-path: polygon(5% 5%, 97% 2%, 96% 95%, 3% 98%);
}
.face.top    { 
  transform: rotateX(90deg)  translateZ(55px); 
  background: rgba(205, 232, 255, 0.60); 
  clip-path: polygon(1% 3%, 98% 4%, 96% 96%, 3% 95%);
}
.face.bottom { 
  transform: rotateX(-90deg) translateZ(55px); 
  background: rgba(165, 205, 242, 0.50); 
  clip-path: polygon(4% 4%, 95% 3%, 98% 95%, 2% 96%);
}

/* Moving light reflection (uses --lx --ly from mouse) - stronger for visibility */
.face::before {
  content: "";
  position: absolute;
  inset: -15%;
  background: radial-gradient(
    circle at var(--lx, 50%) var(--ly, 30%),
    rgba(255,255,255,0.95) 0%,
    rgba(255,255,255,0.55) 15%,
    rgba(200,235,255,0.25) 28%,
    transparent 50%
  );
  pointer-events: none;
  mix-blend-mode: screen;
  transition: background 0.08s linear;
  z-index: 10;
}

/* Extra crisp specular rim + rustic edge variation */
.face::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 1px;
  pointer-events: none;
  box-shadow: inset 0 0 8px rgba(255,255,255,0.25);
}

/* Mobile / narrow: cube becomes very small or can be hidden if too cramped */
@media (max-width: 620px) {
  .site-header {
    flex-direction: column;
    gap: 0.65rem;
  }
  .cube-scene {
    width: 74px; /* 20% larger than previous mobile size */
    height: 74px;
  }
  .face {
    width: 74px;
    height: 74px;
  }
  .face.front  { transform: rotateY(0deg)   translateZ(37px); }
  .face.back   { transform: rotateY(180deg) translateZ(37px); }
  .face.right  { transform: rotateY(90deg)  translateZ(37px); }
  .face.left   { transform: rotateY(-90deg) translateZ(37px); }
  .face.top    { transform: rotateX(90deg)  translateZ(37px); }
  .face.bottom { transform: rotateX(-90deg) translateZ(37px); }
}

/* ============================================
   1-line footer as specified by user
   © 2026 Colin Dixon | v1.xx • date time | oze.au
   ============================================ */

.ice-footer {
  margin: 1.25rem 0 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ice-border);
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.75;
  line-height: 1.2;
  white-space: nowrap;
}

.ice-footer a {
  font-weight: 600;
  color: inherit;
}