/* Dyad Software - Main Stylesheet */

:root{
  /* Light, clean, techy palette */
  --bg:#f7f9fc;
  --surface:#ffffff;
  --surface-2:#f3f6fb;
  --text:#0f172a;           /* slate-900 */
  --muted:#475569;          /* slate-600 */
  --line:#e5eaf2;
  --primary:#2365AD;        /* custom blue */
  --primary-2:#1a4c82;      /* darker blue */
  --ring: rgba(35,101,173,.35);
  --shadow: 0 10px 30px rgba(2, 8, 23, .06);
  --radius: 14px;
  --radius-sm: 10px;
  --success:#10b981;
  --error:#ef4444;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background:#ffffff;
  line-height:1.6;
}

/* Index page specific background */
.index-background {
  background:
    radial-gradient(900px 500px at 80% -10%, #eaf2ff 0%, transparent 60%),
    linear-gradient(180deg, #ffffff, var(--bg) 40%, var(--bg));
}

a{color:var(--primary);text-decoration:none}
a:hover{color:var(--primary-2)}
img{max-width:100%;height:auto}
.container{width:100%;max-width:1100px;margin:0 auto;padding:0 20px}

/* Accessibility */
.skip-link{
  position:absolute;left:-9999px;top:auto;overflow:hidden;
}
.skip-link:focus{left:16px;top:16px;background:#fff;border:2px solid var(--primary);padding:8px 12px;border-radius:8px;z-index:1000}

/* Header */
.header{
  position:sticky;top:0;z-index:50;background:rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border-bottom:1px solid var(--line);
}
.nav{display:flex;align-items:center;justify-content:space-between;padding:14px 20px}
.brand{display:flex;align-items:center;gap:10px}
.brand img{width:140px;height:auto;border-radius:8px}
.brand span{font-weight:700;letter-spacing:.3px}

.nav-links{display:flex;gap:22px;align-items:center}
.nav-links a{color:var(--text);opacity:.85}
.nav-links a:hover{opacity:1}

.btn{
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:999px;
  padding:10px 16px;
  font-weight:600;
  cursor:pointer;
  text-decoration:none;
  display:inline-block;
}
.btn:focus-visible{outline:3px solid var(--ring);outline-offset:2px}
.btn.primary{
  background:#3BAD23;
  color:#ffffff;border-color:#3BAD23;
  box-shadow:0 8px 24px rgba(59,173,35,.25);
}
.btn.primary:hover{background:#2e8a1b;border-color:#2e8a1b}
.btn.ghost{background:transparent;color:#ffffff;border-color:rgba(255,255,255,0.3)}
.btn.ghost:hover{border-color:#ffffff;background:rgba(255,255,255,.1)}

/* Blue primary button variant for policy pages */
.btn.primary-blue{
  background:var(--primary);
  color:#fff;border-color:var(--primary);
  box-shadow:0 8px 24px rgba(35,101,173,.15);
}
.btn.primary-blue:hover{background:var(--primary-2);border-color:var(--primary-2);color:#fff}

/* Hero */
.hero{padding:40px 0 36px;background:var(--primary);}
.hero-grid{display:grid;grid-template-columns: 1.1fr .9fr;gap:36px;align-items:center}
.pill{
  display:inline-flex;align-items:center;gap:8px;
  background:rgba(255,255,255,0.95);border:1px solid rgba(255,255,255,0.3);
  color:#1a4c82;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:700;letter-spacing:.3px;text-transform:uppercase
}
.hero h1{font-size:44px;line-height:1.12;margin:16px 0 10px;color:#ffffff}
.hero p{color:#e8f2ff;max-width:680px;font-size:18px}
.actions{display:flex;gap:12px;margin-top:18px}
.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}
.card h3{margin:6px 0 4px}
.kpis{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:10px}
.kpi{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius-sm);padding:12px}
.kpi .n{font-size:20px;font-weight:800}
.kpi .l{color:#374151;font-size:12px}

/* Page Header for policy pages */
.page-header{
  padding:80px 20px 0px;
  text-align:left;
  max-width:800px;
  margin:0 auto;
}
.page-header h1{
  font-size:44px;
  line-height:1.12;
  margin:0;
}
.tagline{
  color:var(--muted);
  font-size:18px;
  margin:0 0 8px;
}
.last-updated{
  color:var(--muted);
  font-size:16px;
  margin:0;
}

/* Sections */
section{padding:48px 0}
section h2{font-size:28px;margin:0 0 12px}
.three{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.tile{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px;box-shadow:var(--shadow)}
.tile p{color:var(--muted)}
.list{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;justify-content:start;padding:0;margin:0}
.list li{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-sm);padding:12px;list-style:none;box-shadow:var(--shadow);text-align:left}
.muted{color:var(--muted)}
.callout{
  background:linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  border:1px solid var(--line);border-radius:var(--radius);padding:22px;display:flex;align-items:center;justify-content:space-between;gap:16px;box-shadow:var(--shadow)
}

/* Policy Content */
.policy-content{
  max-width:800px;
  margin:0 auto;
  padding:30px 20px;
}
.policy-section{
  padding:0;
  margin-bottom:32px;
}
.policy-section h2{
  font-size:24px;
  margin:0 0 16px;
  color:var(--text);
}
.policy-section h3{
  font-size:18px;
  margin:20px 0 12px;
  color:var(--text);
}
.policy-section p{
  color:var(--muted);
  margin:12px 0;
}
.policy-section ul{
  color:var(--muted);
  margin:12px 0;
  padding-left:24px;
}
.policy-section li{
  margin:8px 0;
}
.policy-section strong{
  color:var(--text);
}

/* SMS Policy specific styles */
.main-content{
  max-width:800px;
  margin:0 auto;
  padding:48px 20px;
}

.company-details{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px;
  max-width:900px;
  margin:40px auto 0;
}
.detail-card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:24px;
  text-align:left;
}
.detail-card h3{
  font-size:18px;
  margin:0 0 12px;
  color:var(--text);
}
.detail-card p{
  color:var(--muted);
  margin:0;
  font-size:14px;
}

.policy-section h2:first-child{
  margin-top:0;
}

/* Opt-In Section */
.opt-in-section{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:32px;
  margin-bottom:32px;
}
.opt-in-section h2{
  font-size:28px;
  margin:0 0 8px;
  color:var(--text);
}
.opt-in-section .description{
  color:var(--muted);
  margin:0 0 24px;
}

/* Opt-In Example */
.opt-in-example{
  background:var(--surface-2);
  border:2px solid var(--primary);
  border-radius:var(--radius);
  padding:24px;
  margin:24px 0;
}
.opt-in-example h3{
  font-size:20px;
  margin:0 0 16px;
  color:var(--text);
}
.consent-text{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:20px;
  color:var(--muted);
  line-height:1.8;
}
.consent-text strong{
  color:var(--text);
}

/* Forms */
label{font-weight:600}
input, textarea{
  width:100%;padding:12px;border-radius:12px;border:1px solid var(--line);background:#fff;color:var(--text);
}
input:focus-visible, textarea:focus-visible{outline:3px solid var(--ring);border-color:var(--primary)}
textarea{resize:vertical}

.form-group{
  margin-bottom:20px;
}
.form-group label{
  display:block;
  font-weight:600;
  margin-bottom:8px;
  color:var(--text);
}

/* Make required field asterisks red */
.form-group label:has-text("*"):after,
label[for$="name"]:after,
label[for$="email"]:after,
label[for$="details"]:after,
label[for$="phone"]:after,
label[for$="consent"]:after {
  color: var(--error);
}

/* Alternative approach - target asterisks directly */
.form-group label {
  color: var(--text);
}

.form-group label::after {
  content: "";
}

/* Red asterisks for required fields */
label[for="project-name"]::after,
label[for="project-email"]::after,
label[for="project-details"]::after,
label[for="sms-name"]::after,
label[for="sms-email"]::after,
label[for="sms-phone"]::after,
label[for="sms-consent"]::after {
  content: " *";
  color: var(--error);
}
.form-group input{
  width:100%;
  padding:12px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--surface);
  color:var(--text);
  font-size:16px;
}
.form-group input:focus{
  outline:none;
  border-color:var(--primary);
  box-shadow:0 0 0 3px var(--ring);
}

.checkbox-group{
  display:flex;
  align-items:flex-start;
  margin:24px 0;
  gap:12px;
}
.checkbox-group input[type="checkbox"]{
  margin-top:4px;
  width:20px;
  height:20px;
  cursor:pointer;
}
.checkbox-group label{
  flex:1;
  cursor:pointer;
  color:var(--muted);
  line-height:1.6;
}
.checkbox-group label strong{
  color:var(--text);
}

.submit-btn{
  width:100%;
  padding:14px 24px;
  background:var(--primary);
  color:#fff;
  border:none;
  border-radius:var(--radius-sm);
  font-size:16px;
  font-weight:600;
  cursor:pointer;
  transition:all 0.2s;
}
.submit-btn:hover:not(:disabled){
  background:var(--primary-2);
  transform:translateY(-1px);
  box-shadow:0 12px 24px rgba(35,101,173,.25);
}
.submit-btn:disabled{
  opacity:0.6;
  cursor:not-allowed;
}

/* Messages */
#message-container{
  margin:20px 0;
}
.message{
  padding:16px;
  border-radius:var(--radius-sm);
  margin-bottom:16px;
  font-weight:500;
}
.message.success{
  background:#dcfce7;
  color:#166534;
  border:1px solid #86efac;
}
.message.error{
  background:#fee2e2;
  color:#991b1b;
  border:1px solid #fca5a5;
}

/* Contact Info */
.contact-info{
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:20px;
  margin-top:32px;
}
.contact-info h3{
  font-size:18px;
  margin:0 0 12px;
  color:var(--text);
}
.contact-info p{
  color:var(--muted);
  margin:8px 0;
}

/* Footer */
footer{
  background:var(--primary);
  color:#ffffff;
  padding:40px 0;
  margin-top:60px;
  font-size:14px;
}
footer a{
  color:#ffffff;
  text-decoration:underline;
}
footer a:hover{
  color:#e8f2ff;
}
.footer-content{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:24px;
  flex-wrap:wrap;
}
.footer-links{
  margin-bottom:12px;
}
.footer-copyright{
  font-size:12px;
  opacity:0.8;
}
.footer-address{
  line-height:1.6;
}
.footer-logo{
  width:120px;
  height:auto;
  opacity:0.95;
}
.footer-tagline{
  font-size:11.2px;
  margin-bottom:16px;
  line-height:1.4;
}

/* Contact Page Styles */
.contact-options {
    margin-bottom: 2rem;
}

.contact-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
    border-bottom: 1px solid #e5e7eb;
}

.contact-tab-btn {
    padding: 16px 32px;
    background: none;
    border: none;
    color: #6b7280;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.contact-tab-btn.active,
.contact-tab-btn:hover {
    color: #3BAD23;
    border-bottom-color: #3BAD23;
}

.contact-tab-content {
    display: none;
    opacity: 0;
    transition: all 0.5s ease;
}

.contact-tab-content.active {
    display: block;
    opacity: 1;
}

.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.form-header p {
    font-size: 1.1rem;
    color: #6b7280;
}

.contact-form-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-submit-btn {
    margin-top: 1rem;
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1rem;
}

.sms-info-section {
    margin-bottom: 2rem;
}

.sms-benefits h3 {
    color: #111827;
    font-weight: 600;
    margin-bottom: 1rem;
}

.sms-benefits ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.sms-benefits li {
    padding: 8px 0;
    color: #6b7280;
    position: relative;
    padding-left: 1.5rem;
}

.sms-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.sms-benefits strong {
    color: #111827;
}

.sms-policy-link {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.sms-policy-link p {
    margin: 0;
    font-size: 0.95rem;
    color: #374151;
}

.sms-policy-link a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.sms-policy-link a:hover {
    text-decoration: underline;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #6b7280;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.consent-section {
    background: #fef7ff;
    border: 1px solid #e879f9;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.consent-text p {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.contact-info-section {
    margin-top: 3rem;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contact-info-card {
    text-align: center;
    padding: 1rem;
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info-card h3 {
    color: #111827;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.contact-info-card p {
    color: #374151;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.contact-info-card a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.contact-info-card a:hover {
    text-decoration: underline;
}

.contact-info-card small {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Enhanced Select Styling for contact forms */
.contact-form-grid .form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding: 12px 44px 12px 16px;
    cursor: pointer;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    color: #374151;
    transition: all 0.3s ease;
    width: 100%;
    height: auto;
    min-height: 48px;
}

.contact-form-grid .form-group select:hover {
    border-color: #9ca3af;
}

.contact-form-grid .form-group select:focus {
    background-color: #ffffff;
    border-color: #3BAD23;
}

.contact-form-grid .form-group select:invalid {
    color: #9ca3af;
}

.contact-form-grid .form-group select option {
    color: #374151;
    background: #ffffff;
    padding: 8px 12px;
}

.contact-form-grid .form-group select option:first-child {
    color: #9ca3af;
}

.contact-form-grid .form-group select::-ms-expand {
    display: none;
}

/* Responsive */
@media (max-width: 980px){
  .hero-grid{grid-template-columns:1fr}
  .three{grid-template-columns:1fr}
  .list{grid-template-columns:1fr}
  .nav-links{display:none}
  .page-header h1{font-size:32px}
  .company-details{grid-template-columns:1fr}
  .detail-card{padding:20px}
  .policy-section{padding:0}
  .opt-in-section{padding:24px}
  .footer-content{
    flex-direction:column;
    align-items:flex-start;
    text-align:left;
  }
}

@media (max-width: 768px) {
    .contact-tabs {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }
    
    .contact-tab-btn {
        width: 200px;
        padding: 12px 24px;
        border-bottom: none;
        border-radius: 8px;
        margin-bottom: 8px;
    }
    
    .contact-tab-btn.active,
    .contact-tab-btn:hover {
        background: rgba(59, 173, 35, 0.05);
        border-bottom: none;
    }
    
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .contact-info-card {
        padding: 0.5rem;
    }
}